source: trunk/is_gsdl_cdrom/Script Files/setup.rul@ 2828

Last change on this file since 2828 was 2828, checked in by sjboddie, 22 years ago

* empty log message *

  • Property svn:keywords set to Author Date Id Revision
File size: 21.7 KB
Line 
1
2////////////////////////////////////////////////////////////////////////////////
3//
4// IIIIIII SSSSSS
5// II SS InstallShield (R)
6// II SSSSSS (c) 1996-1997, InstallShield Software Corporation
7// II SS (c) 1990-1996, InstallShield Corporation
8// IIIIIII SSSSSS All Rights Reserved.
9//
10//
11// This code is generated as a starting setup template. You should
12// modify it to provide all necessary steps for your setup.
13//
14//
15// File Name: Setup.rul
16//
17// Description: InstallShield script
18//
19// Comments: This template script performs a basic setup. With minor
20// modifications, this template can be adapted to create
21// new, customized setups.
22//
23////////////////////////////////////////////////////////////////////////////////
24
25
26// Include header files
27
28 #include "sdlang.h"
29 #include "sddialog.h"
30
31////////////////////// string defines ////////////////////////////
32
33 #define UNINST_LOGFILE_NAME "Uninst.isu"
34
35//////////////////// installation declarations ///////////////////
36
37// ----- DLL function prototypes -----
38
39
40 // your DLL function prototypes
41
42
43// ---- script function prototypes -----
44
45 // generated by the Project Wizard
46 prototype ShowDialogs();
47 prototype MoveFileData();
48 prototype HandleMoveDataError( NUMBER );
49 prototype ProcessBeforeDataMove();
50 prototype ProcessAfterDataMove();
51 prototype SetupRegistry();
52 prototype SetupFolders();
53 prototype CleanUpInstall();
54 prototype SetupInstall();
55 prototype SetupScreen();
56 prototype CheckRequirements();
57 prototype DialogShowSdLicense();
58 prototype DialogShowSdFinishReboot();
59
60 // your script function prototypes
61 prototype DialogGreenstoneInstallationType();
62 prototype DialogSetupType();
63 prototype DialogSelectCollections();
64 prototype DialogGetAdminPassword();
65 prototype SetComponents();
66 prototype SetAdminPassword();
67 prototype CheckWin32s();
68 prototype CreateServerTxt();
69 prototype EditGsdlsiteCfg();
70 prototype EditSetupBat();
71 prototype rs(BYREF STRING);
72
73 // ----- global variables ------
74
75 // generated by the Project Wizard
76 BOOL bWinNT, bIsShellExplorer, bInstallAborted, bIs32BitSetup;
77 STRING svDir;
78 STRING svName, svCompany, svSerial;
79 STRING svDefGroup;
80 STRING szAppPath;
81 STRING svSetupType;
82
83
84 // your global variables
85 BOOL bCompact;
86 STRING svAdminPassword, svLogFile;
87
88///////////////////////////////////////////////////////////////////////////////
89//
90// MAIN PROGRAM
91//
92// The setup begins here by hiding the visible setup
93// window. This is done to allow all the titles, images, etc. to
94// be established before showing the main window. The setup is
95// then performed in a series of calls to script defined functions,
96// with error checking at each step.
97//
98///////////////////////////////////////////////////////////////////////////////
99program
100 Disable( BACKGROUND );
101
102 CheckRequirements();
103
104 SetupInstall();
105
106 SetupScreen();
107
108 CheckWin32s();
109
110 if (ShowDialogs()<0) goto end_install;
111
112 if (ProcessBeforeDataMove()<0) goto end_install;
113
114 if (MoveFileData()<0) goto end_install;
115
116 if (ProcessAfterDataMove()<0) goto end_install;
117
118 if (SetupRegistry()<0) goto end_install;
119
120 if (SetupFolders()<0) goto end_install;
121
122
123 end_install:
124
125 CleanUpInstall();
126
127 // If an unrecoverable error occurred, clean up
128 // the partial installation. Otherwise, exit normally.
129
130 if (bInstallAborted) then
131 abort;
132 endif;
133
134endprogram
135
136///////////////////////////////////////////////////////////////////////////////
137//
138// Function: ShowDialogs
139//
140// Purpose: This function manages the display and navigation of
141// the standard dialogs that exist in a setup.
142//
143///////////////////////////////////////////////////////////////////////////////
144function ShowDialogs()
145 NUMBER nResult;
146
147begin
148
149 Dlg_Start:
150 // beginning of dialogs label
151
152 Dlg_SdLicense:
153 nResult = DialogShowSdLicense();
154 if (nResult = BACK) goto Dlg_Start;
155
156 if (bIs32BitSetup) then
157
158 Dlg_GreenstoneInstallationType:
159 nResult = DialogGreenstoneInstallationType();
160 if (nResult = BACK) goto Dlg_SdLicense;
161
162 Dlg_SetupType:
163 nResult = DialogSetupType();
164 if (nResult = BACK) goto Dlg_GreenstoneInstallationType;
165
166 endif;
167
168 SetComponents();
169
170 Dlg_SelectCollections:
171 nResult = DialogSelectCollections();
172 if (nResult = BACK) then
173 if (bIs32BitSetup = FALSE) goto Dlg_SdLicense;
174 goto Dlg_SetupType;
175 endif;
176
177 Dlg_GetAdminPassWord:
178 nResult = DialogGetAdminPassword();
179 if (nResult = BACK) goto Dlg_SelectCollections;
180
181 return 0;
182
183end;
184
185///////////////////////////////////////////////////////////////////////////////
186//
187// Function: ProcessBeforeDataMove
188//
189// Purpose: This function performs any necessary operations prior to the
190// actual file transfer.
191//
192///////////////////////////////////////////////////////////////////////////////
193function ProcessBeforeDataMove()
194 NUMBER nResult;
195
196begin
197
198 // Create app information, uninstallation, and App Paths registry keys.
199
200 InstallationInfo( @COMPANY_NAME, @PRODUCT_NAME, @PRODUCT_VERSION, @PRODUCT_KEY );
201
202 svLogFile = UNINST_LOGFILE_NAME;
203
204 nResult = DeinstallStart( svDir, svLogFile, @UNINST_KEY, 0 );
205 if (nResult < 0) then
206 MessageBox( @ERROR_UNINSTSETUP, WARNING );
207 endif;
208
209 szAppPath = TARGETDIR;
210
211 if ((bIs32BitSetup) && (bIsShellExplorer)) then
212 RegDBSetItem( REGDB_APPPATH, szAppPath );
213 RegDBSetItem( REGDB_APPPATH_DEFAULT, szAppPath ^ @PRODUCT_KEY );
214 RegDBSetItem( REGDB_UNINSTALL_NAME, @UNINST_DISPLAY_NAME );
215 endif;
216
217 // TO DO : any other tasks you want to perform before file transfer
218
219 return 0;
220end;
221
222///////////////////////////////////////////////////////////////////////////////
223//
224// Function: MoveFileData
225//
226// Purpose: This function handles the file transfer for
227// the setup.
228//
229///////////////////////////////////////////////////////////////////////////////
230function MoveFileData()
231 NUMBER nResult, nDisk;
232
233begin
234
235 nDisk = 1;
236 SetStatusWindow( 0, "" );
237 Disable( DIALOGCACHE );
238 Enable( STATUS );
239 StatusUpdate( ON, 100 );
240 nResult = ComponentMoveData( MEDIA, nDisk, 0 );
241
242 HandleMoveDataError( nResult );
243
244 Disable( STATUS );
245
246 return nResult;
247
248end;
249
250
251///////////////////////////////////////////////////////////////////////////////
252//
253// Function: HandleMoveDataError
254//
255// Purpose: This function handles the error (if any) during the file transfer
256// operation.
257//
258///////////////////////////////////////////////////////////////////////////////
259function HandleMoveDataError( nResult )
260 STRING szErrMsg, svComponent , svFileGroup , svFile;
261
262begin
263
264 svComponent = "";
265 svFileGroup = "";
266 svFile = "";
267
268 switch (nResult)
269 case 0:
270 return 0;
271 default:
272 ComponentError ( MEDIA , svComponent , svFileGroup , svFile , nResult );
273 szErrMsg = @ERROR_MOVEDATA + "\n\n" +
274 @ERROR_COMPONENT + " " + svComponent + "\n" +
275 @ERROR_FILEGROUP + " " + svFileGroup + "\n" +
276 @ERROR_FILE + " " + svFile;
277 SprintfBox( SEVERE, @TITLE_CAPTIONBAR, szErrMsg, nResult );
278 bInstallAborted = TRUE;
279 return nResult;
280 endswitch;
281
282end;
283
284///////////////////////////////////////////////////////////////////////////////
285//
286// Function: ProcessAfterDataMove
287//
288// Purpose: This function performs any necessary operations needed after
289// all files have been transferred.
290//
291///////////////////////////////////////////////////////////////////////////////
292function ProcessAfterDataMove()
293 STRING szReferenceFile;
294
295begin
296
297 CreateServerTxt();
298 EditGsdlsiteCfg();
299 EditSetupBat();
300 SetAdminPassword();
301
302 szReferenceFile = svDir ^ @PRODUCT_KEY;
303 DeinstallSetReference( szReferenceFile );
304
305 return 0;
306end;
307
308///////////////////////////////////////////////////////////////////////////////
309//
310// Function: SetupRegistry
311//
312// Purpose: This function makes the registry entries for this setup.
313//
314///////////////////////////////////////////////////////////////////////////////
315function SetupRegistry()
316 NUMBER nResult;
317
318begin
319
320 // TO DO : Add all your registry entry keys here.
321 // Call registry functions and/or create keys from
322 // the InstallShield IDE's Resources pane.
323
324 nResult = CreateRegistrySet( "" );
325
326 return nResult;
327 end;
328
329///////////////////////////////////////////////////////////////////////////////
330//
331// Function: SetupFolders
332//
333// Purpose: This function creates all the folders and shortcuts for the
334// setup. This includes program groups and items for Windows 3.1.
335//
336///////////////////////////////////////////////////////////////////////////////
337function SetupFolders()
338 NUMBER nResult;
339 STRING szIsData;
340 NUMBER nType;
341
342begin
343
344 if (Is(USER_ADMINISTRATOR,szIsData)==TRUE) then
345 nType = COMMON;
346 else
347 nType = PERSONAL;
348
349 endif;
350
351 ProgDefGroupType(nType);
352
353 if (CreateProgramFolder(@FOLDER_NAME) < 0) then
354 MessageBox("CreateProgramFolder failed.", SEVERE);
355 endif;
356
357 // The following adds the shortcuts.
358 if (AddFolderIcon(@FOLDER_NAME, @README, "\"" + TARGETDIR ^ "README.TXT\"", "",
359 "", 0, "", REPLACE) < 0) then
360 MessageBox("AddFolderIcon failed.", SEVERE);
361 endif;
362
363 if (AddFolderIcon(@FOLDER_NAME, @TEXT_UNINSTALL, UNINST + " -f\"" + svLogFile + "\"",
364 "", "", 0, "", REPLACE) < 0) then
365 MessageBox("AddFolderIcon failed.", SEVERE);
366 endif;
367
368 if (svSetupType = "Local library") then
369 if (AddFolderIcon(@FOLDER_NAME, @FOLDER_NAME, "\"" + TARGETDIR ^ "server.exe\"", "",
370 "", 0, "", REPLACE) < 0) then
371 MessageBox("AddFolderIcon failed.", SEVERE);
372 endif;
373 endif;
374
375 nResult = CreateShellObjects( "" );
376
377 return nResult;
378 end;
379
380///////////////////////////////////////////////////////////////////////////////
381//
382// Function: CleanUpInstall
383//
384// Purpose: This cleans up the setup. Anything that should
385// be released or deleted at the end of the setup should
386// be done here.
387//
388///////////////////////////////////////////////////////////////////////////////
389function CleanUpInstall()
390
391begin
392
393
394 if (bInstallAborted) then
395 return 0;
396 endif;
397
398 DialogShowSdFinishReboot();
399
400 if (BATCH_INSTALL) then // ensure locked files are properly transferred
401 CommitSharedFiles(0);
402 endif;
403
404 return 0;
405end;
406
407///////////////////////////////////////////////////////////////////////////////
408//
409// Function: SetupInstall
410//
411// Purpose: This will initialize the setup. Any general initialization
412// needed for the installation should be performed here.
413//
414///////////////////////////////////////////////////////////////////////////////
415function SetupInstall()
416
417begin
418
419 Enable( CORECOMPONENTHANDLING );
420
421 bInstallAborted = FALSE;
422
423 svDir = PROGRAMFILES ^ "gsdl";
424 TARGETDIR = svDir;
425
426 SdProductName( @PRODUCT_NAME );
427
428 Enable( DIALOGCACHE );
429
430 return 0;
431end;
432
433///////////////////////////////////////////////////////////////////////////////
434//
435// Function: SetupScreen
436//
437// Purpose: This function establishes the screen look. This includes
438// colors, fonts, and text to be displayed.
439//
440///////////////////////////////////////////////////////////////////////////////
441function SetupScreen()
442
443begin
444
445 Enable( FULLWINDOWMODE );
446 Enable( INDVFILESTATUS );
447 SetTitle( @TITLE_MAIN, 24, WHITE );
448
449 SetTitle( @TITLE_CAPTIONBAR, 0, BACKGROUNDCAPTION ); // Caption bar text.
450
451 Enable( BACKGROUND );
452
453 Delay( 1 );
454end;
455
456///////////////////////////////////////////////////////////////////////////////
457//
458// Function: CheckRequirements
459//
460// Purpose: This function checks all minimum requirements for the
461// application being installed. If any fail, then the user
462// is informed and the setup is terminated.
463//
464///////////////////////////////////////////////////////////////////////////////
465function CheckRequirements()
466 NUMBER nvDx, nvDy, nvResult;
467 STRING svResult;
468
469begin
470
471 bWinNT = FALSE;
472 bIsShellExplorer = FALSE;
473
474 // Check screen resolution.
475 GetExtents( nvDx, nvDy );
476
477 if (nvDy < 480) then
478 MessageBox( @ERROR_VGARESOLUTION, WARNING );
479 abort;
480 endif;
481
482 // set 'setup' operation mode
483 bIs32BitSetup = TRUE;
484 GetSystemInfo( ISTYPE, nvResult, svResult );
485 if (nvResult = 16) then
486 bIs32BitSetup = FALSE; // running 16-bit setup
487 return 0; // no additional information required
488 endif;
489
490 // --- 32-bit testing after this point ---
491
492 // Determine the target system's operating system.
493 GetSystemInfo( OS, nvResult, svResult );
494
495 if (nvResult = IS_WINDOWSNT) then
496 // Running Windows NT.
497 bWinNT = TRUE;
498
499 // Check to see if the shell being used is EXPLORER shell.
500 if (GetSystemInfo( OSMAJOR, nvResult, svResult ) = 0) then
501 if (nvResult >= 4) then
502 bIsShellExplorer = TRUE;
503 endif;
504 endif;
505
506 elseif (nvResult = IS_WINDOWS95) then
507 bIsShellExplorer = TRUE;
508
509 endif;
510
511end;
512
513
514///////////////////////////////////////////////////////////////////////////////
515//
516// Function: DialogShowSdLicense
517//
518// Purpose: This function displays the license agreement dialog.
519//
520//
521///////////////////////////////////////////////////////////////////////////////
522function DialogShowSdLicense()
523 NUMBER nResult;
524 STRING szTitle, szMsg, szQuestion, szLicenseFile;
525
526begin
527
528 szLicenseFile = SUPPORTDIR ^ "license.txt";
529 szTitle = "";
530 szMsg = "";
531 szQuestion = "";
532 nResult = SdLicense( szTitle, szMsg, szQuestion, szLicenseFile );
533
534 return nResult;
535end;
536
537
538///////////////////////////////////////////////////////////////////////////////
539//
540// Function: DialogShowSdFinishReboot
541//
542// Purpose: This function will show the last dialog of the product.
543// It will allow the user to reboot and/or show some readme text.
544//
545///////////////////////////////////////////////////////////////////////////////
546function DialogShowSdFinishReboot()
547 NUMBER nResult, nDefOptions;
548 STRING szTitle, szMsg1, szMsg2, szOption1, szOption2;
549 NUMBER bOpt1, bOpt2;
550
551begin
552
553 szTitle = "";
554
555 if (svSetupType = "Web Library") then
556 szMsg1 = @TEXT_FINISH2;
557 elseif (svSetupType = "Source Code") then
558 szMsg1 = @TEXT_FINISH3;
559 else
560 szMsg1 = @TEXT_FINISH1;
561 endif;
562
563 szMsg2 = "";
564 bOpt1 = TRUE;
565 bOpt2 = FALSE;
566 szOption1 = @TEXT_README;
567 szOption2 = "";
568 nResult = SdFinish(szTitle, szMsg1, szMsg2, szOption1, szOption2, bOpt1, bOpt2);
569
570 if (bOpt1 = TRUE) then
571 LaunchAppAndWait("notepad", TARGETDIR ^ "README.TXT", WAIT);
572 endif;
573
574 return 0;
575
576end;
577
578///////////////////////////////////////////////////////////////////////////////
579//
580//
581//
582///////////////////////////////////////////////////////////////////////////////
583
584
585function DialogGreenstoneInstallationType()
586 NUMBER nResult;
587 STRING szTitle, szMsg;
588
589begin
590
591 szTitle = @TEXT_INSTALL_TYPE;
592 szMsg = @TEXT_INSTALL_TYPE_DESC;
593
594 nResult = SdSetupTypeEx(szTitle, szMsg, "", svSetupType, 0);
595
596 return nResult;
597end;
598
599
600function DialogSetupType()
601 NUMBER nResult, nvCheck1, nvCheck2;
602 STRING szMsg, szText1, szText2;
603
604begin
605
606 nvCheck1 = TRUE;
607 nvCheck2 = FALSE;
608 szMsg = @TEXT_SETUP_TYPE_DESC;
609 szText1 = @TEXT_COMPACT;
610 szText2 = @TEXT_FULL;
611
612 nResult = AskOptions(EXCLUSIVE, szMsg, szText1, nvCheck1, szText2, nvCheck2);
613
614 bCompact = nvCheck1;
615
616 return nResult;
617end;
618
619
620function DialogSelectCollections()
621 NUMBER nResult;
622 STRING szTitle, szMsg;
623
624begin
625
626 szTitle = @TEXT_SELECT_COLLECTIONS;
627 szMsg = @TEXT_SELECT_COLLECTIONS_DESC;
628
629 nResult = SdComponentDialog(szTitle, szMsg, svDir, "collections");
630 TARGETDIR = svDir;
631
632 return nResult;
633end;
634
635
636function DialogGetAdminPassword()
637 STRING szTitle, szMsg, szField1;
638 NUMBER nResult;
639
640begin
641
642 svAdminPassword = "admin"; // the default
643
644 szTitle = @TEXT_ADMIN_PW;
645 szMsg = @TEXT_ADMIN_PW_DESC;
646 szField1 = @TEXT_PW;
647
648 nResult = SdShowDlgEdit1(szTitle, szMsg, szField1, svAdminPassword);
649
650 return nResult;
651end;
652
653
654function SetComponents()
655
656begin
657
658 if (bCompact) then
659 // compact installation
660 ComponentSelectItem(MEDIA, "Documentation", FALSE);
661 ComponentSelectItem(MEDIA, "Export Collection", FALSE);
662
663 else
664 // full installation
665 ComponentSelectItem(MEDIA, "Documentation", TRUE);
666 ComponentSelectItem(MEDIA, "Export Collection", TRUE);
667
668 endif;
669
670 if (bIs32BitSetup) then
671 // Windows 3.1
672 ComponentSelectItem(MEDIA, "Build-time files", FALSE);
673 ComponentSelectItem(MEDIA, "Build-time executables", FALSE);
674
675 endif;
676
677end;
678
679
680function SetAdminPassword()
681
682begin
683
684end;
685
686
687// Create and display the SERVER.TXT file if
688// installing the web library
689function CreateServerTxt()
690 STRING szTitle, szMsg, svTmp;
691 STRING szServerTxt, svCgiBin, svGSDLHOME;
692 LIST listInfo;
693
694begin
695
696 if (svSetupType != "Web Library") then
697 return;
698 endif;
699
700 szServerTxt = TARGETDIR ^ "SERVER.TXT";
701 svCgiBin = TARGETDIR ^ "cgi-bin";
702 svGSDLHOME= TARGETDIR;
703 szTitle = "";
704 szMsg = " ";
705
706 listInfo = ListCreate(STRINGLIST);
707
708 ListAddString(listInfo, @TEXT_SERVERTXT_01, AFTER);
709 ListAddString(listInfo, @TEXT_SERVERTXT_02, AFTER);
710 ListAddString(listInfo, @TEXT_SERVERTXT_03, AFTER);
711 ListAddString(listInfo, " ", AFTER);
712
713 ListAddString(listInfo, @TEXT_SERVERTXT_04, AFTER);
714 ListAddString(listInfo, @TEXT_SERVERTXT_05, AFTER);
715 ListAddString(listInfo, @TEXT_SERVERTXT_06, AFTER);
716 ListAddString(listInfo, @TEXT_SERVERTXT_07, AFTER);
717 ListAddString(listInfo, @TEXT_SERVERTXT_08, AFTER);
718 ListAddString(listInfo, @TEXT_SERVERTXT_09, AFTER);
719 ListAddString(listInfo, " ", AFTER);
720
721 ListAddString(listInfo, @TEXT_SERVERTXT_10, AFTER);
722 Sprintf(svTmp, @TEXT_SERVERTXT_11, szServerTxt);
723 ListAddString(listInfo, svTmp, AFTER);
724 ListAddString(listInfo, " ", AFTER);
725
726 Sprintf(svTmp, @TEXT_SERVERTXT_12, TARGETDIR);
727 ListAddString(listInfo, svTmp, AFTER);
728 ListAddString(listInfo, @TEXT_SERVERTXT_13, AFTER);
729 ListAddString(listInfo, @TEXT_SERVERTXT_14, AFTER);
730 ListAddString(listInfo, @TEXT_SERVERTXT_15, AFTER);
731 Sprintf(svTmp, @TEXT_SERVERTXT_16, svCgiBin);
732 ListAddString(listInfo, svTmp, AFTER);
733 ListAddString(listInfo, @TEXT_SERVERTXT_17, AFTER);
734 ListAddString(listInfo, @TEXT_SERVERTXT_18, AFTER);
735 ListAddString(listInfo, " ", AFTER);
736
737 ListAddString(listInfo, @TEXT_SERVERTXT_19, AFTER);
738 ListAddString(listInfo, @TEXT_SERVERTXT_20, AFTER);
739 ListAddString(listInfo, " ", AFTER);
740
741 rs(svCgiBin);
742 rs(svGSDLHOME);
743
744 ListAddString(listInfo, " ScriptAlias /gsdl/cgi-bin \"" + svCgiBin + "/\"", AFTER);
745 ListAddString(listInfo, " <Directory \"" + svCgiBin + "\">", AFTER);
746 ListAddString(listInfo, " Options None", AFTER);
747 ListAddString(listInfo, " AllowOverride None", AFTER);
748 ListAddString(listInfo, " </Directory>", AFTER);
749 ListAddString(listInfo, " ", AFTER);
750
751 ListAddString(listInfo, " Alias /gsdl \"" + svGSDLHOME + "/\"", AFTER);
752 ListAddString(listInfo, " <Directory \"" + svGSDLHOME + "\">", AFTER);
753 ListAddString(listInfo, " Options Indexes MultiViews FollowSymLinks", AFTER);
754 ListAddString(listInfo, " AllowOverride None", AFTER);
755 ListAddString(listInfo, " Order allow,deny", AFTER);
756 ListAddString(listInfo, " Allow from all", AFTER);
757 ListAddString(listInfo, " </Directory>", AFTER);
758 ListAddString(listInfo, " ", AFTER);
759
760 ListAddString(listInfo, @TEXT_SERVERTXT_21, AFTER);
761 ListAddString(listInfo, @TEXT_SERVERTXT_22, AFTER);
762 ListAddString(listInfo, @TEXT_SERVERTXT_23, AFTER);
763 ListAddString(listInfo, @TEXT_SERVERTXT_24, AFTER);
764 ListAddString(listInfo, " ", AFTER);
765
766 ListAddString(listInfo, @TEXT_SERVERTXT_25, AFTER);
767 ListAddString(listInfo, @TEXT_SERVERTXT_26, AFTER);
768 ListAddString(listInfo, " ", AFTER);
769
770 SdShowInfoList(szTitle, szMsg, listInfo);
771 ListWriteToFile(listInfo, szServerTxt);
772
773 ListDestroy(listInfo);
774
775end;
776
777
778function EditGsdlsiteCfg()
779
780begin
781
782end;
783
784
785function EditSetupBat()
786
787begin
788
789end;
790
791
792function CheckWin32s()
793 STRING szTitle, szMsg, svResult, szInfo, svPath, svVersionNumber;
794 NUMBER nvResult,nResult, nvWin32, nvOSTYPE, nvOLDWIN32S, nvWIN32SINSTALLED;
795
796begin
797
798 if (GetSystemInfo (OS, nvOSTYPE, svResult) < 0) then
799 MessageBox("Couldn't get Operating System info.", SEVERE);
800 endif;
801
802 // get information about win32s
803 nvOLDWIN32S=0;
804 GetSystemInfo (WIN32SINSTALLED, nvWIN32SINSTALLED, svResult);
805 if (nvWIN32SINSTALLED == TRUE) then
806 GetSystemInfo (WIN32SMAJOR, nvWin32, svResult);
807 if (nvWin32 == 0) then
808 nvOLDWIN32S = 1;
809 else
810 GetSystemInfo (WIN32SMINOR, nvWin32, svResult);
811 if (nvWin32 < 30) then
812 nvOLDWIN32S = 1;
813 endif;
814 endif;
815 endif;
816
817 // run Win32s installation if required.
818 if ((nvOSTYPE == IS_WINDOWS) || (nvOSTYPE == IS_WIN32S)) then
819 if ((nvWIN32SINSTALLED == 0)) then
820 if (CreateProgramFolder(@FOLDER_NAME) < 0) then
821 MessageBox("CreateProgramFolder failed.", SEVERE);
822 endif;
823
824 if (AddFolderIcon(@FOLDER_NAME, @INSTALL_GSDL, "\"" + SRCDIR ^ "setup.exe\"", "",
825 "", 0, "", REPLACE) < 0) then
826 MessageBox("AddFolderIcon failed.", SEVERE);
827 endif;
828
829 MessageBox(@TEXT_ERROR_NO_WIN32S, INFORMATION);
830 LaunchApp(SRCDIR ^ "bin" ^ "windows" ^ "win32s" ^ "setup.exe","");
831 exit;
832 else
833 if (nvOLDWIN32S == 1) then
834 MessageBox(@TEXT_ERROR_OLD_WIN32S, INFORMATION);
835 endif;
836 endif;
837 endif;
838end;
839
840// turn any backslashes in string into forward slashes
841function rs (svString)
842 NUMBER i;
843begin
844
845 for i = 0 to StrLength(svString)
846 if (svString[i] = '\\') then
847 svString[i] = '/';
848 endif;
849 endfor;
850
851end;
852
853///////////////////////////////////////////////////////////////////////////////
854//
855//
856//
857///////////////////////////////////////////////////////////////////////////////
858
859// --- include script file section ---
860
861#include "sddialog.rul"
862
863
864
865
866
867
Note: See TracBrowser for help on using the repository browser.