2004-03-25 15:42:07 +00:00
|
|
|
// File principale della installazione Campo32
|
2003-09-05 15:05:16 +00:00
|
|
|
declare
|
|
|
|
// Windows API
|
|
|
|
#include "sddialog.h"
|
|
|
|
#include "WINSUB.H"
|
|
|
|
// Dichiarazioni di costanti per questo script
|
|
|
|
#include "DECLARE.RUL"
|
|
|
|
// File di include con gli ID dei dialog usati in questo script
|
|
|
|
#include "PRADIAGS.H"
|
|
|
|
|
|
|
|
NUMBER nHandle, nResult, nReinstall, nNewInstall;
|
|
|
|
STRING szText, szModifiedPath, szDongle, szInstType,szReinstallPath,szCampoIni;
|
2006-01-09 01:15:53 +00:00
|
|
|
BOOL bSetupStandard, bInstallModules, bInstallEnv, bInstallFirm, bInstallDemo, bInstallDemoData, bInstallNetWrkChk;
|
2003-09-05 15:05:16 +00:00
|
|
|
BOOL bInstallData, bInstallPrg, bUseDongleServer, bInstallServer, bXPServicesInstalled;
|
|
|
|
// Function declarations.
|
|
|
|
prototype _SetupScreen();
|
|
|
|
prototype _CheckRequirements();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//----------------------------------
|
|
|
|
NUMBER nDirection;
|
|
|
|
program
|
|
|
|
|
|
|
|
|
|
|
|
Step_start:
|
|
|
|
//---------------------------------- defaults
|
|
|
|
bSetupStandard = TRUE;
|
|
|
|
nReinstall = 0;
|
|
|
|
nNewInstall = 0;
|
|
|
|
bInstallPrg = TRUE;
|
|
|
|
bInstallData = FALSE;
|
|
|
|
bInstNTEutron = FALSE;
|
|
|
|
bInstNTHardlock = FALSE;
|
|
|
|
bCannotExecute = FALSE;
|
|
|
|
bXPServicesInstalled = FALSE;
|
|
|
|
|
|
|
|
_ProgramPrologue();
|
|
|
|
|
|
|
|
#define SPACE_REQUIRED 120000 // Disk space in bytes.
|
|
|
|
#ifdef __DEMO__
|
2006-01-09 01:15:53 +00:00
|
|
|
#define APP_NAME "Campo Demo"
|
|
|
|
#define PROGRAM_FOLDER_NAME "Campo Demo"
|
2003-09-05 15:05:16 +00:00
|
|
|
#else
|
2006-01-09 01:15:53 +00:00
|
|
|
#define APP_NAME "Campo"
|
|
|
|
#define PROGRAM_FOLDER_NAME "Campo"
|
2003-09-05 15:05:16 +00:00
|
|
|
#endif
|
|
|
|
#define APPBASE_PATH "\\"
|
|
|
|
#define COMPANY_NAME "A.G.A. Informatica srl"
|
2006-01-09 01:15:53 +00:00
|
|
|
#define PRODUCT_NAME "Campo"
|
2004-09-27 08:37:51 +00:00
|
|
|
#define PRODUCT_VERSION "2.2 "
|
2006-01-09 01:15:53 +00:00
|
|
|
|
2003-09-05 15:05:16 +00:00
|
|
|
#define DEINSTALL_KEY "SampleDeinstKey"
|
|
|
|
#define PRODUCT_KEY "ba0.exe"
|
|
|
|
#define DATATYPE_FILE "datatype."
|
|
|
|
|
|
|
|
Disable( BACKGROUND );
|
|
|
|
// Set installation info., which is required for registry entries.
|
|
|
|
InstallationInfo( COMPANY_NAME, PRODUCT_NAME, PRODUCT_VERSION, PRODUCT_KEY );
|
|
|
|
_SetupScreen();
|
|
|
|
Enable( DIALOGCACHE );
|
|
|
|
_CheckRequirements();
|
|
|
|
|
|
|
|
Step_welcome:
|
|
|
|
nDirection=0;
|
|
|
|
Disable( BACKBUTTON );
|
|
|
|
Welcome( "", 0 );
|
|
|
|
Enable( BACKBUTTON );
|
|
|
|
|
|
|
|
Step_setuptype:
|
|
|
|
_SelectSetupType(nDirection);
|
|
|
|
if (nDirection=BACK) then
|
|
|
|
goto Step_welcome;
|
|
|
|
endif ;
|
|
|
|
|
|
|
|
Step_license:
|
|
|
|
#ifndef __DEMO__
|
|
|
|
szText=SRCDIR ^ "licenza.txt";
|
|
|
|
nDirection=SdLicense( "","","",szText);
|
|
|
|
#endif
|
|
|
|
if nDirection=BACK then
|
|
|
|
goto Step_setuptype;
|
|
|
|
endif;
|
|
|
|
|
|
|
|
Step_chooseinst:
|
|
|
|
_SelectSetupMode(nDirection);
|
|
|
|
if (nDirection=BACK) then
|
|
|
|
goto Step_license;
|
|
|
|
endif ;
|
|
|
|
|
|
|
|
Step_choosewhere:
|
|
|
|
_SelectProgramDestination(nDirection);
|
|
|
|
if (nDirection=BACK) then
|
|
|
|
goto Step_chooseinst;
|
|
|
|
endif ;
|
|
|
|
|
|
|
|
Step_choosecomp:
|
|
|
|
_SelectWhatToInstall(nDirection);
|
|
|
|
if nDirection=BACK then
|
|
|
|
goto Step_choosewhere;
|
|
|
|
endif;
|
|
|
|
|
|
|
|
Step_netprg:
|
|
|
|
_SelectNetConfig(nDirection);
|
|
|
|
if (nDirection =BACK) then
|
|
|
|
goto Step_choosecomp;
|
|
|
|
endif;
|
|
|
|
|
|
|
|
Step_choosewhereD:
|
|
|
|
_SelectDataDestination(nDirection);
|
|
|
|
if nDirection=BACK then
|
|
|
|
goto Step_netprg;
|
|
|
|
endif;
|
|
|
|
|
|
|
|
Step_choosedata:
|
|
|
|
_SelectDataType(nDirection);
|
|
|
|
if nDirection=BACK then
|
|
|
|
goto Step_choosewhereD;
|
|
|
|
endif;
|
|
|
|
|
|
|
|
Step_chooseDongleServer:
|
|
|
|
_SelectDongleServer(nDirection);
|
|
|
|
if nDirection=BACK then
|
|
|
|
goto Step_choosedata;
|
|
|
|
endif;
|
|
|
|
|
2006-01-09 01:15:53 +00:00
|
|
|
//Step_chooseNTDongle:
|
|
|
|
// _SelectDongleXP(nDirection);
|
|
|
|
// if nDirection=BACK then
|
|
|
|
// goto Step_chooseDongleServer;
|
|
|
|
// endif;
|
2003-09-05 15:05:16 +00:00
|
|
|
|
|
|
|
Step_whereDongleServer:
|
|
|
|
_FindAutoStartFolder(nDirection);
|
|
|
|
_SelectDongleServerDestination(nDirection);
|
|
|
|
if nDirection=BACK then
|
2006-01-09 01:15:53 +00:00
|
|
|
goto Step_chooseDongleServer;
|
2003-09-05 15:05:16 +00:00
|
|
|
endif;
|
|
|
|
|
|
|
|
// ***********************************
|
|
|
|
// * local installation
|
|
|
|
|
|
|
|
Step_newORupdate:
|
|
|
|
_AddOrOverwrite(nDirection);
|
|
|
|
if nDirection=BACK then
|
|
|
|
goto Step_whereDongleServer;
|
|
|
|
endif;
|
|
|
|
|
|
|
|
Step_confirm1:
|
|
|
|
_ConfirmInstallation(nDirection);
|
|
|
|
if nDirection=BACK then
|
|
|
|
goto Step_newORupdate;
|
|
|
|
endif;
|
|
|
|
|
|
|
|
Step_installData:
|
|
|
|
_InstallData(nDirection);
|
|
|
|
if (nDirection=BACK) then
|
|
|
|
goto Step_newORupdate;
|
|
|
|
endif;
|
|
|
|
|
|
|
|
Step_installPrg:
|
|
|
|
_InstallInitialFiles(nDirection);
|
|
|
|
if (nDirection=BACK) then
|
|
|
|
goto Step_newORupdate;
|
|
|
|
endif;
|
|
|
|
|
|
|
|
Step_installServerAutoStart:
|
|
|
|
_InstallServerAutoStart(nDirection);
|
|
|
|
if (nDirection=BACK) then
|
|
|
|
goto Step_newORupdate;
|
|
|
|
endif;
|
|
|
|
|
|
|
|
Step_LaunchBa1:
|
|
|
|
if bInstallModules then
|
|
|
|
ChangeDirectory(szAppPath);
|
|
|
|
_ResetDongleServer(szDongle);
|
|
|
|
LaunchAppAndWait("ba1.exe","-6 -uADMIN",WAIT);
|
|
|
|
_RestoreDongleServer(szDongle);
|
|
|
|
endif;
|
|
|
|
|
|
|
|
Step_LaunchServer:
|
|
|
|
if bInstallServer then
|
|
|
|
ChangeDirectory(szAppPath ^ "\\servers");
|
|
|
|
LaunchApp("Lerch.exe", "");
|
|
|
|
endif;
|
|
|
|
|
|
|
|
_ProgramEpilogue();
|
|
|
|
exit;
|
|
|
|
|
|
|
|
// ***********************************
|
2006-01-09 01:15:53 +00:00
|
|
|
// * network installation
|
|
|
|
|
|
|
|
//Step_installnet:
|
|
|
|
// _ConfirmInstallation(nDirection);
|
|
|
|
// if nDirection=BACK then
|
|
|
|
// goto Step_whereDongleServer;
|
|
|
|
// endif;
|
|
|
|
|
|
|
|
//Step_installKeyServices:
|
|
|
|
// _InstallDongleXP(nDirection);
|
|
|
|
// if nDirection=BACK then
|
|
|
|
// goto Step_whereDongleServer;
|
|
|
|
// endif;
|
|
|
|
|
|
|
|
//nStep_installData:
|
|
|
|
// _InstallData(nDirection);
|
|
|
|
// if (nDirection=BACK) then
|
|
|
|
// goto Step_whereDongleServer;
|
|
|
|
// endif;
|
|
|
|
|
|
|
|
//Step_installwrkst:
|
|
|
|
// _NewNetWorkPlace(nDirection);
|
|
|
|
// if (nDirection=BACK) then
|
|
|
|
// goto Step_whereDongleServer;
|
|
|
|
// endif;
|
|
|
|
|
|
|
|
// _ProgramEpilogue();
|
|
|
|
// exit;
|
2003-09-05 15:05:16 +00:00
|
|
|
|
|
|
|
#include "setup1.rul"
|
|
|
|
#include "setup2.rul"
|
|
|
|
#include "setup3.rul"
|
|
|
|
#include "setup4.rul"
|
|
|
|
#include "winsub.rul"
|
|
|
|
#include "sddialog.rul"
|