Patch level :4.0 567

Files correlati     :
Ricompilazione Demo : [ ]
Commento            :setup.ins & friends


git-svn-id: svn://10.65.10.50/trunk@14645 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
luca 2006-12-15 11:14:31 +00:00
parent 03b8504405
commit c8f5834f14
4 changed files with 69 additions and 336 deletions

@ -45,7 +45,7 @@ Step_start:
#define APPBASE_PATH "\\"
#define COMPANY_NAME "A.G.A. Informatica srl"
#define PRODUCT_NAME "Campo"
#define PRODUCT_VERSION "3.1"
#define PRODUCT_VERSION "4.0"
#define DEINSTALL_KEY "SampleDeinstKey"
#define PRODUCT_KEY "ba0.exe"
#define DATATYPE_FILE "datatype."

@ -19,7 +19,7 @@ begin
bReinstall = TRUE;
nRetv = AskOptions(EXCLUSIVE,"Si desidera effettuare:",
"Aggiornamento di una precedente installazione",bReinstall,
"Installazione &STANDARD (scelta consigliata)",bSetupStandard,
"Installazione &STANDARD",bSetupStandard,
"Installazione &personalizzata e/o di rete",bJunk);
if (nRetv != BACK && bReinstall) then
_ChooseReinstall(nRetv);
@ -46,10 +46,9 @@ begin
zInstallDemo = bInstallDemo;
zInstallNetWrkChk = bInstallNetWrkChk;
#ifdef __DEMO__
bInstallDemo=TRUE;
bInstallDemo=TRUE;
#else
//caso della reinstallazione su precedente versione: tutto quanto segue e' inutile quindi esce
if (nReinstall > 0) then
@ -110,19 +109,19 @@ begin
//se non esiste una precedente installazione->nuova installazione;necessiterá di un path di default per l'installazione
if (szConfigPath = "") then
// bNuovaInst = ! _FindExistingInst(szConfigPath); //ricerca precedenti installazioni
bNuovaInst = TRUE; //se non e' stato scelto un aggiornamento e' comunque una nuova installazione!
if bNuovaInst then
bInstallData=TRUE;
szConfigPath= DEFAULT_LOCALPATH;
bInstallData = TRUE;
szConfigPath = DEFAULT_LOCALPATH;
endif;
if (nReinstall = 0) then
nRetv=AskDestPath( "", "", szConfigPath, 0 );
StrRemoveLastSlash(szConfigPath);
if (nRetv=BACK) then
return;
endif;
endif;
nRetv=AskDestPath( "", "", szConfigPath, 0 );
StrRemoveLastSlash(szConfigPath);
if (nRetv=BACK) then
return ;
endif;
bNuovaInst = ! _CheckExistingInst(szConfigPath);
if (bNuovaInst && (! ExistsDir(szConfigPath))) then
CreateDir(szConfigPath);
@ -250,7 +249,7 @@ begin
szMsg= "Setup installera' la postazione di lavoro.\nE' possibile installare anche l'area dati, il server di rete per le chiavi di protezione.";
nRetv = AskOptions(NONEXCLUSIVE,szMsg,
"Installa l'area dati", bInstallData ,
"Installa i Server", bInstallServer
"Installa i servizi avanzati di rete (Lerch)", bInstallServer
);
else
szMsg= "E' possibile installare i programmi (ambiente e moduli), l'area dati, il server di rete per le chiavi di protezione. ";
@ -258,7 +257,7 @@ begin
nRetv = AskOptions(NONEXCLUSIVE,szMsg,
"Installa i programmi", bInstallPrg,
"Installa l'area dati", bInstallData ,
"Installa i Server", bInstallServer
"Installa i servizi avanzati di rete (Lerch)", bInstallServer
);
endif;
@ -457,61 +456,6 @@ begin
end;
//________________________________________________________________________________________________________________________
// *** Chiede se si desidera installare i servizi (Win NT/2000/XP)
function _SelectDongleXP(nDirection)
STRING szTempore,szCmdline,szCmdDir;
NUMBER nRetv;
BOOL bInstServices,go_on,bJunk,bLocal;
begin
#ifndef __DEMO__
bLocal = !(bInstallNetWrkChk); //in caso di installazione in postazione singola o server (chiave locale)
if ( szOSName="Windows NT" && ((!bUseDongleServer) || bLocal) ) then //se ho win NT/2000/XP ed ho una chiave locale...
bJunk = nReinstall > 0;
go_on=FALSE;
while (!go_on)
nDirection = AskOptions(EXCLUSIVE,"Si sta installando il programma su una macchina Windows NT/2000/XP che utilizza il controllo delle autorizzazioni tramite chiave locale. E' necessaria l'installazione dei servizi 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/2000/XP siano attivi prima di eseguire il programma");
endif;
endif;
#endif
end;
//________________________________________________________________________________________________________________________
// *** Mette in Avvio Automatico il collegamento al server della chiave
@ -603,29 +547,7 @@ begin
return ;
end;
//________________________________________________________________________________________________________________________
// *** Installa o aggiunge moduli?
function _AddOrOverwrite(nRet)
STRING szMsg[512];
BOOL bJunk;
begin
if !bInstallPrg then
return;
endif;
#ifdef __DEMO__
bInstallModules=TRUE;
#else
if bCannotExecute then
bInstallModules=FALSE;
return;
endif;
bInstallModules=TRUE;
#endif
return ;
end;
//________________________________________________________________________________________________________________________
// *** Mostra le opzioni scelte per l'installazione
@ -729,8 +651,7 @@ begin
return;
endif;
// ****************
// copia dati comuni, std e com770 ,
// demo o autoformazione ?
// copia dati comuni, std, 770 o demo?
SetColor(STATUSBAR,BLUE);
Enable(FEEDBACK_OPERATION);
@ -798,7 +719,6 @@ function _InstallInitialFiles(nRetv)
begin
if (bInstallPrg) then
//_InstallDongleXP(direction);
if (bInstallEnv || bInstallDemo) then
_ForceAttrib4Dll( );
@ -812,9 +732,8 @@ begin
VarRestore( SRCTARGETDIR ); // Ripristina il valore di TARGETDIR
_UpdateStartMenu( ); // aggiorna il menu di avvio di windows
// _UpdateSysFiles( ); // aggiorna,se necessario,config.sys
ChangeDirectory( szAppPath);
ChangeDirectory(szAppPath);
_CopiaINSTALLINI( );
@ -827,147 +746,6 @@ begin
end;
//________________________________________________________________________________________________________________________
// *** installazione postazione di rete
function _NewNetWorkPlace(nDirection )
STRING szText[ _MAX_LENGTH ];
NUMBER nGoOut, nRet, nResult, nDisk;
begin
SetColor(STATUSBAR,BLUE);
Enable(FEEDBACK_OPERATION);
Enable(STATUS);
FileSetBeginDefine ( "SYS");
SetColor(STATUSBAR,BLUE);
Enable(FEEDBACK_OPERATION);
Enable(STATUS);
SetStatusWindow( 0, "Scompattamento in corso..." );
// ***Eliminata con nuova gestione installazione chiavi! Programma hardlock hldrv32.exe
//hardlock.vxd in winsys.z va solo su sistemi win95/98
// if (szOSName != "Windows NT") then
// TARGETDIR = WINDIR ^ "SYSTEM";
// if ( CompressGet( "WINSYS.Z", "*.*", INCLUDE_SUBDIR ) < 0) then
// szText = STR_ERR_DECOMPRESS + " la libreria WINSYS.";
// _Errore( szText );
// endif;
// endif;
StatusUpdate( ON, 100 );
FileSetEndDefine ( "SYS");
ChangeDirectory( szAppPath);
repeat
nRet=FileSetPerformEz ("SYS", nDisk );
until nRet = FS_DONE;
Delay(1);
FileSetEndPerform ( "SYS" );
Disable( FEEDBACK_FULL );
Disable(STATUS);
_UpdateStartMenu( );
_UpdateSysFiles();
_SetCampoIni();
ChangeDirectory( szAppPath);
_Attenzione("E' stata installata una postazione di rete. \nE' necessario riavviare Windows prima di lanciare il programma.");
return ;
end;
//________________________________________________________________________________________________________________________
// *** installa effettivamente i servizi su win NT/2000/XP
function _InstallDongleXP(nDirection)
STRING szTempore,szCmdline,szCmdDir;
NUMBER nRetv;
BOOL ok;
begin
if ( bXPServicesInstalled ) then
return;
endif;
if ((bInstNTHardlock) || (bInstNTEutron)) then
_GetTmpDir(TARGETDIR);
szCmdDir = TARGETDIR;
FileSetBeginDefine ( "NTSUPPORT" );
if bInstNTHardlock then
// (modificato con nuova installazione servizi Hardlock il 07/05/2003)
ok = CompressGet( "SYSNT.Z", "hldrv32.exe", INCLUDE_SUBDIR ) >=0;
ok = ok && CompressGet( "SYSNT.Z", "hlinst.exe", INCLUDE_SUBDIR ) >=0;
ok = ok && CompressGet( "SYSNT.Z", "skeyrm.exe", INCLUDE_SUBDIR ) >=0;
if (!ok) then
szTempore = STR_ERR_DECOMPRESS + " il programma di installazione dei servizi Hardlock per NT/2000/XP.";
_Errore( szTempore );
return;
endif;
endif;
if bInstNTEutron then
// (modificato con nuova installazione servizi Eutron il 27/02/2002 per funzionare anche con win2000 server e windowsXP)
ok = CompressGet( "SYSNT.Z", "skeyadd.exe", INCLUDE_SUBDIR ) >=0;
ok = ok && CompressGet( "SYSNT.Z", "skeyrm.exe", INCLUDE_SUBDIR ) >=0;
ok = ok && CompressGet( "SYSNT.Z", "hlinst.exe", INCLUDE_SUBDIR ) >=0;
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/2000/XP.";
_Errore( szTempore );
return;
endif;
endif;
FileSetEndDefine ( "NTSUPPORT");
_PerformSet ( "NTSUPPORT");
if (bInstNTHardlock) then
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);
ChangeDirectory(szCmdDir);
// modifica per installazione servizi Hardlock ultimo tipo (07/05/2003)
// remove previous installations (Eutron & Hardlock)
szCmdline = szCmdDir ^ "skeyrm";
LaunchAppAndWait(szCmdline,"-f",WAIT);
szCmdline = szCmdDir ^ "HLINST";
LaunchAppAndWait(szCmdline,"-d",WAIT);
_Informazione("Precedenti installazioni dei servizi di protezione hardware sono stati de-installati");
// launch hardlock services installer32
szCmdline = szCmdDir ^ "hldrv32";
LaunchAppAndWait(szCmdline,"",WAIT);
_Informazione("I servizi di rete Hardlock sono stati re-installati. Proseguo con l'installazione dei programmi di ambiente.");
endif;
if (bInstNTEutron) then
szTempore="Sto lanciando il programma di installazione dei servizi di rete Eutron.";
szTempore=szTempore+"\nE' necessario chiudere tutte le applicazioni che fanno uso della protezione Eutron.";
_Informazione(szTempore);
ChangeDirectory(szCmdDir);
// remove previous installations (Hardlock & Eutron)
szCmdline = szCmdDir ^ "HLINST";
LaunchAppAndWait(szCmdline,"-d",WAIT);
szCmdline = szCmdDir ^ "skeyrm";
LaunchAppAndWait(szCmdline,"-f",WAIT);
_Informazione("Precedenti installazioni dei servizi di protezione hardware sono stati de-installati");
// install Eutron services
szCmdline = szCmdDir ^ "skeyadd";
LaunchAppAndWait(szCmdline,"",WAIT);
_Informazione("I servizi di rete Eutron sono stati re-installati. Proseguo con l'installazione dei programmi di ambiente.");
endif;
bXPServicesInstalled = TRUE; //per non installare i servizi piu' di una volta
endif; // not an NT/2000/XP machine...
end;
//________________________________________________________________________________________________________________________
// *** installa il collegamento al master server nel menu autostart di windows
@ -981,8 +759,6 @@ begin
return;
endif;
//_InstallDongleXP(nDirection);
//server di controllo dei vari servers possibili
szTempore = szAppPath ^ "\\servers\\lerch.exe";
AddFolderIcon( szAutoRunFolder, "Lerch", szTempore, "", szTempore, 0, "", REPLACE );

