Prepare for cross-compile

This commit is contained in:
cyd01
2019-11-27 09:35:22 +01:00
parent 0f03a4514b
commit ed7a22df87
5 changed files with 19 additions and 9 deletions
+2 -2
View File
@@ -38,8 +38,8 @@ int switch_private_key_flag( void ) ;
/* Ajout de declaration de DLL manquante dans MinGW*/
//DLL_DIRECTORY_COOKIE WINAPI AddDllDirectory( PCWSTR NewDirectory );
BOOL WINAPI SetDefaultDllDirectories( DWORD DirectoryFlags ) ;
BOOL WINAPI CryptProtectMemory( LPVOID pData, DWORD cbData, DWORD dwFlags );
BOOL WINAPI __declspec(dllimport) SetDefaultDllDirectories( DWORD DirectoryFlags ) ;
BOOL WINAPI __declspec(dllimport) CryptProtectMemory( LPVOID pData, DWORD cbData, DWORD dwFlags );
#endif
#ifdef MOD_PRINTCLIP
#define PRINT_TO_CLIPBOARD_STRING "Windows clipboard"
+9 -1
View File
@@ -140,7 +140,7 @@ FDJFLAG = FDJ1
RCFLAGS += -I ../../ -DMOD_PERSO -D$(FDJFLAG)
CFLAGS += -DAUTO_WINSOCK -DCOVERITY -DNO_MULTIMON -DNO_HTMLHELP
CFLAGS += -DNO_SECUREZEROMEMORY -DCOVERITY -DNO_MULTIMON -DNO_HTMLHELP
CFLAGS += -D$(FDJFLAG)
CFLAGS += -I.././ -I../../ \
-DMOD_PERSO \
@@ -2131,6 +2131,14 @@ putty_portable.exe: agentf.o aqsync.o be_all_s.o be_misc.o callback.o cmdline.o
clean:
rm -f *.o *.exe *.res.o *.so *.map
cross:
sed -i 's#^typedef enum _WTS_VIRTUAL_CLASS #// typedef enum _WTS_VIRTUAL_CLASS #' window.c
make -e TOOLPATH=/usr/bin/i686-w64-mingw32- -f MAKEFILE.MINGW putty.exe
upx --best --compress-icons=2 --compress-exports=0 putty.exe
wine /usr/bin/MD5sign.exe putty.exe
mv putty.exe /build/kitty.exe
rm *.o
9bis: putty.exe putty_portable.exe plink.exe pscp.exe psftp.exe pageant.exe puttygen.exe
# AJOUTER
+2 -5
View File
@@ -259,7 +259,7 @@ void SendStrToTerminal( const char * str, const int len ) {
for( i=0 ; i<len ; i++ ) {
c=(unsigned char)str[i] ;
if (ldisc)
term_keyinputw(term, &c, 1); //lpage_send(ldisc, CP_ACP, &c, 1, 1);
term_keyinputw(term, (const wchar_t *) &c, 1); //lpage_send(ldisc, CP_ACP, &c, 1, 1);
}
}
// resize en convertissant en nombre de lignes et colonnes
@@ -321,10 +321,7 @@ int WINAPI Agent_WinMain(HINSTANCE inst, HINSTANCE prev, LPSTR cmdline, int show
#endif
#ifdef MOD_WTS
typedef enum _WTS_VIRTUAL_CLASS {
WTSVirtualClientData,
WTSVirtualFileHandle
} WTS_VIRTUAL_CLASS; // WTS_VIRTUAL_CLASS n'est pas défini dans le fichier wtsapi32.h !!!
typedef enum _WTS_VIRTUAL_CLASS { WTSVirtualClientData, WTSVirtualFileHandle } WTS_VIRTUAL_CLASS; // WTS_VIRTUAL_CLASS n'est pas défini dans le fichier wtsapi32.h !!!
#include <wtsapi32.h>
#endif
#if (defined MOD_BACKGROUNDIMAGE) && (!defined FDJ)
+5
View File
@@ -8,6 +8,11 @@
#ifndef AUTO_WINSOCK
#include <winsock2.h>
#endif
#ifdef MOD_PERSO
#include <winerror.h>
#endif
#include <windows.h>
#include <stdio.h> /* for FILENAME_MAX */
+1 -1
View File
@@ -279,7 +279,7 @@ void SetSSHConnected( int flag ) {
}
#endif
PVOID SecureZeroMemory( PVOID ptr, SIZE_T cnt) { return memset( ptr, 0, cnt ) ; }
//PVOID SecureZeroMemory( PVOID ptr, SIZE_T cnt) { return memset( ptr, 0, cnt ) ; }
// Fonction permettant de changer le statut du stockage automatique des ssh host keys
void SetAutoStoreSSHKey( void ) {