Added a Check for Update command
git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@1378 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
parent
33590cb263
commit
31f8651abf
6 changed files with 17 additions and 2 deletions
|
@ -161,6 +161,7 @@ Version History
|
||||||
- Ctrl+L loads a script
|
- Ctrl+L loads a script
|
||||||
- Added Clear Log (Ctrl+W)
|
- Added Clear Log (Ctrl+W)
|
||||||
- Browse Script (Ctrl+B) launches explorer in script directory
|
- Browse Script (Ctrl+B) launches explorer in script directory
|
||||||
|
- Check for Update command
|
||||||
- Bunch of other stuff not worth mentioning
|
- Bunch of other stuff not worth mentioning
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -209,6 +209,14 @@ BOOL CALLBACK DialogProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam) {
|
||||||
}
|
}
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
case IDM_UPDATE:
|
||||||
|
{
|
||||||
|
char b[100];
|
||||||
|
lstrcpy(b,NSIS_UPDATE);
|
||||||
|
lstrcat(b,g_sdata.brandingv);
|
||||||
|
ShellExecute(g_sdata.hwnd,"open",b,NULL,NULL,SW_SHOWNORMAL);
|
||||||
|
break;
|
||||||
|
}
|
||||||
case IDM_ABOUT:
|
case IDM_ABOUT:
|
||||||
{
|
{
|
||||||
DialogBox(g_sdata.hInstance,MAKEINTRESOURCE(DLG_ABOUT),g_sdata.hwnd,(DLGPROC)AboutProc);
|
DialogBox(g_sdata.hInstance,MAKEINTRESOURCE(DLG_ABOUT),g_sdata.hwnd,(DLGPROC)AboutProc);
|
||||||
|
|
|
@ -32,6 +32,7 @@
|
||||||
// Defines
|
// Defines
|
||||||
#define NSIS_DEV "http://nsis.sourceforge.net/"
|
#define NSIS_DEV "http://nsis.sourceforge.net/"
|
||||||
#define NSIS_URL "http://www.nullsoft.com/free/nsis/"
|
#define NSIS_URL "http://www.nullsoft.com/free/nsis/"
|
||||||
|
#define NSIS_UPDATE "http://nsis.sourceforge.net/update.php?version="
|
||||||
#define USAGE "Usage:\r\n\r\n - File | Load Script...\r\n - Drag the .nsi file into this window\r\n - Right click the .nsi file and choose \"Compile NSI\""
|
#define USAGE "Usage:\r\n\r\n - File | Load Script...\r\n - Drag the .nsi file into this window\r\n - Right click the .nsi file and choose \"Compile NSI\""
|
||||||
#define COPYRIGHT "Copyright © 2002 Robert Rainwater"
|
#define COPYRIGHT "Copyright © 2002 Robert Rainwater"
|
||||||
#define CONTRIB "Fritz Elfert, Justin Frankel, Amir Szekely"
|
#define CONTRIB "Fritz Elfert, Justin Frankel, Amir Szekely"
|
||||||
|
@ -69,6 +70,7 @@ typedef struct NSISScriptData {
|
||||||
char *output_exe;
|
char *output_exe;
|
||||||
char *input_script;
|
char *input_script;
|
||||||
char *branding;
|
char *branding;
|
||||||
|
char *brandingv;
|
||||||
int retcode;
|
int retcode;
|
||||||
DWORD logLength;
|
DWORD logLength;
|
||||||
BOOL warnings;
|
BOOL warnings;
|
||||||
|
|
|
@ -35,13 +35,14 @@
|
||||||
#define IDM_CLEARLOG 40009
|
#define IDM_CLEARLOG 40009
|
||||||
#define IDM_BROWSESCR 40013
|
#define IDM_BROWSESCR 40013
|
||||||
#define IDM_NSISDEV 40014
|
#define IDM_NSISDEV 40014
|
||||||
|
#define IDM_UPDATE 40015
|
||||||
|
|
||||||
// Next default values for new objects
|
// Next default values for new objects
|
||||||
//
|
//
|
||||||
#ifdef APSTUDIO_INVOKED
|
#ifdef APSTUDIO_INVOKED
|
||||||
#ifndef APSTUDIO_READONLY_SYMBOLS
|
#ifndef APSTUDIO_READONLY_SYMBOLS
|
||||||
#define _APS_NEXT_RESOURCE_VALUE 116
|
#define _APS_NEXT_RESOURCE_VALUE 116
|
||||||
#define _APS_NEXT_COMMAND_VALUE 40015
|
#define _APS_NEXT_COMMAND_VALUE 40016
|
||||||
#define _APS_NEXT_CONTROL_VALUE 1017
|
#define _APS_NEXT_CONTROL_VALUE 1017
|
||||||
#define _APS_NEXT_SYMED_VALUE 101
|
#define _APS_NEXT_SYMED_VALUE 101
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -86,8 +86,9 @@ BEGIN
|
||||||
MENUITEM "&Test Installer\tCtrl+T", IDM_TEST
|
MENUITEM "&Test Installer\tCtrl+T", IDM_TEST
|
||||||
MENUITEM "Edit Script\tCtrl+E", IDM_EDITSCRIPT
|
MENUITEM "Edit Script\tCtrl+E", IDM_EDITSCRIPT
|
||||||
MENUITEM "Browse Script\tCtrl+B", IDM_BROWSESCR
|
MENUITEM "Browse Script\tCtrl+B", IDM_BROWSESCR
|
||||||
MENUITEM SEPARATOR
|
|
||||||
MENUITEM "Clear &Log Window\tCtrl+W", IDM_CLEARLOG
|
MENUITEM "Clear &Log Window\tCtrl+W", IDM_CLEARLOG
|
||||||
|
MENUITEM SEPARATOR
|
||||||
|
MENUITEM "Check for &Upgrade", IDM_UPDATE
|
||||||
END
|
END
|
||||||
POPUP "&Help"
|
POPUP "&Help"
|
||||||
BEGIN
|
BEGIN
|
||||||
|
|
|
@ -253,6 +253,8 @@ int InitBranding() {
|
||||||
if (lstrlen(szBuf)==0) return 0;
|
if (lstrlen(szBuf)==0) return 0;
|
||||||
g_sdata.branding = (char *)GlobalAlloc(GPTR,lstrlen(szBuf)+6);
|
g_sdata.branding = (char *)GlobalAlloc(GPTR,lstrlen(szBuf)+6);
|
||||||
wsprintf(g_sdata.branding,"NSIS %s",szBuf);
|
wsprintf(g_sdata.branding,"NSIS %s",szBuf);
|
||||||
|
g_sdata.brandingv = (char *)GlobalAlloc(GPTR,lstrlen(szBuf)+1);
|
||||||
|
lstrcpy(g_sdata.brandingv,szBuf);
|
||||||
GlobalFree(s);
|
GlobalFree(s);
|
||||||
}
|
}
|
||||||
return 1;
|
return 1;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue