augusto 67c581841a Patch level :04.044
Files correlati     :
Ricompilazione Demo : [ ]
Commento            : versione del setup della 04.044
(Prima release definitiva per venditori PRASSI del 23/10/98)


git-svn-id: svn://10.65.10.50/trunk@7243 c028cbd2-c16b-5b4b-a496-9718f37d4682
1998-10-09 12:15:00 +00:00

835 lines
26 KiB
Plaintext
Executable File

//----------------------------------------------------------------------------
// **** Selezione del tipo di installazione
// **** (programmi o postazione di rete)
function _SelectInstall(nRetv )
STRING szMsg[512];
BOOL zInstallEnv, zInstallDemo, zInstallNetWrk;
begin
zInstallEnv= bInstallEnv;
zInstallDemo=bInstallDemo;
zInstallNetWrk=bInstallNetWrk;
#ifdef __DEMO__
bInstallDemo=TRUE;
#else
szMsg = "Setup puo' essere utilizzato per installare il software ";
szMsg=szMsg + "EuroCampo oppure una postazione di lavoro che sfrutta ";
szMsg=szMsg + "una precedente intallazione su disco di rete";
nRetv = AskOptions(EXCLUSIVE,szMsg,
"&Installazione EuroCAMPO",
bInstallEnv,
// "Installazione EuroCAMPO &Demo",
// bInstallDemo,
"Installazione nuova postazione di lavoro in &rete",
bInstallNetWrk
);
#endif
if (( zInstallDemo!=bInstallDemo) || (zInstallNetWrk!=bInstallNetWrk) ) then
// something changed ...
if bInstallDemo then
bInstallPrg = TRUE;
bInstallData=TRUE;
bInstallDemoData=TRUE;
elseif bInstallNetWrk then
bInstallPrg = FALSE;
bInstallData= FALSE;
bInstallDemoData=FALSE;
else
bInstallPrg = TRUE;
endif;
endif;
end;
//----------------------------------------------------------------------------
// **** Selezione del tipo di installazione
// ****
function _SelectComponents(nRetv)
BOOL bJunk;
STRING szMsg[512];
begin
repeat
if szOSName = "Windows" || bInstallDemo then
// Windows 3.XX platforms (16bit)
if bInstallNetWrk then
szMsg= "Setup installerà la postazione di lavoro in rete.\nE' possibile installare anche l'area dati.";
nRetv = AskOptions(NONEXCLUSIVE,szMsg,
"Installa l'area dati", bInstallData
);
else
szMsg= "E' possibile installare i programmi (ambiente e moduli) oppure l'area dati. ";
szMsg=szMsg + "\nSelezionare almeno una delle componenti";
nRetv = AskOptions(NONEXCLUSIVE,szMsg,
"Installa i programmi", bInstallPrg,
"Installa l'area dati", bInstallData
);
bInstallDongleServer = FALSE;
endif;
else
// Windows 95 or NT platforms
if bInstallNetWrk then
szMsg= "Setup installerà la postazione di lavoro in rete.\nE' possibile installare anche l'area dati.";
nRetv = AskOptions(NONEXCLUSIVE,szMsg,
"Installa l'area dati", bInstallData
);
else
szMsg= "E' possibile installare i programmi (ambiente e moduli), l'area dati oppure il server di rete per le chiavi. ";
szMsg=szMsg + "\nSelezionare almeno una delle componenti";
nRetv = AskOptions(NONEXCLUSIVE,szMsg,
"Installa i programmi", bInstallPrg,
"Installa l'area dati", bInstallData ,
"Installa il server di chiavi", bInstallDongleServer
);
endif;
endif;
until nRetv!=NEXT || bInstallData || bInstallPrg || bInstallNetWrk || bInstallDongleServer;
return ;
end;
// **** Selezione del tipo di installazione
// ****
function _SelectDataType( nRetv)
BOOL bJunk;
STRING szMsg[512];
begin
if !bInstallData then
return;
endif;
szMsg= "Si e' selezionato di installare gli archivi. \n";
szMsg= szMsg + "L'area dati deve contenere:";
#ifdef __DEMO__
bInstallDemoData=TRUE;
#else
repeat
nRetv = AskOptions(EXCLUSIVE,szMsg,
"gli archivi di &ditta",
bInstallFirm,
"gli archivi De&mo",
bInstallDemoData
// "gli archivi di Auto&formazione",
// bInstallAutoform
);
if nRetv=BACK then
return ;
endif;
sInstType = INST_ENVIRONMENT;
if bInstallDemoData then
sInstType = INST_DEMO;
elseif bInstallAutoform then
sInstType = INST_AUTOFORM;
endif;
until nRetv=NEXT;
#endif
return ;
end;
//----------------------------------
// chiede la directory dell'applicazione e dei dati;
// l'installazione dei soli dati ha bisogno di dir_applicaz (per settare pathpref)
// l'installazione dei soli programmi ha bisogno di dir_dati (per sapere se esiste un direttorio dati)
function _ChiediDestinazione(nRetv)
BOOL bReenterPath, bConfirmdatapath;
begin
// ricontrolla la presenza di una installazione
// e determina la posizione della directory "DATI"
if szConfigPath = "" then
bNuovaInst = _FindExistingInst(szConfigPath);
if szConfigPath = "" then
bInstallData=TRUE;
szConfigPath= DEFAULT_LOCALPATH;
if !ExistsDir(szConfigPath) then
CreateDir(szConfigPath);
endif;
endif;
endif;
nRetv=AskDestPath( "", "", szConfigPath, 0 );
if (nRetv=BACK) then
return ;
endif;
bNuovaInst = ! _CheckExistingInst(szConfigPath);
szTmp = szConfigPath ^ "Prawin.INI";
if ( Is( FILE_EXISTS, szTmp ) ) then
GetProfString(szTmp, "Main", "Program",szAppPath );
GetProfString(szTmp, "Main", "Study",szDataPath );
else
szTmp = szConfigPath ^ "PATHPREF.INI";
if ( Is( FILE_EXISTS, szTmp ) ) then
// no prawin.ini but pathpref.ini
OpenFileMode( FILE_MODE_NORMAL );
OpenFile( nTmp, szConfigPath, "PATHPREF.INI");
if GetLine( nTmp, szTmp ) = 0 then
StrSub( szTmp2, szTmp, 1, 1 );
if ( szTmp2 = ":" ) then
szDataPath = szTmp;
else
StrSub( szTmp2, szTmp, 0, 1 );
if ( szTmp2 = "." ) then
szDataPath = szTmp;
else
if ( szTmp2 = "\\" ) then
szDataPath = szTmp;
else
szDataPath = szConfigPath ^ szTmp;
endif;
endif;
endif;
else
MessageBox( "Errore nel file PATHPREF.INI" ,SEVERE);
szDataPath = szConfigPath ^ "DATI\\";
endif;
CloseFile( nTmp );
else
// no pathpref.ini nor prawin.ini
if !bInstallNetWrk then
szDataPath = szConfigPath ^ "DATI\\";
endif;
endif;
endif;
if !bInstallNetWrk then
szAppPath = szConfigPath;
endif;
return ;
end;
//----------------------------------
function _ChiediDestDati(nRetv)
BOOL bConfirmdatapath;
STRING szChangedPath[256]
STRING sMsg[256]
begin
// ricontrolla la presenza di una installazione
// e determina la posizione della directory "DATI"
if bInstallData || bInstallPrg || bInstallNetWrk then
if bInstallData then
sMsg = "Setup installerà l'area dati nel seguente direttorio.";
else
sMsg = "Setup utilizzerà l'area dati che si trova nel seguente direttorio.";
endif;
sMsg = sMsg + "\nE' possibile cambiare il direttorio digitando il nuovo nome o scegliendo il pulsante <Sfoglia>";
repeat
bConfirmdatapath=TRUE;
nRetv=AskPath(sMsg ,szDataPath, szChangedPath);
if (nRetv=BACK) then
return ;
endif;
szDataPath=szChangedPath;
bDatiPresenti = _CheckExistingData(szDataPath);
if (bDatiPresenti && bInstallData) then
bConfirmdatapath=_CanOverwrite();
endif;
if ((! bDatiPresenti) && (! bInstallData)) then
MessageBox( "La cartella indicata non contiene dati. \nSe si desidera davvero utilizzare questa cartella, \nabilitare l'installazione dell'area dati" ,SEVERE);
bConfirmdatapath=FALSE;
endif;
until (bConfirmdatapath);
endif;
return ;
end;
//----------------------------------------------------------------------------
// **** Installi o aggiungi moduli ?
function _AddOrOverwrite(nRet)
STRING szMsg[512];
BOOL bJunk;
begin
if !bInstallPrg then
return;
endif;
#ifdef __DEMO__
bPurchase=FALSE;
bInstallModules=TRUE;
#else
bPurchase=FALSE;
if bCannotExecute then
bInstallModules=FALSE;
return;
endif;
bInstallModules=TRUE;
#endif
return ;
end;
//-----------------------------------------------------------------------------
// ****
// ****
function _ChiediPrgSuRete(nDirection )
STRING szText[ _MAX_LENGTH ], szModifiedPath[ _MAX_LENGTH ], szTemp[ _MAX_LENGTH ];
NUMBER nHandle;
begin
if !bInstallNetWrk then
return;
endif;
szText = "L'installazione di una postazione di lavoro deve basarsi su una precedente installazione dei programmi su disco di rete.";
szText =szText + "\nInserire il percorso completo del direttorio di rete che contiene l'installazione di EuroCAMPO.";
if (szAppPath = "") then
szAppPath = DEFAULT_NETPATH;
endif;
while ( TRUE )
nDirection = AskPath( szText , szAppPath, szModifiedPath );
if ( nDirection = NEXT ) then
if ( _CheckExistingInst(szModifiedPath) ) then
szAppPath = szModifiedPath;
szTmp = szAppPath ^ "PATHPREF.INI";
if ( ! Is( FILE_EXISTS, szTmp ) ) then
szModifiedPath = szAppPath ^ "DATI\\";
else
OpenFileMode( FILE_MODE_NORMAL );
OpenFile( nTmp, szAppPath, "PATHPREF.INI");
if GetLine( nTmp, szTmp ) = 0 then
StrSub( szTmp2, szTmp, 1, 1 );
if ( szTmp2 = ":" ) then
szModifiedPath = szTmp;
else
StrSub( szTmp2, szTmp, 0, 1 );
if ( szTmp2 = "." ) then
szModifiedPath = szTmp;
else
if ( szTmp2 = "\\" ) then
szModifiedPath = szTmp;
else
szModifiedPath = szAppPath ^ szTmp;
endif;
endif;
endif;
else
_Attenzione( "Errore nel file PATHPREF.INI" );
szModifiedPath = szAppPath ^ "DATI\\";
endif;
CloseFile( nTmp );
endif;
StrToUpper( szAppPath, szAppPath );
if szDataPath = "" then
StrToUpper(szDataPath ,szModifiedPath);
endif;
bProgrammiServer = TRUE;
return;
else
_Attenzione( "Impossibile trovare i programmi di EuroCAMPO in " + szModifiedPath );
endif;
else
return;
endif;
endwhile;
end;
//-----------------------------------------------------------------------------
// **** installazione postazione di rete
// ****
function _NewNetWorkPlace(nDirection )
STRING szText[ _MAX_LENGTH ];
NUMBER nGoOut, nRet, nResult, nDisk;
BOOL bInstWinCG;
begin
bInstWinCG = TRUE;
// modifica del 30/9/98
// bInstWinCG = _Verifica("Installare anche le librerie di CG ? ");
SetColor(STATUSBAR,BLUE);
Enable(FEEDBACK_OPERATION);
Enable(STATUS);
FileSetBeginDefine ( "SYS");
SetColor(STATUSBAR,BLUE);
Enable(FEEDBACK_OPERATION);
Enable(STATUS);
SetStatusWindow( 0, "Scompattamento in corso..." );
TARGETDIR = WINDIR ^ "SYSTEM";
if ( CompressGet( "WINSYS.Z", "*.*", INCLUDE_SUBDIR ) < 0) then
szText = STR_ERR_DECOMPRESS + " la libreria WINSYS.";
_Errore( szText );
endif;
if (bInstWinCG) then
if ( CompressGet( "WINSYSCG.Z", "*.*", INCLUDE_SUBDIR ) < 0) then
szText = STR_ERR_DECOMPRESS + " la libreria WINSYSCG.";
_Errore( szText );
endif;
endif;
StatusUpdate( ON, 100 );
FileSetEndDefine ( "SYS");
ChangeDirectory( szAppPath);
repeat
nRet=FileSetPerformEz ("SYS", nDisk );
until nRet = FS_DONE;
Delay(1);
FileSetEndPerform ( "SYS" );
// if (bInstWinCG) then
// ChangeDirectory( szConfigPath);
// szText = szAppPath ^ "\\cgpostIN.EXE";
// LaunchAppAndWait( szText , szAppPath, WAIT );
// endif;
Disable( FEEDBACK_FULL );
Disable(STATUS);
_UpdateRegistry( );
_UpdateSysFiles();
_SetPathpref();
ChangeDirectory( szAppPath);
_RemoveUnusedFiles();
_Attenzione("E' stata installata una postazione di rete. \nE' necessario riavviare Windows prima di eseguire EuroCampo.");
return ;
end;
//----------------------------------
function _InstallazioneDati(nDirection)
BOOL bReenterPath, bConfirmdatapath;
STRING szTitle[_MAX_LENGTH];
STRING szPath[_MAX_LENGTH];
STRING szTemp[_MAX_LENGTH];
NUMBER nTmp;
begin
if !bInstallData then
return;
endif;
nDirection=BACK;
TARGETDIR = szDataPath; // i .z hanno gia' il sottodirettorio nel nome di file
if ( CreateDir( TARGETDIR ) < 0 ) then
_Attenzione( STR_DATA_DIR_NOTCREATED );
return;
endif;
// ****************
// copia dati comuni, std e com770 ,
// demo o autoformazione ?
SetColor(STATUSBAR,BLUE);
Enable(FEEDBACK_OPERATION);
Enable(STATUS);
// ******** installa dati DEMO ?
if bInstallDemoData then
szTitle = "Installazione dati dimostrativi su " + szDataPath;
FileSetBeginDefine ( "DDEMO");
if ( CompressGet( "DATIDEMO.Z", "*.*", INCLUDE_SUBDIR ) < 0) then
szText = STR_ERR_DECOMPRESS + " il modulo Dati dimostrativi.";
_Attenzione( szText );
endif;
FileSetEndDefine ( "DDEMO");
StatusUpdate( ON, 100 );
SetStatusWindow( 0, szTitle );
_PerformSet ( "DDEMO");
// ******** installa dati autoformazione ?
elseif bInstallAutoform then
szTitle = "Installazione dati di autoformazione su " + szDataPath;
FileSetBeginDefine ( "DAUTO");
if ( CompressGet( "DATIAUTO.Z", "*.*", INCLUDE_SUBDIR ) < 0) then
szText = STR_ERR_DECOMPRESS + " il modulo Dati di autoformazione.";
_Attenzione( szText );
endif;
FileSetEndDefine ( "DAUTO");
StatusUpdate( ON, 100 );
SetStatusWindow( 0, szTitle );
_PerformSet ( "DAUTO");
// ******** installa dati iniziali ditte
elseif bInstallFirm then
szTitle = "Installazione dati comuni e standard su " + szDataPath;
FileSetBeginDefine ( "DATI");
if ( CompressGet( "DATIDITT.Z", "*.*", INCLUDE_SUBDIR ) < 0) then
szText = STR_ERR_DECOMPRESS + " il modulo Dati ditta.";
_Attenzione( szText );
endif;
FileSetEndDefine ( "DATI");
SetStatusWindow( 0, szTitle );
StatusUpdate( ON, 100 );
_PerformSet ( "DATI");
endif;
Disable(STATUS);
// ****************
_CopiaPRASSIINI( );
_SetPathpref();
// ****************
// marca l'installazione dati con il tipo giusto
szPath=szDataPath ^ "\\CONFIG";
szTemp=szPath ^ DATATYPE_FILE;
if ( Is( FILE_EXISTS, szTemp ) ) then
DeleteFile(szTemp);
endif;
OpenFileMode( FILE_MODE_APPEND );
CreateFile( nTmp, szPath, DATATYPE_FILE);
WriteLine(nTmp,sInstType);
CloseFile( nTmp );
nDirection=NEXT;
end;
//----------------------------------
function _InstallazioneMinima(nRetv)
BOOL bReenterPath, bConfirmdatapath;
STRING sTmp[32],sPath[64];
NUMBER direction;
begin
if bInstallPrg then
_InstallNTDongle(direction);
if bInstallEnv || bInstallDemo then
_ForceAttrib4Dll( );
// Effettua la vera e propria installazione minima
_DeleteFilesMinima( );
_InstallaFilesMinima( );
Disable( FEEDBACK_FULL );
Disable( STATUS );
// Ripristina il valore di TARGETDIR
VarRestore( SRCTARGETDIR );
_UpdateRegistry( );
_UpdateSysFiles( );
ChangeDirectory( szAppPath);
_CopiaINSTALLINI( );
_CopiaRESETHL( );
_RemoveUnusedFiles( );
_SetPathpref();
nRetv=NEXT;
endif;
endif;
end;
// sceglie il tipo di chiave (locale o server)
function _ChooseDongleServer(nRetv)
BOOL bJunk;
begin
if bInstallPrg || bInstallNetWrk then
if !bInstallDemo then
if (bInstallDongleServer) then
bUseDongleServer=FALSE;
nRetv = AskOptions(EXCLUSIVE,"I programmi in versione non dimostrativa sono protetti da una chiave hardware. Sulla questa macchina sta per essere installato un server di autorizzazioni:",
"utilizza il server per il controllo delle autorizzazioni",bJunk);
else
if (_TCPIPPresent() || bIsWin95=FALSE ) then
// e' installato il TCP IP O verr… installato; posso fare uso delle chiavi di rete
nRetv = AskOptions(EXCLUSIVE,"I programmi in versione non dimostrativa sono protetti \nda una chiave hardware. \nIl controllo delle autorizzazioni va effettuato:",
"tramite chiave locale",
bJunk,
"tramite un server di chiavi",
bUseDongleServer
);
else
bUseDongleServer=FALSE;
nRetv = AskOptions(EXCLUSIVE,"I programmi in versione non dimostrativa sono protetti da una chiave hardware. Il protocollo di rete TCP-IP non e' stato trovato, per cui non e' possibile effettuare il controllo delle autorizzazione tramite chiave di rete:",
"effettua il controllo tramite chiave locale",
bJunk
);
endif;
endif;
else
bUseDongleServer=FALSE;
endif;
endif;
return nRetv;
end;
function _WhereIsDongleServer(nDirection)
NUMBER lResult;
NUMBER listID;
NUMBER nRetv;
STRING szTempore[_MAX_LENGTH];
BOOL bJunk;
begin
if !bUseDongleServer then
return;
endif;
szTempore=szDongleServerName;
SetDialogTitle(DLG_ASK_TEXT,"Server di autorizzazioni");
nDirection = AskText("L'installazione attuale sarà priva della chiave hardware locale e farà riferimento ad un server esterno. Inserire il nome della macchina (NON preceduto da '\\\\') che fa da server per le chiavi hardware.\nSu questa macchina deve essere stato installato con Setup il server delle chiavi.",szTempore,szDongleServerName);
if nDirection=BACK then
szDongleServerName=szTempore;
endif;
return ;
end;
function _ChiediDestDongleServer(nDirection)
NUMBER nItems;
NUMBER lResult;
NUMBER listID;
NUMBER nRetv;
STRING szTempore,szStartFolder;
BOOL bJunk;
begin
if !bInstallDongleServer then
return;
endif;
RegDBSetDefaultRoot(HKEY_CURRENT_USER);
if RegDBGetKeyValueEx("\\.Default\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Shell Folders","Startup",lResult,szAutoRunFolder,nItems) < 0 then
// Registry access failed (16 bit DLL?)
szAutoRunFolder="";
// try to determine the folder by names...
listID = ListCreate(STRINGLIST);
if (GetGroupNameList(listID)<0) then
MessageBox("Can't get the folders list",SEVERE);
endif;
lResult= ListGetFirstString(listID,szTempore);
while (lResult != END_OF_LIST)
lResult = ListGetNextString(listID,szTempore);
if szTempore = "Esecuzione Automatica" then
szAutoRunFolder=szTempore;
endif;
if szTempore = "Startup" then
szAutoRunFolder=szTempore;
endif;
endwhile;
if szAutoRunFolder="" then
_Attenzione("Non riesco a determinare la cartella di Esecuzione Automatica di Windows");
repeat
szStartFolder="";
nDirection=SelectFolder("Cartella di Esecuzione Automatica",szAutoRunFolder,szAutoRunFolder);
if nDirection = BACK then
return;
endif;
if QueryProgGroup(szAutoRunFolder,szStartFolder,nItems) then
_Attenzione("La cartella indicata non fa parte delle cartelle programmi di Windows");
nDirection=BACK;
endif;
until nDirection=NEXT;
endif;
endif;
return ;
end;
function _ChooseNTDongle(nDirection)
STRING szTempore,szCmdline,szCmdDir;
NUMBER nRetv;
BOOL bInstServices,go_on,bJunk;
begin
if szOSName="Windows NT" && !bUseDongleServer then
go_on=FALSE;
while (!go_on)
nDirection = AskOptions(EXCLUSIVE,"Si sta installando EuroCampo su una macchina Windows NT che utilizza il controllo delle autorizzazioni tramite chiave locale. E' necessaria l'installazione dei servizi NT per le chiavi",
"Installa ora i servizi",
bInstServices,
"Installa i servizi in seguito",
bCannotExecute,
"Servizi gia' installati",
bJunk
);
go_on = nDirection=NEXT;
if !go_on then
return;
endif;
if bInstServices then
nDirection = AskOptions(EXCLUSIVE,"Per installare questi servizi e' necessario avere effettuato il login come utente 'Amministratore'. Se si e' effettuato il login con un altro utente uscire da Windows e rientrare come 'Amministratore'.",
"il login e' stato effettuato come amministratore",
bInstServices,
"il login non e' stato effettuato come amministratore",
bCannotExecute
);
go_on = nDirection=NEXT;
if go_on && bInstServices then
nDirection = AskOptions(EXCLUSIVE,"Controllare il produttore dell'hardware delle chiavi di protezione. Si tratta di una chiave",
"&Eutron",
bInstNTEutron,
"&HardLock",
bInstNTHardlock
);
go_on = nDirection=NEXT;
endif;
endif;
endwhile;
if bCannotExecute then
_Attenzione("Assicurarsi che i servizi NT siano attivi prima di lanciare EuroCAMPO");
endif;
endif;
end;
function _InstallNTDongle(nDirection)
STRING szTempore,szCmdline,szCmdDir;
NUMBER nRetv;
BOOL ok;
begin
if bInstNTHardlock || bInstNTEutron then
_GetTmpDir(TARGETDIR);
FileSetBeginDefine ( "NTSUPPORT");
if bInstNTHardlock then
ok = CompressGet( "SYSNT.Z", "hlinst.exe", INCLUDE_SUBDIR ) >=0;
ok = ok && CompressGet( "SYSNT.Z", "skeyrm.exe", INCLUDE_SUBDIR )>=0;
ok = ok && CompressGet( "SYSNT.Z", "hardlock.sys", INCLUDE_SUBDIR ) >=0;
ok = ok && CompressGet( "SYSNT.Z", "hlvdd.dll", INCLUDE_SUBDIR ) >=0;
if (!ok) then
szTempore = STR_ERR_DECOMPRESS + " il programma di installazione dei servizi Hardlock per NT.";
_Errore( szTempore );
return;
endif;
endif;
if bInstNTEutron then
ok = CompressGet( "SYSNT.Z", "skeyadd.exe", INCLUDE_SUBDIR )>=0;
ok = ok && CompressGet( "SYSNT.Z", "hlinst.exe", INCLUDE_SUBDIR ) >=0;
ok = ok && CompressGet( "SYSNT.Z", "skeyrm.exe", INCLUDE_SUBDIR )>=0;
TARGETDIR = WINDIR ^ "SYSTEM32" ^ "DRIVERS";
ok = ok && CompressGet( "SYSNT.Z", "keyp.sys", INCLUDE_SUBDIR )>=0;
if (!ok) then
szTempore = STR_ERR_DECOMPRESS + " il programma di installazione dei servizi Eutron per NT.";
_Errore( szTempore );
return;
endif;
endif;
FileSetEndDefine ( "NTSUPPORT");
_PerformSet ( "NTSUPPORT");
_GetTmpDir(szCmdDir);
if bInstNTHardlock then
// warn: close all Hardlock applicat
szTempore="Sto lanciando il programma di installazione dei servizi di rete Hardlock.";
szTempore=szTempore+"\nE' necessario chiudere tutte le applicazioni che fanno uso della protezione Hardlock.";
_Informazione(szTempore);
// remove previous installations
szCmdline = szCmdDir ^ "skeyrm";
LaunchAppAndWait("skeyrm","",WAIT);
szCmdline = szCmdDir ^ "HLINST";
LaunchAppAndWait(szCmdline,"-d",WAIT);
_Informazione("Precedenti installazioni dei servizi di protezione hardware sono stati de-installati");
// reinstall
szCmdline = szCmdDir ^ "HLINST";
LaunchAppAndWait(szCmdline,szCmdDir,WAIT);
_Informazione("I servizi di rete Hardlock sono stati re-installati. Proseguo con l'installazione dei programmi di ambiente.");
endif;
if bInstNTEutron then
_Informazione("Sto lanciando il programma di installazione dei servizi di rete Eutron.\nE' necessario chiudere tutte le applicazioni che fanno uso della protezione Eutron.");
// remove previous installations
szCmdline = szCmdDir ^ "skeyrm";
LaunchAppAndWait(szCmdline,"",WAIT);
szCmdline = szCmdDir ^ "HLINST";
LaunchAppAndWait(szCmdline,"-d",WAIT);
_Informazione("Precedenti installazioni dei servizi di protezione hardware sono stati de-installati");
// reinstall
szCmdline = szCmdDir ^ "skeyadd";
LaunchAppAndWait(szCmdline,szCmdDir,WAIT);
_Informazione("I servizi di rete Eutron sono stati re-installati. Proseguo con l'installazione dei programmi di ambiente.");
endif;
endif; // not an NT machine...
end;
function _InstallDongleServer(nDirection)
STRING szTempore;
begin
_InstallNTDongle(nDirection);
if bInstallDongleServer then
// chiave di rete
SetColor(STATUSBAR,BLUE);
Enable(FEEDBACK_OPERATION);
Enable(STATUS);
SetStatusWindow( 0, "Scompattamento in corso..." );
TARGETDIR = szConfigPath;
if ( CreateDir( TARGETDIR ) < 0 ) then
_Errore( STR_DIR_NOTCREATED );
else
FileSetBeginDefine ( "FRONTEND");
if ( CompressGet( "SYS.Z", "AGA*.DLL", INCLUDE_SUBDIR ) < 0) then
szTempore = STR_ERR_DECOMPRESS + " le librerie.";
_Errore( szTempore );
return;
endif;
if ( CompressGet( "SYS.Z", "SKEY*.DLL", INCLUDE_SUBDIR ) < 0) then
szTempore = STR_ERR_DECOMPRESS + " il supporto per EUTRON.";
_Errore( szTempore );
return;
endif;
if ( CompressGet( "BA.Z", "FRONTEND.EXE", INCLUDE_SUBDIR ) < 0) then
szTempore = STR_ERR_DECOMPRESS + " il server di autorizzazioni.";
_Errore( szTempore );
return;
endif;
FileSetEndDefine ( "FRONTEND");
_PerformSet ( "FRONTEND");
szTempore = szConfigPath ^ "\\frontend.exe";
AddFolderIcon( szAutoRunFolder, "Frontend", szTempore, "", szTempore, 0, "", REPLACE );
endif;
endif;
end;
function _ConfirmInstallation(nDirection)
STRING Msg,szInfo;
NUMBER listInfo;
begin
//create list
listInfo = ListCreate(STRINGLIST);
Msg = "Si è scelto di installare ";
if bInstallNetWrk then
Msg =Msg +"una postazione di rete";
elseif bInstallPrg then
if bInstallDemo then
Msg =Msg +"EuroCAMPO Demo";
else
Msg =Msg +"EuroCAMPO";
endif;
else
Msg =Msg +"l'area dati";
endif;
Msg = Msg + " con le opzioni seguenti";
// ************
// destination
if bInstallNetWrk then
szInfo="Direttorio locale:" + szConfigPath;
ListAddString(listInfo, szInfo, AFTER);
szInfo="Direttorio dei programmi:" + szAppPath;
ListAddString(listInfo, szInfo, AFTER);
else
szInfo="Direttorio dei programmi:" + szAppPath;
ListAddString(listInfo, szInfo, AFTER);
endif;
// ************
// data path
szInfo="Area dati ";
if bInstallData then
szInfo="pre-esistente";
else
if bInstallFirm then
szInfo=szInfo + "di ditta";
elseif bInstallDemoData then
szInfo=szInfo + "Demo";
elseif bInstallAutoform then
szInfo=szInfo + "di Autoformazione";
endif;
szInfo=szInfo + " da installare";
endif;
szInfo=szInfo + ":" + szDataPath;
ListAddString(listInfo, szInfo, AFTER);
// ************
// Now display the information
// SdShowInfoList( "Conferma installazione", Msg, listInfo );
// in attesa che il fottuto sistema di SDDIalogs di quei
// coglioni teste di cazzo
// della stirling funzioni, ecco una soluzione di merda:
if AskYesNo( "Procedo con l'installazione?", YES ) then
nDirection = NEXT;
else
nDirection = BACK;
endif;
end;