@ -63,75 +63,6 @@ begin
end;
//________________________________________________________________________________________________________________________
// **** Funzione per aggiornare i files di sistema in windows 95/98 (non + utilizzata dalla 2.0!)
function _UpdateSysFiles( )
NUMBER nNotModify, nGoOut, nRet, nInfo, nCurFiles, nLen, nNr;
STRING szTemp[_MAX_LENGTH], szWin_Ini[_MAX_LENGTH];
begin
if (!bNuovaInst) then
return;
endif;
//serve solo per windows 95/98 e roba simile...
if (szOSName = "Windows NT") then
return;
endif;
nSystemFileModified = TRUE;
nNotModify = FALSE;
nInfo = FALSE;
nGoOut = FALSE;
SetDialogTitle(DLG_ASK_OPTIONS, "Modifica i files di sistema" );
Disable( BACKBUTTON );
SetDialogTitle(DLG_CANCEL, "Uscita" );
SetDialogTitle(DLG_OK, "Conferma" );
while (! nGoOut)
if (!bNuovaInst) then
nSystemFileModified=FALSE;
nNotModify=TRUE;
endif;
nRet = AskOptions(EXCLUSIVE, STR_MODSYSFILES, STR_MODIFY, nSystemFileModified, STR_NOTMODIFY, nNotModify, STR_INFOMODIFY, nInfo );
if nInfo then
// Mostra le informazioni
if _PreviewBatch( ) then
nSystemFileModified = TRUE;
else
nSystemFileModified = FALSE;
endif;
endif;
nGoOut = TRUE;
endwhile;
//se il numero di files e' insufficiente in config.sys -> propone di incrementarlo
VarSave(SRCTARGETDIR);
SRCDIR = "C:\\";
CopyFile( "CONFIG.SYS", "CONFIG.PRA" );
VarRestore(SRCTARGETDIR);
if (nSystemFileModified) then
ConfigSetFileName( "C:\\CONFIG.SYS" );
else
szTemp = TARGETDIR ^ "CONFIG.PRA";
ConfigSetFileName( szTemp );
endif;
EzConfigGetValue( "FILES", nCurFiles );
if nCurFiles < NUM_FILES_IN_CONFIG then
EzConfigSetValue( "FILES", NUM_FILES_IN_CONFIG );
endif;
if nSystemFileModified then
SprintfBox( WARNING, "Attenzione", STR_FILE_MODIFIED, TARGETDIR );
else
SprintfBox( WARNING, "Attenzione", STR_FILE_NOTMODIFIED, TARGETDIR );
endif;
end;
//________________________________________________________________________________________________________________________
// *** Funzione per cancellare i files minimi per il fascicolatore
@ -515,41 +446,73 @@ end;
function _ChooseReinstall(nRetv)
LIST list;
NUMBER nPar,i;
STRING szInst,szIni,szPar,szComponents;
LIST list_msg;
NUMBER nPar,nBracket,i;
STRING szInst,szIni,szPar,szComponents, szTestPrg, szTestDb, szWarning;
BOOL bCheck;
begin
list = ListCreate(STRINGLIST);
list_msg = ListCreate(STRINGLIST);
szPar = "1";
nPar = 1;
while (GetProfString("C:\\Campo.stp", szPar, "Program", szInst) = 0)
//controlla se la precedente installazione e' di tipo campo wst
szWarning = " (ATTENZIONE !! Aggiornare prima il server !)";
//lettura del file campo.stp e creazione della lista delle installazioni in teoria presenti..
//..in teoria perche' potrebbero anche essere non piu' valide o rimosse!
while (GetProfString("C:\\Campo.stp", szPar, "Program", szInst) = 0)
if (GetProfString("C:\\Campo.stp", szPar, "CampoIni", szIni) = 0) then
i = StrFind(szIni,"\\campo.ini");
StrSub(szInst, szIni, 0, i);
if (!Is( FILE_EXISTS, szIni)) then
szInst = szInst ^ " (RIMOSSA)";
else
GetProfString(szIni, "Main", "TestPrograms", szTestPrg);
if (szTestPrg = "X" || szTestPrg = "Y") then
szInst = szInst + szWarning;
endif;
endif;
else
if (!Is( FILE_EXISTS, szInst ^ "\\campo.aut")) then
szInst = szInst ^ " (RIMOSSA)";
else
szIni = szInst ^ "\\campo.ini";
GetProfString(szIni, "Main", "TestPrograms", szTestPrg);
if (szTestPrg = "X" || szTestPrg = "Y") then
szInst = szInst + szWarning;
endif;
endif;
endif;
ListAddString(list, szInst, AFTER);
ListAddString(list_msg, szInst, AFTER);
nPar = nPar + 1;
NumToStr(szPar, nPar);
endwhile;
szComponents = "Installazioni precedenti";
//crea la lista delle installazioni precedenti
i = ListGetFirstString(list,szInst);
while (i = 0)
ComponentAddItem(szComponents, szInst, 0, szPar="1");
i = ListGetNextString(list,szInst);
i = ListGetFirstString(list_msg,szInst);
while (i = 0)
//precheck di una installazione tipo server se esiste;senno' no precheck e segnalazione di ..
//..aggiornare prima il server
if (StrFind(szInst, "(") < 0) then
szIni = szInst + "\\campo.ini";
GetProfString(szIni, "Main", "TestDatabase", szTestDb);
GetProfString(szIni, "Main", "TestPrograms", szTestPrg);
bCheck = (szTestDb = "X" || szTestDb = "Y") && (szTestPrg = "N" || szTestPrg = "");
ComponentAddItem(szComponents, szInst, 0, bCheck);
else
ComponentAddItem(szComponents, szInst, 0, FALSE);
endif;
i = ListGetNextString(list_msg,szInst);
endwhile;
nRetv = SdAskOptions("Installazioni precedenti", "Selezionare l'installazione da aggiornare", "",
@ -558,16 +521,21 @@ nRetv = SdAskOptions("Installazioni precedenti", "Selezionare l'installazione da
nReinstall = 0;
if (nRetv = NEXT) then
nPar = 1;
i = ListGetFirstString(list,szInst);
i = ListGetFirstString(list_msg,szInst);
while (i = 0)
if (ComponentIsItemSelected(szComponents, szInst)) then
if (StrFind(szInst, "(RIMOSSA)") < 0) then
nBracket = StrFind(szInst, " (");
if (nBracket > 0) then
MessageBox("ATTENZIONE, si e' scelto di aggiornare da CD una installazione di tipo client di rete.\nProseguire solo nel caso l'aggiornamento automatico del client sia precedentemente fallito !",WARNING);
StrSub(szInst,szInst,0,nBracket);
endif;
szReinstallPath = szInst;
nReinstall = nPar;
endif;
endif;
nPar = nPar+1;
i = ListGetNextString(list,szInst);
i = ListGetNextString(list_msg,szInst);
endwhile;
endif;

@ -62,19 +62,6 @@ begin
end;
//__________________________________________________________________________________________________
function _FindExistingInst(szPrevPath )
begin
_CercaFileOvunque( "CAMPO.AUT",szPrevPath);
if (szPrevPath!="") then
ParsePath(szPrevPath,szPrevPath,PATH);
return TRUE;
else
return FALSE;
endif;
end;
//__________________________________________________________________________________________________
function _CheckExistingInst(szPrevPath )
begin
@ -173,6 +160,8 @@ begin
szTmp = szAppPath ^ "cb6.dll";
_Cambia_Attributi(szTmp);
szTmp = szAppPath ^ "gfm.dll";
_Cambia_Attributi(szTmp);
szTmp = szAppPath ^ "pdflib.dll";
_Cambia_Attributi(szTmp);
szTmp = szAppPath ^ "xidll.dll";
_Cambia_Attributi(szTmp);