Tagging the 0.74.3.3 release of the kitty project.
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
#define RELEASE 0.74
|
||||
#define TEXTVER "Release 0.74"
|
||||
#define SSHVER "-Release-0.74"
|
||||
#define BINARY_VERSION 0,74,3,2
|
||||
#define BINARY_VERSION 0,74,3,3
|
||||
#define SOURCE_COMMIT "unavailable"
|
||||
|
||||
@@ -1 +1 @@
|
||||
2
|
||||
3
|
||||
|
||||
@@ -965,7 +965,7 @@ int WINAPI WinMain(HINSTANCE inst, HINSTANCE prev, LPSTR cmdline, int show)
|
||||
if( existfile(argv[i]) ) {
|
||||
LoadFile = (char*) malloc( strlen(argv[i])+1 ) ;
|
||||
strcpy( LoadFile, argv[i] ) ;
|
||||
RunPuttyEd( hwnd, LoadFile, true ) ;
|
||||
RunPuttyEd( hwnd, LoadFile ) ;
|
||||
free( LoadFile ) ;
|
||||
} else {
|
||||
MessageBox(hwnd,"Unable to find requested file","Error",MB_OK|MB_ICONERROR) ;
|
||||
@@ -1112,22 +1112,22 @@ int WINAPI WinMain(HINSTANCE inst, HINSTANCE prev, LPSTR cmdline, int show)
|
||||
CreateFileAssoc() ; return 0 ;
|
||||
} else if( !strcmp(p, "-ed") ) {
|
||||
char buffer[1024];
|
||||
sprintf(buffer, "%s|%s|0", (char*)get_param_str("INI"), (char*)get_param_str("SAV") ) ;
|
||||
sprintf(buffer, "%s|%s|0|0", (char*)get_param_str("INI"), (char*)get_param_str("SAV") ) ;
|
||||
return Notepad_WinMain(inst, prev, buffer, show) ;
|
||||
} else if( !strcmp(p, "-edb") ) {
|
||||
i++;
|
||||
if( existfile(argv[i]) ) {
|
||||
char buffer[1024];
|
||||
sprintf(buffer, "%s|%s|%s", (char*)get_param_str("INI"), (char*)get_param_str("SAV"), argv[i] ) ;
|
||||
sprintf(buffer, "%s|%s|%s|0", (char*)get_param_str("INI"), (char*)get_param_str("SAV"), argv[i] ) ;
|
||||
return Notepad_WinMain(inst, prev, buffer, show) ;
|
||||
} else {
|
||||
MessageBox(hwnd,"Unable to find requested file","Error",MB_OK|MB_ICONERROR) ;
|
||||
}
|
||||
exit(0);
|
||||
} else if( !strcmp(p, "-help") ) {
|
||||
} else if( !strcmp(p, "-help") || !strcmp(p, "-h") ) {
|
||||
SetTextToClipboard(GetHelpMessage()) ;
|
||||
char buffer[1024];
|
||||
sprintf(buffer, "%s|%s|2", (char*)get_param_str("INI"), (char*)get_param_str("SAV") ) ;
|
||||
sprintf(buffer, "%s|%s|1|1", (char*)get_param_str("INI"), (char*)get_param_str("SAV") ) ;
|
||||
return Notepad_WinMain(inst, prev, buffer, show) ;
|
||||
#ifdef MOD_LAUNCHER
|
||||
} else if( !strcmp(p, "-launcher") ) {
|
||||
@@ -3334,7 +3334,7 @@ else if((UINT_PTR)wParam == TIMER_INIT) { // Initialisation
|
||||
|
||||
// On charge automatiquement au démarrage (-edit) un fichier dans l'editeur connecté
|
||||
if( !PuttyFlag ) if( LoadFile!=NULL ) {
|
||||
RunPuttyEd( hwnd, LoadFile, true ) ;
|
||||
RunPuttyEd( hwnd, LoadFile ) ;
|
||||
free( LoadFile ) ;
|
||||
LoadFile = NULL ;
|
||||
}
|
||||
|
||||
Binary file not shown.
+28
-19
@@ -1,4 +1,5 @@
|
||||
#include <stdio.h>
|
||||
#include <stdbool.h>
|
||||
#include "notepad.h"
|
||||
|
||||
LRESULT CALLBACK Notepad_WndProc(HWND, UINT, WPARAM, LPARAM);
|
||||
@@ -20,6 +21,7 @@ static const char Notepad_szFilenameFilter[] = "Text files, (*.txt, *.log, *.ini
|
||||
static char * IniFile = NULL ;
|
||||
static char * SavFile = NULL ;
|
||||
static char * LoadFile = NULL ;
|
||||
static bool readonly = false ;
|
||||
#endif
|
||||
|
||||
BOOL FileExists(LPCTSTR szPath) {
|
||||
@@ -64,7 +66,7 @@ int WINAPI Notepad_WinMain(HINSTANCE hinstance, HINSTANCE hPrevInstance, LPSTR l
|
||||
|
||||
#ifdef NOMAIN
|
||||
if( lpCmdLine!=NULL ) {
|
||||
if( strlen(lpCmdLine) > 0 ) {
|
||||
if( strlen(lpCmdLine) > 0 ) {
|
||||
char *st = strstr( lpCmdLine, "|" ) ;
|
||||
if( st!=NULL ) {
|
||||
SavFile=(char*)malloc(strlen(st)+1);
|
||||
@@ -77,6 +79,11 @@ int WINAPI Notepad_WinMain(HINSTANCE hinstance, HINSTANCE hPrevInstance, LPSTR l
|
||||
LoadFile = (char*)malloc(strlen(st)+1);
|
||||
strcpy( LoadFile, st+1 ) ;
|
||||
st[0] = '\0' ;
|
||||
st = strstr( LoadFile, "|" );
|
||||
if( st!=NULL ) {
|
||||
if( !strcmp(st+1,"1") ) { readonly = true ; }
|
||||
st[0] = '\0' ;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -115,25 +122,28 @@ int WINAPI Notepad_WinMain(HINSTANCE hinstance, HINSTANCE hPrevInstance, LPSTR l
|
||||
AppendMenu(hSMEdition, MF_STRING, NOTEPAD_IDM_SETFONT, Notepad_LoadString(NOTEPAD_STR_SETFONT));
|
||||
|
||||
hSMFichier = CreateMenu();
|
||||
AppendMenu(hSMFichier, MF_STRING, NOTEPAD_IDM_NEW, Notepad_LoadString(NOTEPAD_STR_NEW));
|
||||
AppendMenu(hSMFichier, MF_STRING, NOTEPAD_IDM_OPEN, Notepad_LoadString(NOTEPAD_STR_OPEN));
|
||||
AppendMenu(hSMFichier, MF_STRING|MF_GRAYED|MF_DISABLED, NOTEPAD_IDM_SAVE, Notepad_LoadString(NOTEPAD_STR_SAVE));
|
||||
AppendMenu(hSMFichier, MF_STRING, NOTEPAD_IDM_SAVEAS, Notepad_LoadString(NOTEPAD_STR_SAVEAS));
|
||||
|
||||
if( !readonly ) {
|
||||
AppendMenu(hSMFichier, MF_STRING, NOTEPAD_IDM_NEW, Notepad_LoadString(NOTEPAD_STR_NEW));
|
||||
AppendMenu(hSMFichier, MF_STRING, NOTEPAD_IDM_OPEN, Notepad_LoadString(NOTEPAD_STR_OPEN));
|
||||
AppendMenu(hSMFichier, MF_STRING|MF_GRAYED|MF_DISABLED, NOTEPAD_IDM_SAVE, Notepad_LoadString(NOTEPAD_STR_SAVE));
|
||||
AppendMenu(hSMFichier, MF_STRING, NOTEPAD_IDM_SAVEAS, Notepad_LoadString(NOTEPAD_STR_SAVEAS));
|
||||
#ifdef NOMAIN
|
||||
AppendMenu(hSMFichier, MF_SEPARATOR, 0, NULL );
|
||||
AppendMenu(hSMFichier, MF_STRING, NOTEPAD_IDM_LOAD_INI, TEXT("ini file"));
|
||||
AppendMenu(hSMFichier, MF_STRING, NOTEPAD_IDM_LOAD_SAV, TEXT("sav file"));
|
||||
if( ParentWindow!=NULL ) {
|
||||
AppendMenu(hSMFichier, MF_SEPARATOR, 0, NULL );
|
||||
AppendMenu(hSMFichier, MF_STRING, NOTEPAD_IDM_RESIZE, TEXT("&Resize"));
|
||||
}
|
||||
AppendMenu(hSMFichier, MF_STRING, NOTEPAD_IDM_LOAD_INI, TEXT("ini file"));
|
||||
AppendMenu(hSMFichier, MF_STRING, NOTEPAD_IDM_LOAD_SAV, TEXT("sav file"));
|
||||
if( ParentWindow!=NULL ) {
|
||||
AppendMenu(hSMFichier, MF_SEPARATOR, 0, NULL );
|
||||
AppendMenu(hSMFichier, MF_STRING, NOTEPAD_IDM_RESIZE, TEXT("&Resize"));
|
||||
}
|
||||
#endif
|
||||
AppendMenu(hSMFichier, MF_SEPARATOR, 0, NULL );
|
||||
AppendMenu(hSMFichier, MF_SEPARATOR, 0, NULL );
|
||||
}
|
||||
AppendMenu(hSMFichier, MF_STRING, NOTEPAD_IDM_QUIT, Notepad_LoadString(NOTEPAD_STR_QUIT));
|
||||
|
||||
hMenu = CreateMenu();
|
||||
AppendMenu(hMenu,MF_POPUP,(UINT)hSMFichier,Notepad_LoadString(NOTEPAD_STR_FILE));
|
||||
AppendMenu(hMenu,MF_POPUP,(UINT)hSMEdition,Notepad_LoadString(NOTEPAD_STR_EDIT));
|
||||
if( !readonly ) { AppendMenu(hMenu,MF_POPUP,(UINT)hSMEdition,Notepad_LoadString(NOTEPAD_STR_EDIT)); }
|
||||
|
||||
#ifdef NOMAIN
|
||||
HMENU hSMDelim = CreateMenu() ;
|
||||
@@ -141,17 +151,17 @@ int WINAPI Notepad_WinMain(HINSTANCE hinstance, HINSTANCE hPrevInstance, LPSTR l
|
||||
AppendMenu(hSMDelim, MF_STRING|MF_CHECKED, NOTEPAD_IDM_SCOLON, Notepad_LoadString(NOTEPAD_STR_SCOLON));
|
||||
AppendMenu(hSMDelim, MF_STRING|MF_UNCHECKED, NOTEPAD_IDM_SLASH, Notepad_LoadString(NOTEPAD_STR_SLASH));
|
||||
AppendMenu(hSMDelim, MF_STRING|MF_UNCHECKED, NOTEPAD_IDM_TILDE, Notepad_LoadString(NOTEPAD_STR_TILDE));
|
||||
AppendMenu(hMenu,MF_POPUP,(UINT)hSMDelim,Notepad_LoadString(NOTEPAD_STR_DELIM));
|
||||
if( !readonly ) { AppendMenu(hMenu,MF_POPUP,(UINT)hSMDelim,Notepad_LoadString(NOTEPAD_STR_DELIM)); }
|
||||
|
||||
HMENU hWindows = CreateMenu() ;
|
||||
AppendMenu(hWindows, MF_STRING, NOTEPAD_IDM_RESIZE_ALL, "&Arrange");
|
||||
AppendMenu(hWindows, MF_STRING, NOTEPAD_IDM_CASCADE_ALL, "&Cascade");
|
||||
AppendMenu(hMenu,MF_POPUP,(UINT)hWindows,"&Windows");
|
||||
if( !readonly ) { AppendMenu(hMenu,MF_POPUP,(UINT)hWindows,"&Windows"); }
|
||||
|
||||
AppendMenu(hMenu,MF_STRING, NOTEPAD_IDM_SEND, Notepad_LoadString(NOTEPAD_STR_SEND));
|
||||
if( !readonly ) { AppendMenu(hMenu,MF_STRING, NOTEPAD_IDM_SEND, Notepad_LoadString(NOTEPAD_STR_SEND)) ; }
|
||||
//AppendMenu(hMenu,MF_STRING, NOTEPAD_IDM_SEND_ALL, Notepad_LoadString(NOTEPAD_STR_SEND_ALL));
|
||||
#endif
|
||||
AppendMenu(hMenu,MF_POPUP,(UINT)hSMApropos,Notepad_LoadString(NOTEPAD_STR_HELP));
|
||||
if( !readonly ) { AppendMenu(hMenu,MF_POPUP,(UINT)hSMApropos,Notepad_LoadString(NOTEPAD_STR_HELP)); }
|
||||
|
||||
//hwnd = CreateWindow(Notepad_szprogname, Notepad_szprogname, WS_OVERLAPPEDWINDOW,CW_USEDEFAULT, CW_USEDEFAULT, cxScreen, cyScreen, NULL, hMenu, hinstance, NULL);
|
||||
hwnd = CreateWindowEx(WS_EX_ACCEPTFILES,Notepad_szprogname, Notepad_szprogname, WS_OVERLAPPEDWINDOW,CW_USEDEFAULT, CW_USEDEFAULT, (int)cxScreen/2, (int)cyScreen/2, NULL, hMenu, hinstance, NULL);
|
||||
@@ -194,11 +204,10 @@ LRESULT CALLBACK Notepad_WndProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lPa
|
||||
switch (uMsg) {
|
||||
case WM_CREATE: {
|
||||
|
||||
if( (LoadFile!=NULL)&&(strlen(LoadFile)>0)&&(!strcmp(LoadFile,"2")) ) {
|
||||
if( readonly ) {
|
||||
hEdit = CreateWindow("edit", "", WS_CHILD | WS_VISIBLE | ES_READONLY |
|
||||
ES_MULTILINE | ES_WANTRETURN | WS_VSCROLL,
|
||||
0, 0, 0, 0, hwnd, NULL, notepad_hinst, NULL);
|
||||
strcpy(LoadFile,"1");
|
||||
} else {
|
||||
hEdit = CreateWindow("edit", "", WS_CHILD | WS_VISIBLE |
|
||||
ES_MULTILINE | ES_WANTRETURN | WS_VSCROLL,
|
||||
|
||||
+1
-1
@@ -49,5 +49,5 @@ BEGIN
|
||||
|
||||
NOTEPAD_FILE_FILTER "Text files, (*.txt, *.ini)|*.txt;*.ini|C/C++ files, (*.c, *.cpp, *.h, *.rc)|*.c;*.cpp;*.h;*.rc|Script files, (*.ksh, *.sh)|*.ksh;*.sh\0SQL files, (*.sql)|*.sql|All files, (*.*)|*.*\0"
|
||||
|
||||
NOTEPAD_STR_LICENCE " mNotepad 1.0\nwritten by Cyd, 2016, for the Telnet/SSH client TTY"
|
||||
NOTEPAD_STR_LICENCE " mNotepad 1.0\nwritten by Cyd, 2020, for the Telnet/SSH client TTY"
|
||||
END
|
||||
|
||||
Binary file not shown.
+19
-9
@@ -1,3 +1,4 @@
|
||||
|
||||
<div style="text-align: center;"><iframe src="gad.html" frameborder="0" scrolling="no" style="border: 1px solid gray; padding: 0; overflow:hidden; scrolling: no; top:0; left: 0; width: 100%;" onload="this.style.height=(this.contentWindow.document.body.scrollHeight+5)+'px';"></iframe></div>
|
||||
## About cygtermd, the PuTTYCyg workaround
|
||||
|
||||
@@ -12,35 +13,44 @@ Download it and put it into your **/bin** Cygwin directory.
|
||||
|
||||
This feature is also available directly from the command-line. Once the **cygtermd.exe** is put into the **Cygwin** directory just call this command:
|
||||
```
|
||||
kitty.exe -localproxy 'C:\cygwin64\bin\cygtermd.exe /home/cyd /bin/bash -login' localhost
|
||||
kitty.exe -localproxy "C:\cygwin64\bin\cygtermd.exe /home/%USERNAME% /bin/bash -login" localhost
|
||||
```
|
||||
|
||||
Adapt **C:\cygwin64\bin\cygtermd.exe** and **/home/cyd** with your own settings. You must provide a target hostname (ex: localhost) even if it is not used in this situation.
|
||||
|
||||
Adapt **C:\cygwin64\bin\cygtermd.exe** if it has been installed to a different directory. You must provide a target hostname (ex: localhost) even if it is not used in this situation.
|
||||
|
||||
If you are running this command from PowerShell rather than a Windows shortcut, Start➡Run, or a regular command prompt, you should use single quotes instead of double quotes.
|
||||
```
|
||||
kitty.exe -localproxy 'C:\cygwin64\bin\cygtermd.exe /home/%USERNAME% /bin/bash -login' localhost
|
||||
```
|
||||
|
||||
### Start a **CMD.EXE** into a **KiTTY** terminal
|
||||
|
||||
It is possible to start directly the Windows command line utility **cmd.exe**:
|
||||
```
|
||||
kitty.exe -localproxy 'C:\cygwin64\bin\cygtermd.exe /cygdrive/c/Windows /cygdrive/c/Windows/System32/cmd.exe' localhost
|
||||
kitty.exe -localproxy "C:\cygwin64\bin\cygtermd.exe /cygdrive/c/Windows /cygdrive/c/Windows/System32/cmd.exe" localhost
|
||||
```
|
||||
Don't forget to choose the rigth codepage in translation tab or use the **-codepage** command line option.
|
||||
Don't forget to choose the right codepage in translation tab or use the **-codepage** command line option.
|
||||
|
||||
It si not necessary to have the full **Cygwin** environment to do this. Just add the **cygtermd.exe** file and the corresponding **cygwin1.dll** library next the **kitty.exe** binary.
|
||||
It is not necessary to have the full **Cygwin** environment to do this. Just add the **cygtermd.exe** file and the corresponding **cygwin1.dll** library next the **kitty.exe** binary.
|
||||
|
||||
|
||||
### Use **winpty** to start **cmd.exe** or ** PowerShell** Windows utilities
|
||||
|
||||
It is also possible to start the Windows command line utility **cmd.exe** from de [winpty tool](https://github.com/rprichard/winpty):
|
||||
It is also possible to start the Windows command line utility **cmd.exe** from the [winpty tool](https://github.com/rprichard/winpty):
|
||||
Get it and unzip it into your **/usr** Cygwin directory.
|
||||
Then run
|
||||
```
|
||||
kitty.exe -localproxy 'C:\cygwin64\bin\cygtermd.exe /cygdrive/c/Windows /usr/bin/winpty.exe /cygdrive/c/Windows/System32/cmd.exe' localhost
|
||||
kitty.exe -localproxy "C:\cygwin64\bin\cygtermd.exe /usr/bin/winpty.exe C:\Windows\System32\cmd.exe" localhost
|
||||
```
|
||||
|
||||
And now use it to run **PowerShell**:
|
||||
```
|
||||
kitty.exe -localproxy 'C:\cygwin64\bin\cygtermd.exe /cygdrive/c /usr/bin/winpty.exe /cygdrive/c/Windows/System32/WindowsPowerShell/v1.0/powershell.exe' localhost
|
||||
kitty.exe -localproxy "C:\cygwin64\bin\cygtermd.exe /usr/bin/winpty.exe C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe" localhost
|
||||
```
|
||||
|
||||
or **PowerShell 7**:
|
||||
```
|
||||
kitty.exe -localproxy "C:\cygwin64\bin\cygtermd.exe /usr/bin/winpty.exe C:\Program Files\PowerShell\7\pwsh.exe" localhost
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
+1
-1
@@ -1 +1 @@
|
||||
0.74.3.2
|
||||
0.74.3.3
|
||||
@@ -5010,12 +5010,12 @@ int ManageShortcuts( HWND hwnd, const int* clips_system, int key_num, int shift_
|
||||
|
||||
if( key == shortcuts_tab.editor ) { // Lancement d'un putty-ed
|
||||
if( debug_flag ) { debug_logevent( "Start empty internal editor" ) ; }
|
||||
RunPuttyEd( hwnd, NULL, false ) ;
|
||||
RunPuttyEd( hwnd, NULL ) ;
|
||||
return 1 ;
|
||||
}
|
||||
if( key == (shortcuts_tab.editorclipboard ) ) { // Lancement d'un putty-ed qui charge le contenu du presse-papier
|
||||
if( debug_flag ) { debug_logevent( "Start internal editor fullfiled with clipboard" ) ; }
|
||||
term_copyall(term,clips_system,lenof(clips_system)) ; RunPuttyEd( hwnd, "1", false ) ;
|
||||
term_copyall(term,clips_system,lenof(clips_system)) ; RunPuttyEd( hwnd, "1" ) ;
|
||||
return 1 ;
|
||||
} else if( key == shortcuts_tab.winscp ) { // Lancement de WinSCP
|
||||
SendMessage( hwnd, WM_COMMAND, IDM_WINSCP, 0 ) ; return 1 ;
|
||||
|
||||
+8
-8
@@ -396,17 +396,17 @@ void RunCommand( HWND hwnd, const char * cmd ) {
|
||||
}
|
||||
}
|
||||
|
||||
void RunPuttyEd( HWND hwnd, char * filename, bool readonly ) {
|
||||
void RunPuttyEd( HWND hwnd, char * filename ) {
|
||||
char buffer[1024]="", shortname[1024]="" ;
|
||||
if( GetModuleFileName( NULL, (LPTSTR)buffer, 1023 ) ) if( GetShortPathName( buffer, shortname, 1023 ) ) {
|
||||
strcat( shortname, " -ed" );
|
||||
if( filename!=NULL ) if( strlen(filename)>0 ) {
|
||||
strcat( shortname, "b " ) ;
|
||||
strcat( shortname, filename ) ;
|
||||
}
|
||||
debug_logevent( shortname ) ;
|
||||
RunCommand( hwnd, shortname ) ;
|
||||
strcat( shortname, " -ed" );
|
||||
if( filename!=NULL ) if( strlen(filename)>0 ) {
|
||||
strcat( shortname, "b " ) ;
|
||||
strcat( shortname, filename ) ;
|
||||
}
|
||||
debug_logevent( shortname ) ;
|
||||
RunCommand( hwnd, shortname ) ;
|
||||
}
|
||||
}
|
||||
|
||||
// Verifie si une mise a jour est disponible sur le site web
|
||||
|
||||
+1
-1
@@ -29,7 +29,7 @@ int SetTextToClipboard( const char * buf ) ;
|
||||
void RunCommand( HWND hwnd, const char * cmd ) ;
|
||||
|
||||
// Démarre l'éditeur embarqué
|
||||
void RunPuttyEd( HWND hwnd, char * filename, bool readonly ) ;
|
||||
void RunPuttyEd( HWND hwnd, char * filename ) ;
|
||||
|
||||
// Verifie si une mise a jour est disponible sur le site web
|
||||
void CheckVersionFromWebSite( HWND hwnd ) ;
|
||||
|
||||
Reference in New Issue
Block a user