Author: mladen.turk(a)jboss.com
Date: 2008-04-09 02:11:36 -0400 (Wed, 09 Apr 2008)
New Revision: 1539
Modified:
trunk/build/install/installer/main.c
Log:
Use default configuration if not embedded
Modified: trunk/build/install/installer/main.c
===================================================================
--- trunk/build/install/installer/main.c 2008-04-08 13:05:58 UTC (rev 1538)
+++ trunk/build/install/installer/main.c 2008-04-09 06:11:36 UTC (rev 1539)
@@ -867,9 +867,9 @@
StopSplash(HANDLE hHtml)
{
if (IS_INVALID_HANDLE(hHtml))
- return;
+ return;
DHTMLDialogStop(hHtml);
- DHTMLDialogClose(hHtml);
+ DHTMLDialogClose(hHtml);
}
@@ -1074,19 +1074,34 @@
/* Read defaults from embedded config
*/
- bRunScript = pConfig->s_flags[0];
- bMakeTemp = pConfig->s_flags[1];
- selectDest = pConfig->s_flags[2];
- opt_Verbose = pConfig->s_flags[3];
- bShowSplash = pConfig->s_flags[4];
- bShowLicense = pConfig->s_flags[5];
- dwWinTimeout = pConfig->s_iopts[0];
- dwSplTimeout = pConfig->s_iopts[1];
+ if (pConfig->s_flags[0]) {
+ bRunScript = pConfig->s_flags[1];
+ bMakeTemp = pConfig->s_flags[2];
+ selectDest = pConfig->s_flags[3];
+ opt_Verbose = pConfig->s_flags[4];
+ bShowSplash = pConfig->s_flags[5];
+ bShowLicense = pConfig->s_flags[6];
+ dwWinTimeout = pConfig->s_iopts[0];
+ dwSplTimeout = pConfig->s_iopts[1];
+ }
+ else {
+ /* Default config
+ * -q -x -S 0
+ */
+ bRunScript = TRUE;
+ bMakeTemp = TRUE;
+ selectDest = FALSE;
+ opt_Verbose = FALSE;
+ bShowSplash = TRUE;
+ bShowLicense = FALSE;
+ dwWinTimeout = INFINITE;
+ dwSplTimeout = INFINITE;
+ }
if (!GuiInitialize()) {
exit(-1);
}
- while ((ch = getopt(__argc, __argv, "aAd:f:gh:len:p:qQr:s:S:t:T:uvVw:x"))
!= EOF) {
+ while ((ch = getopt(__argc, __argv,
"aAd:Df:gh:lLen:p:qQr:s:S:t:T:uUvVw:xX")) != EOF) {
switch (ch) {
case 'A':
case 'a':
@@ -1112,6 +1127,10 @@
case 'g':
szEulaPage = "/HTML_LGPLMAIN";
break;
+ case 'D':
+ szDest[0] = '~';
+ selectDest = FALSE;
+ break;
case 'd':
if (*optarg == '~') {
szDest[0] = '~';
@@ -1152,6 +1171,9 @@
case 'l':
bShowLicense = TRUE;
break;
+ case 'L':
+ bShowLicense = FALSE;
+ break;
case 'e':
bMerge = TRUE;
break;
@@ -1168,11 +1190,17 @@
dwHtmlHeight = (DWORD)atoi(optarg);
break;
case 'u':
- bMakeTemp = !bMakeTemp;
+ bMakeTemp = TRUE;
break;
+ case 'U':
+ bMakeTemp = FALSE;
+ break;
case 'x':
bRunScript = TRUE;
break;
+ case 'X':
+ bRunScript = FALSE;
+ break;
case '?':
r = EINVAL;
goto cleanup;
@@ -1198,12 +1226,13 @@
}
/* Get original stub size */
GetFileInformationByHandle(hStub, &si);
- pConfig->s_flags[0] = bRunScript;
- pConfig->s_flags[1] = bMakeTemp;
- pConfig->s_flags[2] = selectDest;
- pConfig->s_flags[3] = opt_Verbose;
- pConfig->s_flags[4] = bShowSplash;
- pConfig->s_flags[5] = bShowLicense;
+ pConfig->s_flags[0] = 1;
+ pConfig->s_flags[1] = bRunScript;
+ pConfig->s_flags[2] = bMakeTemp;
+ pConfig->s_flags[3] = selectDest;
+ pConfig->s_flags[4] = opt_Verbose;
+ pConfig->s_flags[5] = bShowSplash;
+ pConfig->s_flags[6] = bShowLicense;
pConfig->s_iopts[0] = dwWinTimeout;
pConfig->s_iopts[1] = dwSplTimeout;
r = MergeConfig(si.nFileSizeLow);
Show replies by date