diff -ur unzip550.org/process.c unzip550/process.c --- unzip550.org/process.c Thu Dec 27 17:24:44 2001 +++ unzip550/process.c Sun Dec 1 12:19:56 2002 @@ -35,6 +35,10 @@ # include "windll/windll.h" # endif #endif +#ifdef WIN32 +#include +#include +#endif static int do_seekable OF((__GPRO__ int lastchance)); static int find_ecrec OF((__GPRO__ long searchlen)); @@ -294,6 +298,20 @@ G.zipfn)); } #ifdef CHEAP_SFX_AUTORUN +#ifdef CHEAP_SFX_AUTORUN_NOPROMPT +#ifdef WIN32 +#define TMPCONSOLETITLE "tempsxfwindow" + { /* identify and hide this window while installer runs */ + HWND hWnd; + SetConsoleTitle(TMPCONSOLETITLE); + Sleep(40); /* from MSDN Article ID: Q124103 */ + hWnd=FindWindow(NULL, TMPCONSOLETITLE); + SetConsoleTitle(G.argv0); + ShowWindow(hWnd, SW_HIDE); + } +#endif /* WIN32 */ + system(G.autorun_command); +#else /* autorun with prompt */ if (G.autorun_command[0] && !uO.qflag) { /* NO autorun without prompt! */ Info(slide, 0x81, ((char *)slide, LoadFarString(AutorunPrompt), FnFilter1(G.autorun_command))); @@ -303,6 +321,7 @@ else Info(slide, 1, ((char *)slide, LoadFarString(NotAutoRunning))); } +#endif /* CHEAP_SFX_AUTORUN_NOPROMPT */ #endif /* CHEAP_SFX_AUTORUN */ #else /* !SFX */ diff -ur unzip550.org/win32/Makefile.gcc unzip550/win32/Makefile.gcc --- unzip550.org/win32/Makefile.gcc Sat Nov 10 22:40:16 2001 +++ unzip550/win32/Makefile.gcc Sun Dec 1 13:26:28 2002 @@ -65,7 +65,7 @@ CC_OUT_OPT = -o # Other specific options -CC_SPECIFIC_OPT = -c -DASM_CRC -DWIN32 +CC_SPECIFIC_OPT = -c -DASM_CRC -DWIN32 -DCHEAP_SFX_AUTORUN -DCHEAP_SFX_AUTORUN_NOPROMPT AS_SPECIFIC_OPT = -c LD_SPECIFIC_OPT = -o $@ @@ -133,7 +133,7 @@ OBJX1 = unzipsfx$(OBJ) crc32x$(OBJ) crctabx$(OBJ) cryptx$(OBJ) extractx$(OBJ) OBJX2 = fileiox$(OBJ) globalsx$(OBJ) inflatex$(OBJ) matchx$(OBJ) processx$(OBJ) OBJX3 = ttyiox$(OBJ) -OBJXS = win32x$(OBJ) ntx$(OBJ) +OBJXS = win32x$(OBJ) ntx$(OBJ) unzipsfxrc$(OBJ) OBJX = $(OBJX1) $(OBJX2) $(OBJX3) $(OBJA) $(OBJXS) OBJF1 = funzip$(OBJ) crc32$(OBJ) cryptf$(OBJ) globalsf$(OBJ) inflatef$(OBJ) OBJF2 = ttyiof$(OBJ) @@ -393,6 +393,8 @@ sfxwizrc$(OBJ): windll/guisfx/sfxwiz.rc - $(RC) --include-dir windll/guisfx --define WIN32 -o$@ \ windll/guisfx/sfxwiz.rc +unzipsfxrc$(OBJ): unzipsfx.rc + - $(RC) -o $@ $< # Static LIB compilation section apib$(OBJ): api.c $(UNZIP_H) $(WINDLL_H) unzvers.h