augusto 9591797601 Patch level :03.063
Files correlati     :
Ricompilazione Demo : [ ]
Commento            : suddivisione del support di installazione su dischetti
		tradotti i messaggi in inglese a Diaslogasktext
		corretta la cancellazione della winsock.dll :sse
		si rileva la presenza del TCP-IP;
		aggiunti messaggi di prompt in caso di mancanza di TCP
		che inibiscono l'installazione del server di chiavi
		e dell'uso del server di chiavi


git-svn-id: svn://10.65.10.50/trunk@6770 c028cbd2-c16b-5b4b-a496-9718f37d4682
1998-06-19 15:12:50 +00:00

406 lines
12 KiB
Plaintext
Executable File
Raw Blame History

//-----------------------------------------------------------------------------
//-----------------------------------------------------------------------------
//-----------------------------------------------------------------------------
// funzioni specifiche di basso livello
/*---------------------------------------------------------------------------*\
*
* Function: CheckRequirements
*
* Purpose: This function will check all minimum requirements for the
* application being installed. If any fail, then the user
* is informed and the installation is terminated.
*
*
* Input:
*
* Returns:
*
* Comments:
\*---------------------------------------------------------------------------*/
function _CheckRequirements()
number nvDx, nvDy;
number nvVersion;
STRING szResult;
begin
// Check screen resolution.
GetExtents( nvDx, nvDy );
if (nvDy < 480) then
MessageBox( "Questo programma richiede un video VGA o superiore.", WARNING );
exit;
endif;
end;
//-----------------------------------------------------------------------------
function _SetupScreen()
number nDx, nDy;
begin
GetExtents( nDx, nDy );
Enable( FULLWINDOWMODE );
Enable( INDVFILESTATUS );
Enable( BITMAP256COLORS );
Enable( DIALOGCACHE );
SetTitle( "Installazione di " + APP_NAME, 24, WHITE );
SetColor( BACKGROUND, BK_BLUE ); // Dark blue.
SetColor( STATUSBAR, BLUE ); // Bright blue.
SetTitle( "Setup", 0, BACKGROUNDCAPTION ); // Caption bar text.
Enable( BACKGROUND );
Delay( 1 );
end;
//-----------------------------------------------------------------------------
function _ShowExitDialog( nDLGID )
NUMBER nGoOut, nRet, nHwnd;
begin
_CreateDLG ( "DLG_TMP", nDLGID, HWND_INSTALL );
nGoOut = FALSE;
while nGoOut = FALSE
nRet = WaitOnDialog( "DLG_TMP");
if ( nRet = DLG_ERR ) then
_Attenzione( STR_ERR_DLG );
nGoOut = TRUE;
endif;
switch( nRet )
case IDD_CONTINUE:
nGoOut = TRUE;
case DLG_CLOSE:
nGoOut = TRUE;
endswitch;
endwhile;
EndDialog( "DLG_TMP" );
ReleaseDialog( "DLG_TMP" );
end;
//-----------------------------------------------------------------------------
function _SettaFlagNet( nDirection)
begin
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;
//-----------------------------------------------------------------------------
//
function _FindExistingInst(szPrevPath )
begin
_CercaFileOvunque( "PRASSI.AUT",szPrevPath);
if (szPrevPath!="") then
ParsePath(szPrevPath,szPrevPath,PATH);
return TRUE;
else
return FALSE;
endif;
end;
function _CheckExistingInst(szPrevPath )
begin
szPrevPath = szPrevPath ^ "PRASSI.AUT";
return Is( FILE_EXISTS, szPrevPath );
end;
function _CheckExistingData(szDataPath )
begin
szDataPath = szDataPath ^ "COM\\";
return Is( PATH_EXISTS, szDataPath );
end;
//-----------------------------------------------------------------------------
// determina la presenza di una installazione ricercando il file passato
function _PrimaInstallazione( szTagFile, nPrimaInst, szPrevPath )
STRING szTmp[512];
begin
nPrimaInst = 0;
_CheckExistingInst(szPrevPath );
if szPrevPath != "" then
ParsePath( szPrevPath, szPrevPath, PATH );
Sprintf( szTmp, STR_NOTFIRST1, szPrevPath );
szTmp = szTmp + STR_NOTFIRST2;
SetDialogTitle(DLG_ASK_YESNO, "Attenzione" );
if AskYesNo( szTmp, NO ) then
nPrimaInst = 2;
else
nPrimaInst = 1;
endif;
endif;
if nPrimaInst = 2 then
_CambiaDirectory( ); // richiede di cambiare directory o confermare la sovrascrittura
endif;
end;
//-----------------------------------------------------------------------------
function _PreviewBatch( )
NUMBER nFile, nGoOut, nRet, pList, nFlag, nCurFiles, nNr;
STRING szAuto, szConf, szWinIni, szTemp, szTemp1;
begin
_CreateDLG( "DLG_BATCH", 110, HWND_INSTALL );
szAuto = "";
szConf = "";
szWinIni = "";
if (szOSName = "Windows") then
szAuto = szAuto + STR_SHARE;
szAuto = szAuto + "\n";
endif;
szAuto = szAuto + STR_TEMP;
szAuto = szAuto + "\n";
if bProgrammiServer then
szAuto = szAuto + "SET PREFPATH=" + szConfigPath + "\\PREFIX.TXT";
szAuto = szAuto + "\n";
endif;
szTemp = "C:\RESET_HL.EXE";
szAuto = szAuto + szTemp;
szAuto = szAuto + "\n";
EzConfigGetValue( "FILES", nCurFiles );
if nCurFiles < NUM_FILES_IN_CONFIG then
szConf = szConf + "FILES=";
NumToStr( szTemp, NUM_FILES_IN_CONFIG );
szConf = szConf + szTemp;
szConf = szConf + "\n";
endif;
szTemp1 = WINDIR ^ "WIN.INI";
nNr = GetProfString(szTemp1,"FaxMan,EASYFAX","Application",szTemp);
if (nNr < 0 || szTemp = "") then
szWinIni = "[ports]\n";
szWinIni = szWinIni + "EASYFAX=\n";
szWinIni = szWinIni + "[FaxMan,EASYFAX]\n";
szTemp = szAppPath+"bafax.exe";
szWinIni = szWinIni + "Application=" + szTemp + "\n";
szWinIni = szWinIni + "[PrinterPorts]\n";
szWinIni = szWinIni + "FaxMan=fmfaxdrv,EASYFAX,5,5\n";
szWinIni = szWinIni + "[devices]\n";
szWinIni = szWinIni + "FaxMan=fmfaxdrv,EASYFAX\n";
endif;
if szAuto = "" then
szAuto = "Nessuna modifica.";
endif;
if szConf = "" then
szConf = "Nessuna modifica.";
endif;
if szWinIni = "" then
szWinIni = "Nessuna modifica.";
endif;
nGoOut = FALSE;
while nGoOut = FALSE
nRet = WaitOnDialog( "DLG_BATCH");
if ( nRet = DLG_ERR ) then
_Attenzione( STR_ERR_DLG );
nGoOut = TRUE;
endif;
switch( nRet )
case DLG_INIT:
CtrlSetText( "DLG_BATCH", 10, szAuto );
CtrlSetText( "DLG_BATCH", 20, szConf );
CtrlSetText( "DLG_BATCH", 30, szWinIni );
case IDD_CONTINUE:
nRet = TRUE;
nGoOut = TRUE;
case 2:
nRet = FALSE;
nGoOut = TRUE;
case DLG_CLOSE:
nGoOut = TRUE;
endswitch;
endwhile;
EndDialog( "DLG_BATCH" );
ReleaseDialog( "DLG_BATCH" );
return nRet;
end;
//-----------------------------------------------------------------------------
// Funzione che mostra un dialog box di benvenuto
function _Benvenuto( )
NUMBER nGoOut, nRet, nHwnd;
begin
_CreateDLG( "DLG_WELCOME", DLG_WELCOME, HWND_INSTALL );
nGoOut = FALSE;
while nGoOut = FALSE
nRet = WaitOnDialog( "DLG_WELCOME");
if ( nRet = DLG_ERR ) then
_Attenzione( STR_ERR_DLG );
nGoOut = TRUE;
endif;
switch( nRet )
case IDD_EXIT:
_ExitOnConfirm( );
case IDD_CONTINUE:
nGoOut = TRUE;
case DLG_CLOSE:
nGoOut = TRUE;
endswitch;
endwhile;
EndDialog( "DLG_WELCOME" );
ReleaseDialog( "DLG_WELCOME" );
end;
//-----------------------------------------------------------------------------
function _CopiaRESETHL( )
begin
VarSave(SRCTARGETDIR);
TARGETDIR = "C:\\";
SRCDIR = szAppPath;
CopyFile( "RESET_HL.EXE", "RESET_HL.EXE" );
VarRestore(SRCTARGETDIR);
end;
//-----------------------------------------------------------------------------
function _RemoveUnusedFiles( )
STRING szTemp;
begin
// HARDLOCK.VXD e' necessario solo su Win95,
// si <20> scoperto che <20> 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( )
begin
// Forza gli attributi di alcuni file per evitare che siano a sola lettura:
szTmp = szAppPath ^ "HARDLOCK.FLL";
_Cambia_Attributi(szTmp);
szTmp = szAppPath ^ "AGA.FLL";
_Cambia_Attributi(szTmp);
szTmp = szAppPath ^ "AGALIGHT.FLL";
_Cambia_Attributi(szTmp);
szTmp = szAppPath ^ "FOXW2600.ESL";
_Cambia_Attributi(szTmp);
szTmp = szAppPath ^ "AL100.DLL"; // Da cambiare se cambia versione
_Cambia_Attributi(szTmp);
szTmp = szAppPath ^ "CB5.DLL";
_Cambia_Attributi(szTmp);
szTmp = szAppPath ^ "DEVPRN.DLL";
_Cambia_Attributi(szTmp);
szTmp = szAppPath ^ "DLLGFM.DLL";
_Cambia_Attributi(szTmp);
szTmp = szAppPath ^ "MSAES110.DLL";
_Cambia_Attributi(szTmp);
szTmp = szAppPath ^ "MSAJT112.DLL";
_Cambia_Attributi(szTmp);
szTmp = szAppPath ^ "MSAJT200.DLL";
_Cambia_Attributi(szTmp);
szTmp = szAppPath ^ "VBDB300.DLL";
_Cambia_Attributi(szTmp);
szTmp = szAppPath ^ "VBRUN300.DLL";
_Cambia_Attributi(szTmp);
szTmp = szAppPath ^ "XBS200.DLL";
_Cambia_Attributi(szTmp);
szTmp = szAppPath ^ "WINSOCK.DLL";
_Cambia_Attributi(szTmp);
end;
//-----------------------------------------------------------------------------
// chiede conferma per l'uscita ed esce
function _ExitOnConfirm( )
begin
if ! _Verifica( "Desideri veramente terminare la installazione ?" ) then
return;
endif;
_ShowExitDialog( DLG_EXITQUIT );
exit;
end;
//-----------------------------------------------------------------------------
function _FineInstallazione( )
STRING szRunProgram[ _MAX_LENGTH ];
LONG lGoOut, lRet, lHwnd, lFlag;
begin
_CreateDLG( "DLG098", ID_DLG098, HWND_INSTALL );
lGoOut = FALSE;
while lGoOut = FALSE
lRet = WaitOnDialog("DLG098");
if ( lRet = DLG_ERR ) then
_Attenzione( STR_ERR_DLG );
lGoOut = TRUE;
endif;
switch( lRet )
case DLG_INIT:
lHwnd = CmdGetHwndDlg( "DLG098" );
if nSystemFileModified then
CtrlSetText( "DLG098", ID_DLG098_RUN, "Riavvia il computer" );
CtrlSetText( "DLG098", 1004, "I files di sistema sono cambiati.\nOccorrera' riavviare il computer perche' le modifiche siano attive." );
endif;
case ID_DLG098_RUN:
lFlag = FALSE;
lGoOut = TRUE;
case ID_DLG098_EXIT:
lFlag = TRUE;
lGoOut = TRUE;
case DLG_CLOSE:
lGoOut = TRUE;
endswitch;
endwhile;
EndDialog( "DLG098" );
ReleaseDialog( "DLG098" );
if ( lFlag = FALSE ) then
if nSystemFileModified then
System( SYS_BOOTMACHINE );
else
// ChangeDirectory(szAppPath);
// szRunProgram = szAppPath ^ "\\BA1.EXE -0 C";
// LaunchApp( szRunProgram , "" );
endif;
return TRUE;
else
return FALSE;
endif;
end;
function _CanOverwrite( )
BOOL bRetv;
NUMBER nTemp;
STRING szPath[256],szTemp[80],szJunk[80];
begin
bRetv=FALSE;
szPath=szDataPath ^ "\\CONFIG";
szTemp=szPath ^ DATATYPE_FILE;
if ( Is( FILE_EXISTS, szTemp ) ) then
OpenFileMode( FILE_MODE_NORMAL );
OpenFile( nTmp, szPath, DATATYPE_FILE);
if GetLine( nTmp, szTemp ) = 0 then
if szTemp = INST_DEMO then
bRetv=_Verifica("Il direttorio indicato contiene dati \ndi una precedente installazione demo.\n\nConfermi la sovrascrittura");
elseif szTemp = INST_AUTOFORM then
if sInstType = INST_ENVIRONMENT || sInstType = INST_AUTOFORM then
bRetv=_Verifica("Il direttorio indicato contiene i dati \ndi una precedente installazione di autoformazione.\n\nConfermi la sovrascrittura");
else
MessageBox("Impossibile scrivere i dati nel direttorio indicato.\nIl direttorio contiene gia' i dati di una precedente installazione \ndi autoformazione.",SEVERE);
endif;
elseif szTemp = INST_ENVIRONMENT then
MessageBox("Impossibile scrivere i dati nel direttorio indicato.\nIl direttorio contiene gia' i dati di una precedente installazione.",SEVERE);
endif;
else
MessageBox( "Il direttorio indicato contiene dati \ndi una precedente installazione.",SEVERE);
endif;
CloseFile( nTmp );
else
MessageBox( "Impossibile installare. Il direttorio indicato contiene dati \ndi una precedente installazione.",SEVERE);
endif;
return bRetv;
end;