applied patch #1334155 - zip2exe: checkbox for solid compression
git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@4336 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
parent
d6145f7e0f
commit
a9c8f27cb3
4 changed files with 33 additions and 17 deletions
|
@ -5,12 +5,19 @@ OutFile "${ZIP2EXE_OUTFILE}"
|
||||||
|
|
||||||
AllowRootDirInstall true
|
AllowRootDirInstall true
|
||||||
|
|
||||||
|
|
||||||
|
!ifdef ZIP2EXE_COMPRESSOR_SOLID
|
||||||
|
!define SETCOMPRESSOR_SWITCH /SOLID
|
||||||
|
!else
|
||||||
|
!define SETCOMPRESSOR_SWITCH
|
||||||
|
!endif
|
||||||
|
|
||||||
!ifdef ZIP2EXE_COMPRESSOR_ZLIB
|
!ifdef ZIP2EXE_COMPRESSOR_ZLIB
|
||||||
SetCompressor zlib
|
SetCompressor ${SETCOMPRESSOR_SWITCH} zlib
|
||||||
!else ifdef ZIP2EXE_COMPRESSOR_BZIP2
|
!else ifdef ZIP2EXE_COMPRESSOR_BZIP2
|
||||||
SetCompressor bzip2
|
SetCompressor ${SETCOMPRESSOR_SWITCH} bzip2
|
||||||
!else ifdef ZIP2EXE_COMPRESSOR_LZMA
|
!else ifdef ZIP2EXE_COMPRESSOR_LZMA
|
||||||
SetCompressor lzma
|
SetCompressor ${SETCOMPRESSOR_SWITCH} lzma
|
||||||
!endif
|
!endif
|
||||||
|
|
||||||
!ifdef ZIP2EXE_INSTALLDIR
|
!ifdef ZIP2EXE_INSTALLDIR
|
||||||
|
|
|
@ -37,6 +37,7 @@ HANDLE g_hThread;
|
||||||
char g_cmdline[1024];
|
char g_cmdline[1024];
|
||||||
int g_extracting;
|
int g_extracting;
|
||||||
int g_compressor;
|
int g_compressor;
|
||||||
|
int g_compressor_solid;
|
||||||
int g_mui;
|
int g_mui;
|
||||||
int g_zipfile_size;
|
int g_zipfile_size;
|
||||||
|
|
||||||
|
@ -463,6 +464,8 @@ void makeEXE(HWND hwndDlg)
|
||||||
fprintf(fp,"!define ZIP2EXE_COMPRESSOR_BZIP2\n");
|
fprintf(fp,"!define ZIP2EXE_COMPRESSOR_BZIP2\n");
|
||||||
if (g_compressor == 3)
|
if (g_compressor == 3)
|
||||||
fprintf(fp,"!define ZIP2EXE_COMPRESSOR_LZMA\n");
|
fprintf(fp,"!define ZIP2EXE_COMPRESSOR_LZMA\n");
|
||||||
|
if (g_compressor_solid == 1)
|
||||||
|
fprintf(fp,"!define ZIP2EXE_COMPRESSOR_SOLID\n");
|
||||||
GetDlgItemText(hwndDlg,IDC_INSTPATH,buf,sizeof(buf));
|
GetDlgItemText(hwndDlg,IDC_INSTPATH,buf,sizeof(buf));
|
||||||
char *outpath = "$INSTDIR";
|
char *outpath = "$INSTDIR";
|
||||||
int iswinamp=0;
|
int iswinamp=0;
|
||||||
|
@ -557,7 +560,7 @@ void makeEXE(HWND hwndDlg)
|
||||||
BOOL CALLBACK DlgProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
BOOL CALLBACK DlgProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
||||||
{
|
{
|
||||||
static int ids[]={IDC_INFO,IDC_NSISICON,IDC_SZIPFRAME,IDC_BROWSE,IDC_ZIPFILE,IDC_ZIPINFO_SUMMARY,IDC_ZIPINFO_FILES,IDC_OFRAME,IDC_INAMEST,
|
static int ids[]={IDC_INFO,IDC_NSISICON,IDC_SZIPFRAME,IDC_BROWSE,IDC_ZIPFILE,IDC_ZIPINFO_SUMMARY,IDC_ZIPINFO_FILES,IDC_OFRAME,IDC_INAMEST,
|
||||||
IDC_INSTNAME,IDC_INSTPATH,IDC_OEFST,IDC_OUTFILE,IDC_BROWSE2,IDC_COMPRESSOR,IDC_ZLIB,IDC_BZIP2,IDC_LZMA,IDC_INTERFACE,IDC_MODERNUI,IDC_CLASSICUI};
|
IDC_INSTNAME,IDC_INSTPATH,IDC_OEFST,IDC_OUTFILE,IDC_BROWSE2,IDC_COMPRESSOR,IDC_ZLIB,IDC_BZIP2,IDC_LZMA,IDC_SOLID,IDC_INTERFACE,IDC_MODERNUI,IDC_CLASSICUI};
|
||||||
static HICON hIcon;
|
static HICON hIcon;
|
||||||
static HFONT hFont;
|
static HFONT hFont;
|
||||||
if (uMsg == WM_DESTROY) { if (hIcon) DeleteObject(hIcon); hIcon=0; if (hFont) DeleteObject(hFont); hFont=0; }
|
if (uMsg == WM_DESTROY) { if (hIcon) DeleteObject(hIcon); hIcon=0; if (hFont) DeleteObject(hFont); hFont=0; }
|
||||||
|
@ -709,6 +712,10 @@ BOOL CALLBACK DlgProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
||||||
g_compressor = 2;
|
g_compressor = 2;
|
||||||
if (IsDlgButtonChecked(hwndDlg,IDC_LZMA))
|
if (IsDlgButtonChecked(hwndDlg,IDC_LZMA))
|
||||||
g_compressor = 3;
|
g_compressor = 3;
|
||||||
|
if (IsDlgButtonChecked(hwndDlg,IDC_SOLID))
|
||||||
|
g_compressor_solid = 1;
|
||||||
|
else
|
||||||
|
g_compressor_solid = 0;
|
||||||
g_mui=!IsDlgButtonChecked(hwndDlg,IDC_CLASSICUI);
|
g_mui=!IsDlgButtonChecked(hwndDlg,IDC_CLASSICUI);
|
||||||
SetDlgItemText(g_hwnd, IDC_OUTPUTTEXT, "");
|
SetDlgItemText(g_hwnd, IDC_OUTPUTTEXT, "");
|
||||||
int x;
|
int x;
|
||||||
|
|
|
@ -62,6 +62,8 @@ BEGIN
|
||||||
10
|
10
|
||||||
CONTROL "ZLib",IDC_ZLIB,"Button",BS_AUTORADIOBUTTON,186,228,30,
|
CONTROL "ZLib",IDC_ZLIB,"Button",BS_AUTORADIOBUTTON,186,228,30,
|
||||||
10
|
10
|
||||||
|
CONTROL "Solid",IDC_SOLID,"Button",BS_AUTOCHECKBOX,240,228,30,
|
||||||
|
10
|
||||||
DEFPUSHBUTTON "&Generate",IDOK,306,252,48,14,WS_DISABLED
|
DEFPUSHBUTTON "&Generate",IDOK,306,252,48,14,WS_DISABLED
|
||||||
PUSHBUTTON "&Test",IDC_TEST,246,252,49,14,NOT WS_VISIBLE
|
PUSHBUTTON "&Test",IDC_TEST,246,252,49,14,NOT WS_VISIBLE
|
||||||
PUSHBUTTON "< &Back",IDC_BACK,6,252,48,14,NOT WS_VISIBLE
|
PUSHBUTTON "< &Back",IDC_BACK,6,252,48,14,NOT WS_VISIBLE
|
||||||
|
|
|
@ -30,8 +30,8 @@
|
||||||
#define IDC_CLASSICUI 1025
|
#define IDC_CLASSICUI 1025
|
||||||
#define IDC_INFO 1026
|
#define IDC_INFO 1026
|
||||||
#define IDC_NSISICON 1027
|
#define IDC_NSISICON 1027
|
||||||
#define IDC_BZIP3 1028
|
|
||||||
#define IDC_LZMA 1028
|
#define IDC_LZMA 1028
|
||||||
|
#define IDC_SOLID 1029
|
||||||
|
|
||||||
// Next default values for new objects
|
// Next default values for new objects
|
||||||
//
|
//
|
||||||
|
@ -39,7 +39,7 @@
|
||||||
#ifndef APSTUDIO_READONLY_SYMBOLS
|
#ifndef APSTUDIO_READONLY_SYMBOLS
|
||||||
#define _APS_NEXT_RESOURCE_VALUE 103
|
#define _APS_NEXT_RESOURCE_VALUE 103
|
||||||
#define _APS_NEXT_COMMAND_VALUE 40001
|
#define _APS_NEXT_COMMAND_VALUE 40001
|
||||||
#define _APS_NEXT_CONTROL_VALUE 1028
|
#define _APS_NEXT_CONTROL_VALUE 1030
|
||||||
#define _APS_NEXT_SYMED_VALUE 101
|
#define _APS_NEXT_SYMED_VALUE 101
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue