- best compressor wasn't choosing the best compressed file
- pressing cancel on the compressor dialog now cancels the compilation git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@3331 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
parent
466e93ea11
commit
7893b7e67c
1 changed files with 8 additions and 5 deletions
|
@ -159,7 +159,10 @@ BOOL CALLBACK DialogProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam) {
|
||||||
SetCompressor(g_sdata.default_compressor);
|
SetCompressor(g_sdata.default_compressor);
|
||||||
}
|
}
|
||||||
if(chooseCompressor) {
|
if(chooseCompressor) {
|
||||||
DialogBox(g_sdata.hInstance,MAKEINTRESOURCE(DLG_COMPRESSOR),g_sdata.hwnd,(DLGPROC)CompressorProc);
|
if (DialogBox(g_sdata.hInstance,MAKEINTRESOURCE(DLG_COMPRESSOR),g_sdata.hwnd,(DLGPROC)CompressorProc)) {
|
||||||
|
EnableItems(g_sdata.hwnd);
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
CompileNSISScript();
|
CompileNSISScript();
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
@ -251,7 +254,7 @@ BOOL CALLBACK DialogProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam) {
|
||||||
}
|
}
|
||||||
if(g_sdata.compressor == COMPRESSOR_BEST) {
|
if(g_sdata.compressor == COMPRESSOR_BEST) {
|
||||||
if (g_sdata.retcode==0 && FileExists(g_sdata.output_exe)) {
|
if (g_sdata.retcode==0 && FileExists(g_sdata.output_exe)) {
|
||||||
char temp_file_name[MAX_PATH];
|
char temp_file_name[1024];
|
||||||
wsprintf(temp_file_name,"%s_makensisw_temp",g_sdata.output_exe);
|
wsprintf(temp_file_name,"%s_makensisw_temp",g_sdata.output_exe);
|
||||||
if(!lstrcmpi(g_sdata.compressor_name,compressor_names[(int)COMPRESSOR_SCRIPT+1])) {
|
if(!lstrcmpi(g_sdata.compressor_name,compressor_names[(int)COMPRESSOR_SCRIPT+1])) {
|
||||||
SetCompressorStats();
|
SetCompressorStats();
|
||||||
|
@ -296,7 +299,7 @@ BOOL CALLBACK DialogProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam) {
|
||||||
|
|
||||||
if(thisSize != INVALID_FILE_SIZE) {
|
if(thisSize != INVALID_FILE_SIZE) {
|
||||||
if(prevSize > thisSize) {
|
if(prevSize > thisSize) {
|
||||||
CopyFile(temp_file_name,g_sdata.output_exe,false);
|
CopyFile(g_sdata.output_exe,temp_file_name,false);
|
||||||
SetCompressorStats();
|
SetCompressorStats();
|
||||||
g_sdata.best_compressor_name = g_sdata.compressor_name;
|
g_sdata.best_compressor_name = g_sdata.compressor_name;
|
||||||
}
|
}
|
||||||
|
@ -962,12 +965,12 @@ BOOL CALLBACK CompressorProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lPara
|
||||||
SetCompressor(g_sdata.default_compressor);
|
SetCompressor(g_sdata.default_compressor);
|
||||||
}
|
}
|
||||||
|
|
||||||
EndDialog(hwndDlg, TRUE);
|
EndDialog(hwndDlg, 0);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case IDCANCEL:
|
case IDCANCEL:
|
||||||
{
|
{
|
||||||
EndDialog(hwndDlg, TRUE);
|
EndDialog(hwndDlg, 1);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue