diff --git a/support/interni/_isres.dll b/support/interni/_isres.dll index b10b046ed..291c0f244 100755 Binary files a/support/interni/_isres.dll and b/support/interni/_isres.dll differ diff --git a/support/interni/_setup.lib b/support/interni/_setup.lib index 488ce7fb1..53234a41b 100755 Binary files a/support/interni/_setup.lib and b/support/interni/_setup.lib differ diff --git a/support/interni/src/aga/declare.rul b/support/interni/src/aga/declare.rul index af9cf37b6..2bd629f04 100755 --- a/support/interni/src/aga/declare.rul +++ b/support/interni/src/aga/declare.rul @@ -14,6 +14,7 @@ declare NUMBER nSystemFileModified; // szAppPath e' la directory dove la applicazione verra' installata STRING szAppPath[ _MAX_LENGTH ]; + STRING szConfigPath[ _MAX_LENGTH ]; // szDataPath e' la directory dove risiederanno i dati STRING szDataPath[ _MAX_LENGTH ]; // nome della macchina server delle chiavi @@ -31,6 +32,9 @@ declare STRING szGroupName[ _MAX_LENGTH]; STRING szOSName; BOOL bSCREENSAVER; + // 29 maggio 1998: cancella Winsock.dll dal direttorio di installazione + // poiche' tale dll vale solo per Windows 3.11 + BOOL bIsWin95; #define STR_ERR_DLG "Errore di sistema. Impossibile visualizzare una finestra di dialogo." #define STR_ERR_STRING "Errore di sistema. Impossibile ultimare l'installazione.\n\nRimuovere la causa dell'errore e ripetere l'installazione." @@ -38,8 +42,8 @@ declare // #define STR_ERR_DLG "Errore di sistema. Impossibile visualizzare una finestra di dialogo." #define STR_INVALID_PATH "Il percorso indicato non e' valido.\nIndicare un altro percorso.\n" -#define STR_TEXT1 "I programmi PR.A.S.S.I. verranno installati nella directory :" -#define STR_TEXTSER1 "I programmi PR.A.S.S.I. sono installati nella directory :" +#define STR_TEXT1 "I programmi di EuroCAMPO verranno installati nella directory :" +#define STR_TEXTSER1 "I programmi di EuroCAMPO sono installati nella directory :" #define STR_DATATEXT1 "I dati verranno installati nella directory :" #define STR_ENT_DISK "Inserire il disco " #define STR_TAGDISK1 "BA" @@ -83,8 +87,8 @@ declare #define ZIP_DIRECTORY "ZIP" #define ZIPDEMO_DIRECTORY "ZIPDEMO" -#define DEFAULT_LOCALPATH "C:\\PRASSI" -#define DEFAULT_NETPATH "F:\\PRASSI" +#define DEFAULT_LOCALPATH "C:\\easy" +#define DEFAULT_NETPATH "F:\\easy" #define SELECTFOLDER_DIALOG 12008 // Prototipo delle funzioni @@ -110,11 +114,12 @@ prototype _ChooseDongleServer(BYREF NUMBER); prototype _ChiediDestDongleServer(BYREF NUMBER); prototype _InstallDongleServer(BYREF NUMBER); prototype _WhereIsDongleServer(BYREF NUMBER); +prototype _ChiediPrgSuRete(BYREF NUMBER ); +prototype _ConfirmInstallation(BYREF NUMBER ); // first level prototype _ExitOnConfirm( ); prototype _PerformSet(STRING); -prototype _TrovaPrgSuRete( ); prototype _DeleteFilesMinima(); prototype _InstallaFilesMinima(); prototype _UpdateRegistry( ); @@ -128,7 +133,7 @@ prototype _CambiaDirectory( ); prototype _CreateDLG( STRING, INT, LONG ); prototype _FineInstallazione( ); -prototype _RemoveHDLOCK( ); +prototype _RemoveUnusedFiles( ); prototype _UpdateSysFiles( ); prototype _SetPathpref(); @@ -149,6 +154,7 @@ prototype _Verifica( STRING ); prototype _Errore( STRING ); prototype _Attenzione( STRING ); prototype _DeSlash( STRING, BYREF STRING ); +prototype _TCPIPPresent( ); prototype _GetOSName( ); prototype _DisattivaScreenSaver( ); prototype _RiattivaScreenSaver( ); @@ -159,6 +165,7 @@ prototype _SettaModelessDialog( STRING ); prototype _NascondiModelessDialog( ); prototype _RichiediMemoria( NUMBER ); prototype _NToStringKB( NUMBER, BYREF STRING ); +prototype _ShowInfoList(STRING,STRING,LIST ); /* prototype _InstallaFiles( ); diff --git a/support/interni/src/aga/setup.lst b/support/interni/src/aga/setup.lst index b33a8ceb7..6a7bed187 100755 --- a/support/interni/src/aga/setup.lst +++ b/support/interni/src/aga/setup.lst @@ -1,11 +1,21 @@ 1; -sys.z -winsys.z -winsyscg.z -bademo.z -ba.z -std.z -com.z -cm770.z +2; datidemo.z +datiditt.z +3; datiauto.z +datiditt.z +4; +WINsys.Z +WINsysCG.Z +sys.z +5; +sys.z +6; +sys.z +7; +BA.z +8; +BADEMO.z +9; +BA.z diff --git a/support/interni/src/aga/setup.rul b/support/interni/src/aga/setup.rul index 175618a5d..279bc6458 100755 --- a/support/interni/src/aga/setup.rul +++ b/support/interni/src/aga/setup.rul @@ -1,11 +1,13 @@ -// File principale della installazione EASY CAMPO +// File principale della installazione EuroCAMPO declare + // Windows API + #include "WINSUB.H" +// #include "sddialog.h" // Dichiarazioni di costanti per questo script #include "DECLARE.RUL" - // Windows API - #include "WINSUB.H" // File di include con gli ID dei dialog usati in questo script #include "PRADIAGS.H" + NUMBER nHandle; NUMBER nTerminatedConv, nResult; STRING szSXTR1,szSXTR2, szDoMnu, szText, szModifiedPath, szBaCnv; @@ -18,6 +20,7 @@ declare + //---------------------------------- NUMBER nDirection; program @@ -31,11 +34,11 @@ Step_start: _ProgramPrologue(); #define SPACE_REQUIRED 3000 // Disk space in bytes. -#define APP_NAME "EasyCAMPO" -#define PROGRAM_FOLDER_NAME "PRASSI" +#define APP_NAME "EuroCAMPO" +#define PROGRAM_FOLDER_NAME "EuroCAMPO" #define APPBASE_PATH "\\" -#define COMPANY_NAME "A.G.A. Informatica" -#define PRODUCT_NAME "Easy Campo" +#define COMPANY_NAME "A.G.A. Informatica srl" +#define PRODUCT_NAME "Euro Campo" #define PRODUCT_VERSION "1.0 beta" #define DEINSTALL_KEY "SampleDeinstKey" #define PRODUCT_KEY "ba0.exe" @@ -54,17 +57,14 @@ Step_welcome: Welcome( "", 0 ); Enable( BACKBUTTON ); + _CopiaINSTALLINI(); + Step_chooseinst: // sceglie cosa installare _SelectInstall(nDirection); if (nDirection=BACK) then goto Step_welcome; endif ; - if nDirection=NEXT then - if bInstallNetWrk then - goto Step_installnet; - endif; - endif; Step_choosewhere: _ChiediDestinazione(nDirection); @@ -78,22 +78,29 @@ Step_choosecomp: goto Step_choosewhere; endif; -Step_choosewhereD: - _ChiediDestDati(nDirection); - if nDirection=BACK then +Step_netprg: + _ChiediPrgSuRete(nDirection); + if (nDirection =BACK) then goto Step_choosecomp; endif; Step_choosedata: _SelectDataType(nDirection); if nDirection=BACK then - goto Step_choosewhereD; + goto Step_netprg; endif; +Step_choosewhereD: + _ChiediDestDati(nDirection); + if nDirection=BACK then + goto Step_choosedata; + endif; + + Step_chooseDongleServer: _ChooseDongleServer(nDirection); if nDirection=BACK then - goto Step_choosedata; + goto Step_choosewhereD; endif; Step_whereDongleServer: @@ -103,16 +110,25 @@ Step_whereDongleServer: goto Step_chooseDongleServer; endif; -Step_fromnet: - _SettaFlagNet(nDirection); - if nDirection=BACK then - goto Step_whereDongleServer; + if nDirection=NEXT then + if bInstallNetWrk then + goto Step_installnet; + endif; endif; +// *********************************** +// * local installation + Step_newORupdate: _AddOrOverwrite(nDirection); if nDirection=BACK then - goto Step_fromnet; + goto Step_whereDongleServer; + endif; + +Step_confirm1: + _ConfirmInstallation(nDirection); + if nDirection=BACK then + goto Step_newORupdate; endif; Step_installData: @@ -148,19 +164,34 @@ Step_purchase: _ProgramEpilogue(); exit; - +// *********************************** +// * network installation Step_installnet: + _ConfirmInstallation(nDirection); + if nDirection=BACK then + goto Step_whereDongleServer; + endif; + +nStep_installData: + _InstallazioneDati(nDirection); + if (nDirection=BACK) then + goto Step_whereDongleServer; + endif; + +Step_installwrkst: _NewNetWorkPlace(nDirection); if (nDirection=BACK) then - goto Step_chooseinst; + goto Step_whereDongleServer; endif; _ProgramEpilogue(); exit; - #include "winsub.rul" #include "setup1.rul" #include "setup2.rul" #include "setup3.rul" #include "setup4.rul" + #include "winsub.rul" +// #include "sddialog.rul" + diff --git a/support/interni/src/aga/setup1.rul b/support/interni/src/aga/setup1.rul index 4c385fd45..c66822d41 100755 --- a/support/interni/src/aga/setup1.rul +++ b/support/interni/src/aga/setup1.rul @@ -3,19 +3,37 @@ // **** (programmi o postazione di rete) function _SelectInstall(nRetv ) STRING szMsg[512]; + BOOL zInstallEnv, zInstallDemo, zInstallNetWrk; begin + zInstallEnv= bInstallEnv; + zInstallDemo=bInstallDemo; + zInstallNetWrk=bInstallNetWrk; szMsg = "Setup puo' essere utilizzato per installare "; - szMsg=szMsg + "EasyCampo in versione normale o demo, oppure per installare "; + szMsg=szMsg + "EuroCampo in versione normale o demo, oppure "; szMsg=szMsg + "una postazione di lavoro che sfrutta una precedente intallazione su disco di rete"; nRetv = AskOptions(EXCLUSIVE,szMsg, - "&Installazione EasyCAMPO", + "&Installazione EuroCAMPO", bInstallEnv, - "Installazione EasyCAMPO &Demo", + "Installazione EuroCAMPO &Demo", bInstallDemo, "Installazione nuova postazione di lavoro in &rete", bInstallNetWrk ); + 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; //---------------------------------------------------------------------------- @@ -25,22 +43,31 @@ function _SelectComponents(nRetv) BOOL bJunk; STRING szMsg[512]; begin - if bInstallDemo then - bInstallPrg = TRUE; - bInstallData = TRUE; - bInstallDemoData=TRUE; - return; - endif; repeat if szOSName = "Windows" || bInstallDemo then + // Windows 3.XX 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) 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; + 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, @@ -48,8 +75,9 @@ begin "Installa l'area dati", bInstallData , "Installa il server di chiavi", bInstallDongleServer ); + endif; endif; - until nRetv!=NEXT || bInstallData || bInstallPrg || bInstallDongleServer; + until nRetv!=NEXT || bInstallData || bInstallPrg || bInstallNetWrk || bInstallDongleServer; return ; end; @@ -97,43 +125,64 @@ begin // ricontrolla la presenza di una installazione // e determina la posizione della directory "DATI" - if szAppPath="" then - szAppPath= "c:\prassi"; - bNuovaInst = _FindExistingInst(szAppPath); - endif; - nRetv=AskDestPath( "", "", szAppPath, 0 ); - if (nRetv=BACK) then - return ; + if szConfigPath = "" then + bNuovaInst = _FindExistingInst(szConfigPath); + if szConfigPath = "" then + bInstallData=TRUE; + szConfigPath= DEFAULT_LOCALPATH; + if !ExistsDir(szConfigPath) then + CreateDir(szConfigPath); + endif; endif; - bNuovaInst = ! _CheckExistingInst(szAppPath); - szTmp = szAppPath ^ "PATHPREF.INI"; - if ( ! Is( FILE_EXISTS, szTmp ) ) then - szDataPath = 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 - szDataPath = szTmp; - else - StrSub( szTmp2, szTmp, 0, 1 ); - if ( szTmp2 = "." ) then + 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 - if ( szTmp2 = "\\" ) then - szDataPath = szTmp; + StrSub( szTmp2, szTmp, 0, 1 ); + if ( szTmp2 = "." ) then + szDataPath = szTmp; else - szDataPath = szAppPath ^ szTmp; + if ( szTmp2 = "\\" ) then + szDataPath = szTmp; + else + szDataPath = szConfigPath ^ szTmp; + endif; endif; endif; + else + MessageBox( "Errore nel file PATHPREF.INI" ,SEVERE); + szDataPath = szConfigPath ^ "DATI\\"; endif; - else - MessageBox( "Errore nel file PATHPREF.INI" ,SEVERE); - szDataPath = szAppPath ^ "DATI\\"; + CloseFile( nTmp ); + else + // no pathpref.ini nor prawin.ini + if !bInstallNetWrk then + szDataPath = szConfigPath ^ "DATI\\"; endif; - CloseFile( nTmp ); endif; + endif; + if !bInstallNetWrk then + szAppPath = szConfigPath; + endif; return ; end; @@ -145,11 +194,11 @@ function _ChiediDestDati(nRetv) begin // ricontrolla la presenza di una installazione // e determina la posizione della directory "DATI" - if bInstallData || bInstallPrg then + if bInstallData || bInstallPrg || bInstallNetWrk then if bInstallData then - sMsg = "I dati verranno installati nel seguente direttorio."; + sMsg = "Setup installerà l'area dati nel seguente direttorio."; else - sMsg = "I dati sono installati nel seguente direttorio."; + 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 "; repeat @@ -195,12 +244,12 @@ begin bPurchase ); else - szMsg= "Si sta aggiornando una precedente installazione. Si desidera aggiornare i moduli gia' acquistati "; - szMsg=szMsg + "o acquistarne e abilitarne dei nuovi prima di installarli ?"; + szMsg= "Si sta aggiornando una precedente installazione. Setup reinstallerà i programmi di ambiente. "; + szMsg=szMsg + "Se si desidera anche acquistare e abilitare nuovi moduli o aggiornare quelli già acquistati selezionare le caselle sottostanti"; nRet = AskOptions(NONEXCLUSIVE,szMsg, "&Acquisto e abilitazione nuovi moduli", bPurchase, - "Installazione o aggiornamento nuovi &moduli", + "Installazione o aggiornamento &moduli", bInstallModules ); endif; @@ -210,62 +259,62 @@ end; //----------------------------------------------------------------------------- // **** // **** -function _TrovaPrgSuRete( ) +function _ChiediPrgSuRete(nDirection ) STRING szText[ _MAX_LENGTH ], szModifiedPath[ _MAX_LENGTH ], szTemp[ _MAX_LENGTH ]; NUMBER nHandle; begin - szText = "E' stata scelta l'installazione di una postazione di lavoro."; - szText =szText + "\nInserire il nome del direttorio di rete che contiene l'installazione di EasyCAMPO"; - szAppPath = DEFAULT_NETPATH; + 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 ) - if ( AskPath( szText , szAppPath, szModifiedPath ) = NEXT ) then + 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 - szDataPath = szAppPath ^ "DATI\\"; + 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 - szDataPath = szTmp; + szModifiedPath = szTmp; else StrSub( szTmp2, szTmp, 0, 1 ); if ( szTmp2 = "." ) then - szDataPath = szTmp; + szModifiedPath = szTmp; else if ( szTmp2 = "\\" ) then - szDataPath = szTmp; + szModifiedPath = szTmp; else - szDataPath = szAppPath ^ szTmp; + szModifiedPath = szAppPath ^ szTmp; endif; endif; endif; else _Attenzione( "Errore nel file PATHPREF.INI" ); - szDataPath = szAppPath ^ "DATI\\"; + szModifiedPath = szAppPath ^ "DATI\\"; endif; CloseFile( nTmp ); endif; StrToUpper( szAppPath, szAppPath ); - StrToUpper( szDataPath, szDataPath ); + if szDataPath = "" then + StrToUpper(szDataPath ,szModifiedPath); + endif; bProgrammiServer = TRUE; - szTemp = DEFAULT_LOCALPATH ^ "\\PREFIX.TXT"; - if ( ! Is( FILE_EXISTS, szTemp ) ) then - CreateDir( DEFAULT_LOCALPATH ); - CreateFile( nHandle, DEFAULT_LOCALPATH, "PREFIX.TXT" ); - WriteLine( nHandle, "COM" ); - CloseFile( nHandle ); - endif; - _UpdateRegistry( ); - return NEXT; + return; else - _Attenzione( "Impossibile trovare i programmi di EasyCAMPO in " + szModifiedPath ); + _Attenzione( "Impossibile trovare i programmi di EuroCAMPO in " + szModifiedPath ); endif; else - return BACK; + return; endif; endwhile; end; @@ -275,14 +324,13 @@ end; function _NewNetWorkPlace(nDirection ) STRING szText[ _MAX_LENGTH ]; NUMBER nGoOut, nRet, nResult, nDisk; - BOOL bRet; + BOOL bInstWinCG; begin - nDirection = _TrovaPrgSuRete(); - if (nDirection =BACK) then - return ; - endif; + bInstWinCG = _Verifica("Installare anche le librerie di CG ? "); - bRet = _Verifica("Installare anche le librerie di CG ? "); + SetColor(STATUSBAR,BLUE); + Enable(FEEDBACK_OPERATION); + Enable(STATUS); FileSetBeginDefine ( "SYS"); SetColor(STATUSBAR,BLUE); @@ -295,30 +343,37 @@ begin szText = STR_ERR_DECOMPRESS + " la libreria WINSYS."; _Errore( szText ); endif; - if (bRet) then + if (bInstWinCG) then if ( CompressGet( "WINSYSCG.Z", "*.*", INCLUDE_SUBDIR ) < 0) then szText = STR_ERR_DECOMPRESS + " la libreria WINSYSCG."; _Errore( szText ); endif; - ChangeDirectory( szAppPath); - szText = szAppPath ^ "\\cgpostIN.EXE"; - LaunchAppAndWait( szText , szAppPath, WAIT ); endif; - FileSetEndDefine ( "SYS"); StatusUpdate( ON, 100 ); + FileSetEndDefine ( "SYS"); + + ChangeDirectory( szAppPath); repeat nRet=FileSetPerformEz ("SYS", nDisk ); until nRet = FS_DONE; Delay(1); FileSetEndPerform ( "SYS" ); - _UpdateSysFiles(); - _SetPathpref(); - ChangeDirectory( szAppPath); - _RemoveHDLOCK(); + 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(); + return ; end; @@ -377,22 +432,14 @@ begin // ******** installa dati iniziali ditte elseif bInstallFirm then szTitle = "Installazione dati comuni e standard su " + szDataPath; - SetStatusWindow( 0, szTitle ); FileSetBeginDefine ( "DATI"); - if ( CompressGet( "STD.Z", "*.*", INCLUDE_SUBDIR ) < 0) then - szText = STR_ERR_DECOMPRESS + " il modulo Dati standard."; + if ( CompressGet( "DATIDITT.Z", "*.*", INCLUDE_SUBDIR ) < 0) then + szText = STR_ERR_DECOMPRESS + " il modulo Dati ditta."; _Attenzione( szText ); endif; - if ( CompressGet( "COM.Z", "*.*", INCLUDE_SUBDIR ) < 0) then - szText = STR_ERR_DECOMPRESS + " il modulo Dati comuni."; - _Attenzione( szText ); - endif; - if ( CompressGet( "CM770.Z", "*.*", INCLUDE_SUBDIR ) < 0) then - szText = STR_ERR_DECOMPRESS + " il modulo Dati comuni (M770)."; - _Attenzione( szText ); - endif; - FileSetEndDefine ( "DATI"); + FileSetEndDefine ( "DATI"); + SetStatusWindow( 0, szTitle ); StatusUpdate( ON, 100 ); _PerformSet ( "DATI"); endif; @@ -441,7 +488,7 @@ begin _CopiaINSTALLINI( ); _CopiaRESETHL( ); - _RemoveHDLOCK( ); + _RemoveUnusedFiles( ); _SetPathpref(); @@ -464,18 +511,29 @@ function _ChooseDongleServer(nRetv) BOOL bJunk; begin - if bInstallPrg then + if bInstallPrg || bInstallNetWrk then if !bInstallDemo then - if bInstallDongleServer 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 - nRetv = AskOptions(EXCLUSIVE,"I programmi sono protetti da una chiave hardware.\nIl controllo delle autorizzazioni va effettuato:", - "tramite chiave locale", - bJunk, - "tramite un server di chiavi", - bUseDongleServer - ); - endif; + 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; @@ -495,7 +553,8 @@ begin return; endif; szTempore=szDongleServerName; - 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 '\\') che fa da server per le chiavi hardware.\nSu questa macchina deve essere stato installato con Setup il server delle chiavi.",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; @@ -561,10 +620,87 @@ begin return; endif; - TARGETDIR = szAppPath; + TARGETDIR = szConfigPath; + if ( CreateDir( TARGETDIR ) < 0 ) then + _Errore( STR_DIR_NOTCREATED ); + else + if ( CompressGet( "BA.Z", "frontend.exe", INCLUDE_SUBDIR ) < 0) then + szTempore = STR_ERR_DECOMPRESS + " il server di autorizzazioni."; + _Errore( szTempore ); + return; + endif; + if ( CompressGet( "SYS.Z", "aga*.dll", INCLUDE_SUBDIR ) < 0) then + szTempore = STR_ERR_DECOMPRESS + " il server di autorizzazioni."; + _Errore( szTempore ); + return; + endif; + szTempore = szConfigPath ^ "\\frontend.exe"; + AddFolderIcon( szAutoRunFolder, "Frontend", szTempore, "", szTempore, 0, "", REPLACE ); + endif; - szTempore = szAppPath ^ "\\frontend.exe"; - AddFolderIcon( szAutoRunFolder, "Frontend", szTempore, "", szTempore, 0, "", REPLACE ); 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; + diff --git a/support/interni/src/aga/setup2.rul b/support/interni/src/aga/setup2.rul index 923e331af..811991509 100755 --- a/support/interni/src/aga/setup2.rul +++ b/support/interni/src/aga/setup2.rul @@ -1,34 +1,55 @@ function _SetPathpref( ) STRING szTmpPath[_MAX_LENGTH]; + STRING szPrgPath[_MAX_LENGTH]; begin + + if (bProgrammiServer) then + szPrgPath = szConfigPath; + else + szPrgPath = szAppPath; + endif; + // Setto il Pathpref in modo da poter eseguire BA1 o BACNV, // anche in prima installazione su rete (mancando set PREFPATH) - ChangeDirectory( szAppPath); + if ( CreateDir( szPrgPath ) < 0 ) then + _Errore( STR_DIR_NOTCREATED ); + endif; + + ChangeDirectory( szPrgPath); if (Is( FILE_EXISTS, "PATHPREF.INI" )) then DeleteFile("PATHPREF.INI" ); endif; - CreateFile( nHandle, szAppPath, "PATHPREF.INI" ); + CreateFile( nHandle, szPrgPath, "PATHPREF.INI" ); WriteLine( nHandle, szDataPath ); CloseFile( nHandle ); - - ChangeDirectory( szAppPath); + ChangeDirectory( szPrgPath); if ( Is( FILE_EXISTS, "PREFIX.TXT" )) then DeleteFile("PREFIX.TXT" ); endif; - CreateFile( nHandle, szAppPath, "PREFIX.TXT" ); + CreateFile( nHandle, szPrgPath, "PREFIX.TXT" ); WriteLine( nHandle, "COM" ); CloseFile( nHandle ); // scrive le stesse cose nel file unico prawin.ini , se esiste - szTmpPath=szAppPath ^ "PRAWIN.INI"; + szTmpPath=szPrgPath ^ "PRAWIN.INI"; + // paragrafo MAIN (AGA) WriteProfString(szTmpPath, "Main", "Program",szAppPath); WriteProfString(szTmpPath, "Main", "Study",szDataPath); WriteProfString(szTmpPath, "Main", "Firm","COM"); + // paragrafo DIRECTORIES (PRASSI) + WriteProfString(szTmpPath, "Directories", "Program",szAppPath); + WriteProfString(szTmpPath, "Directories", "Data",szDataPath); + if (bInstallPrg) then + // update the Dongle variable, but only if i am installing programs... if (bUseDongleServer) then + if (_TCPIPPresent() = FALSE) then + szDongleServerName=""; + _Attenzione("Impossibile utilizzare il server di rete delle autorizzazioni: \nprotocollo TCP-IP non rilevato"); + endif; WriteProfString(szTmpPath, "Server", "Dongle" , szDongleServerName); else - WriteProfString(szTmpPath, "Server", "Dongle" , ""); + WriteProfString(szTmpPath, "Server", "Dongle" ,""); endif; endif; end; @@ -40,10 +61,9 @@ function _UpdateSysFiles( ) NUMBER nNotModify, nGoOut, nRet, nInfo, nCurFiles, nLen, nNr; STRING szTemp[_MAX_LENGTH], szWin_Ini[_MAX_LENGTH], szSaveDir[_MAX_LENGTH]; begin - if !bNuovaInst then + if (!bNuovaInst) && (!bInstallNetWrk) then return; endif; - nSystemFileModified = TRUE; nNotModify = FALSE; nInfo = FALSE; @@ -54,6 +74,10 @@ begin 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 @@ -68,7 +92,7 @@ begin // Modifiche per installare BAFAX & FAXMAN (30 settembre 1996) if (bProgrammiServer) then - szSaveDir = DEFAULT_LOCALPATH; + szSaveDir = szConfigPath; else szSaveDir = szAppPath; endif; @@ -100,8 +124,10 @@ begin EzBatchReplace( STR_SHARE ); endif; EzBatchReplace( STR_TEMP ); - if bProgrammiServer then - EzBatchReplace("SET PREFPATH=C:\\PRASSI\\PREFIX.TXT"); + if (bProgrammiServer) then + szTemp = szConfigPath ^ "PREFIX.TXT"; + szTemp ="SET PREFPATH=" + szTemp; + EzBatchReplace(szTemp); endif; szTemp = "C:\\RESET_HL.EXE"; EzBatchReplace( szTemp ); @@ -268,6 +294,7 @@ begin szTemp = szAppPath ^ "RECDESC"; CreateDir(szTemp); + Disable(STATUS); end; @@ -289,29 +316,29 @@ begin nDisk = 1; while ( !bDone ) - nRet = FileSetPerform ( sFileset, nDisk ); + nRet = FileSetPerformEz ( sFileset, 1); switch ( nRet ) case FS_TONEXTDISK: + // non usato da FileSetPerformEz if nDisk > 0 then NumToStr( szExt, nDisk ); - szTemp = szTemp + szExt ; - switch( nDisk ) - case 1 : szEntDisk = STR_INSERTDISK + STR_TAGDISK1; - szTemp = "diskid.1"; - endswitch; + szEntDisk = STR_INSERTDISK + STR_TAGDISK1 + szExt; + szTemp = "diskid" ^ szExt; + SetDialogTitle ( DLG_ENTER_DISK, "Cambio disco" ); SetDialogTitle ( DLG_CANCEL, "Uscita" ); Suppress( ENTERDISK_ERRMSG, DISABLE ); bRightDisk = FALSE; while( !bRightDisk ) - nRet = EnterDisk( szEntDisk, szTemp ); + + nRet = EnterDisk( szEntDisk, szTemp ); switch( nRet ) case DISKID: - _Attenzione( "Indicazione di unita' non valida." ); + _Attenzione( "L'unita' indicata non e' valida." ); case BADPATH: - _Attenzione( "Indicazione di sentiero non valida." ); + _Attenzione( "Il percorso indicato non e' valido." ); case DRIVEOPEN: - _Attenzione( "Inserire un dischetto nella unita' indicata!" ); + _Attenzione( "Inserire il disco nell'unita' indicata!" ); case BADTAGFILE: _Attenzione( "Il disco inserito non e' corretto. Inserire il disco richiesto." ); case CANCEL: @@ -364,16 +391,16 @@ begin // Mostra Program Manager AppCommand( PROGMAN, CMD_RESTORE ); // Aggiunge il gruppo di programmi ed i programmi - szFolder="EasyCAMPO"; + szFolder="EuroCAMPO"; ShowGroup (szFolder , SW_NORMAL ); if ( TRUE) then - // Aggiunge EasyCAMPO Program Manager + // Aggiunge EuroCAMPO Program Manager if bInstallDemo then - szItemName = "EasyCAMPO Demo"; + szItemName = "EuroCAMPO Demo"; elseif bInstallNetWrk then - szItemName = "EasyCAMPO WST"; + szItemName = "EuroCAMPO WST"; else - szItemName = "EasyCAMPO"; + szItemName = "EuroCAMPO"; endif; szCmdLine = szAppPath ^ "\\BA0.EXE"; szIconPath = szCmdLine; @@ -488,15 +515,31 @@ function _CopiaINSTALLINI( ) STRING szSrcPath[_MAX_LENGTH]; NUMBER nFlag, nFileOut, nLoop; begin - if bInstallDemo then - szSrcPath= SRCDIR ^ ZIPDEMO_DIRECTORY; - else - szSrcPath= SRCDIR ^ ZIP_DIRECTORY; + // corregge il path dei dati in base all'installazione da dischetto o CD + szSrcPath = SRCDIR ; + ParsePath(szPath,szSrcPath,DIRECTORY); + if (StrLength(szPath) >= 7) then + StrSub(szTmp , szPath, (StrLength(szPath) - 7) ,6 ); + // sono su un CD con immagini dei dischetti su DISK1, DISK2 ,... + nFileOut=StrFind(szTmp, "DISK"); + if nFileOut>=0 then + StrSub(szPath, szSrcPath ,0, StrLength(szSrcPath)- 7 + nFileOut); + szSrcPath = szPath; + endif; endif; - szFileName = SRCDIR ^ "INSTALL.INI"; + + + if bInstallDemo then + szSrcPath= szSrcPath ^ ZIPDEMO_DIRECTORY; + else + szSrcPath= szSrcPath ^ ZIP_DIRECTORY; + endif; + szFileName = szSrcPath ^ "INSTALL.INI"; szPath= szAppPath ^ "INSTALL.INI"; WriteProfString(szPath,"Main","DiskPath",szSrcPath); + GetProfString(szFileName,"Main","Producer",szTmp); + WriteProfString(szPath,"Main","Producer",szTmp); GetProfString(szFileName,"Main","DiskSize",szTmp); WriteProfString(szPath,"Main","DiskSize",szTmp); // ****** @@ -522,11 +565,12 @@ begin SetDialogTitle (DLG_ASK_OPTIONS, "Seleziona i componenti"); SetDialogTitle (DLG_ASK_TEXT, ""); SetDialogTitle (DLG_ASK_YESNO, "Domanda"); - SetDialogTitle (DLG_ENTER_DISK, "Setup ha bisogni del prossimo disco"); + SetDialogTitle (DLG_ENTER_DISK, "Setup ha bisogno del prossimo disco"); SetDialogTitle (DLG_MSG_INFORMATION, "Messaggio"); SetDialogTitle (DLG_MSG_SEVERE, "Errore fatale"); SetDialogTitle (DLG_MSG_WARNING, "Attenzione"); SetDialogTitle( DLG_ASK_PATH, "Scelta direttorio" ); + _DisattivaScreenSaver( ); end; diff --git a/support/interni/src/aga/setup3.rul b/support/interni/src/aga/setup3.rul index 54985a94e..582e8402e 100755 --- a/support/interni/src/aga/setup3.rul +++ b/support/interni/src/aga/setup3.rul @@ -84,7 +84,7 @@ end; function _SettaFlagNet( nDirection) begin - nDirection = AskOptions(EXCLUSIVE, "I programmi di EasyCAMPO possono essere installati localmente sul PC o utilizzare una precedente installazione su server di rete. \nSpecificare se i programmi ", + nDirection = AskOptions(EXCLUSIVE, "I programmi di EuroCAMPO possono essere installati localmente sul PC o utilizzare una precedente installazione su server di rete. \nSpecificare se i programmi ", "vanno installati sul disco locale", bProgrammiServer, "si trovano sul server di rete", bProgrammiServer ); end; @@ -155,7 +155,7 @@ begin szAuto = szAuto + STR_TEMP; szAuto = szAuto + "\n"; if bProgrammiServer then - szAuto = szAuto + "SET PREFPATH=" + DEFAULT_LOCALPATH + "\\PREFIX.TXT"; + szAuto = szAuto + "SET PREFPATH=" + szConfigPath + "\\PREFIX.TXT"; szAuto = szAuto + "\n"; endif; szTemp = "C:\RESET_HL.EXE"; @@ -253,13 +253,27 @@ begin VarRestore(SRCTARGETDIR); end; //----------------------------------------------------------------------------- -function _RemoveHDLOCK( ) +function _RemoveUnusedFiles( ) + STRING szTemp; begin - // HARDLOCK.VXD e' necessario solo su Win95, + // HARDLOCK.VXD e' necessario solo su Win95, // si è scoperto che è sempre necessario // if (szOSName != "Windows") then // DeleteFile("HARDLOCK.VXD"); // endif; + + // ANGELO 29 maggio 1998: cancella Winsock.dll dal direttorio di installazione + // poiche' tale dll funziona solo per Windows 3.11 + VarSave(SRCTARGETDIR); // save SRC & TARGET dirs + if (_TCPIPPresent()) then + // let's use W95's own DLL... + SRCDIR=szAppPath; + TARGETDIR=szAppPath; + szTemp = "WINSOCK.DLL"; + DeleteFile(szTemp); + endif; + VarRestore(SRCTARGETDIR); + end; //----------------------------------------------------------------------------- function _ForceAttrib4Dll( ) @@ -293,6 +307,8 @@ begin _Cambia_Attributi(szTmp); szTmp = szAppPath ^ "XBS200.DLL"; _Cambia_Attributi(szTmp); + szTmp = szAppPath ^ "WINSOCK.DLL"; + _Cambia_Attributi(szTmp); end; //----------------------------------------------------------------------------- @@ -386,3 +402,4 @@ begin return bRetv; end; + diff --git a/support/interni/src/aga/setup4.rul b/support/interni/src/aga/setup4.rul index e24642894..1afb325be 100755 --- a/support/interni/src/aga/setup4.rul +++ b/support/interni/src/aga/setup4.rul @@ -132,9 +132,18 @@ end; // Reperisce il nome del sistema operativo function _GetOSName( ) NUMBER nResult; + STRING szResult; begin VarSave(SRCTARGETDIR); TARGETDIR = WINDIR ^ "SYSTEM"; + // 29 maggio 1998: cancella Winsock.dll dal direttorio di installazione + // poiche' tale dll vale solo per Windows 3.11 + GetSystemInfo(WINMAJOR,nResult,szResult); + bIsWin95 = FALSE; + if (szResult = "3.95") then + bIsWin95 = TRUE; + endif; + GetSystemInfo(OS,nResult,szOSName); VarRestore(SRCTARGETDIR); end; @@ -161,3 +170,44 @@ begin endif; end; + +function _ShowInfoList(szTitle, szMsg, list ) +begin + // removed !!!!!!!! +end; + + +function _TCPIPPresent() + NUMBER nvResult; + STRING svResult,szTemp,szTemp2; +begin + szTemp = "WINSOCK.DLL"; + szTemp2 = "WINSOCK.DL_"; + + VarSave(SRCTARGETDIR); // save SRC & TARGET dirs + SRCDIR=szAppPath; + TARGETDIR=szAppPath; + if (DeleteFile(szTemp2)!=0) then +// _Attenzione("Non riesco a cancellare " + szTemp2); + endif; + if RenameFile(szTemp,szTemp2)!=0 then +// _Attenzione("Non riesco a rinominare " + SRCDIR + szTemp +// + " in " +TARGETDIR+szTemp2 ); + endif; + if (DeleteFile(szTemp)!=0) then +// _Attenzione("Non riesco a cancellare " + szTemp); + endif; + + if (UseDLL("winsock.dll")=0) then + UnUseDLL("winsock.dll"); + nvResult =TRUE; + else + nvResult =FALSE; + endif; + + RenameFile(szTemp2,szTemp); + + VarRestore(SRCTARGETDIR); + return nvResult; +end; +