diff --git a/README.md b/README.md index 1548381..530d70f 100644 --- a/README.md +++ b/README.md @@ -8,3 +8,6 @@ See the [wiki](https://github.com/PowerShell/Win32-OpenSSH/wiki) for installatio [First release announcement](http://blogs.msdn.com/b/powershell/archive/2015/10/19/openssh-for-windows-update.aspx ) +### Chocolatey + +[![](http://img.shields.io/chocolatey/dt/win32-openssh.svg)](https://chocolatey.org/packages/win32-openssh) [![](http://img.shields.io/chocolatey/v/win32-openssh.svg)](https://chocolatey.org/packages/win32-openssh) diff --git a/contrib/win32/openssh/OpenSSL-1.0.2d_build.cmd b/contrib/win32/openssh/OpenSSL-1.0.2d_build.cmd new file mode 100644 index 0000000..daca44b --- /dev/null +++ b/contrib/win32/openssh/OpenSSL-1.0.2d_build.cmd @@ -0,0 +1,45 @@ +set OPENSSL_VERSION=1.0.2d +set PerlPath=c:\perl\bin +set NASMPath=c:\nasm + +set VS2013="C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\bin\vcvars32.bat" +set VS2013_AMD64="C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\bin\amd64\vcvars64.bat" +set VS2015="C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin\vcvars32.bat" +set VS2015_AMD64="C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin\amd64\vcvars64.bat" + +set path=%NASMPath%;%PerlPath%;%path% + + +CALL %VS2015% + +cd \Dev\OpenSSL\openssl-%OPENSSL_VERSION%-src-x86 +perl Configure VC-WIN32 --prefix=C:\dev\OpenSSL\%OPENSSL_VERSION%\VS2015\Win32\Release +call ms\do_ms.bat +call ms\do_nasm.bat +nmake -f ms\nt.mak clean +nmake -f ms\nt.mak +nmake -f ms\nt.mak install + +cd \Dev\OpenSSL\openssl-%OPENSSL_VERSION%-src-x86 +perl Configure debug-VC-WIN32 --prefix=C:\dev\OpenSSL\%OPENSSL_VERSION%\VS2015\Win32\Debug +call ms\do_ms.bat +call ms\do_nasm.bat +nmake -f ms\nt.mak clean +nmake -f ms\nt.mak +nmake -f ms\nt.mak install + +CALL %VS2015_AMD64% + +cd \Dev\OpenSSL\openssl-%OPENSSL_VERSION%-src-x64 +perl Configure VC-WIN64A --prefix=C:\dev\OpenSSL\%OPENSSL_VERSION%\VS2015\x64\Release +call ms\do_win64a.bat +nmake -f ms\nt.mak clean +nmake -f ms\nt.mak +nmake -f ms\nt.mak install + +cd \Dev\OpenSSL\openssl-%OPENSSL_VERSION%-src-x64 +perl Configure debug-VC-WIN64A --prefix=C:\dev\OpenSSL\%OPENSSL_VERSION%\VS2015\x64\Debug +call ms\do_win64a.bat +nmake -f ms\nt.mak clean +nmake -f ms\nt.mak +nmake -f ms\nt.mak install diff --git a/session.c b/session.c index a01b7eb..e9378a4 100644 --- a/session.c +++ b/session.c @@ -117,6 +117,9 @@ FIXME: GFPZR: Function stat() may be undeclared. #include #include +#ifdef WIN32_PRAGMA_REMCON +#include +#endif extern char HomeDirLsaW[MAX_PATH]; #endif @@ -599,9 +602,17 @@ do_exec_no_pty(Session *s, const char *command) #ifndef WIN32_PRAGMA_REMCON exec_command = s->pw->pw_shell; #else - snprintf(exec_command_str, sizeof(exec_command_str), - "\\program files\\pragma\\shared files\\cmdserver.exe SSHD %d %d", - s->row, s->col ); + if ( PathFileExists("\\program files\\pragma\\shared files\\cmdserver.exe") ) + snprintf(exec_command_str, sizeof(exec_command_str), + "\\program files\\pragma\\shared files\\cmdserver.exe SSHD %d %d", s->row, s->col ); + else { + // find base path of our executable + char basepath[MAX_PATH]; + strcpy_s(basepath, MAX_PATH, __progname); + PathRemoveFileSpec(basepath); // get the full dir part of the name + snprintf(exec_command_str, sizeof(exec_command_str), + "%s\\cmdserver.exe SSHD %d %d", basepath,s->row, s->col); + } exec_command = exec_command_str; #endif } diff --git a/sftp.c b/sftp.c index 7d5e0e2..cef03cb 100644 --- a/sftp.c +++ b/sftp.c @@ -346,6 +346,10 @@ local_do_shell(const char *args) static void local_do_ls(const char *args) { +#ifdef WIN32_FIXME +#undef _PATH_LS +#define _PATH_LS "dir" +#endif if (!args || !*args) local_do_shell(_PATH_LS); else {