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
594 lines
19 KiB
Plaintext
Executable File
594 lines
19 KiB
Plaintext
Executable File
function _SetPathpref( )
|
|
STRING szTmpPath[_MAX_LENGTH];
|
|
STRING szPrgPath[_MAX_LENGTH];
|
|
STRING szTmp;
|
|
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)
|
|
|
|
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, szPrgPath, "PATHPREF.INI" );
|
|
WriteLine( nHandle, szDataPath );
|
|
CloseFile( nHandle );
|
|
ChangeDirectory( szPrgPath);
|
|
if ( Is( FILE_EXISTS, "PREFIX.TXT" )) then
|
|
DeleteFile("PREFIX.TXT" );
|
|
endif;
|
|
CreateFile( nHandle, szPrgPath, "PREFIX.TXT" );
|
|
WriteLine( nHandle, "COM" );
|
|
CloseFile( nHandle );
|
|
// scrive le stesse cose nel file unico prawin.ini , se esiste
|
|
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" ,"");
|
|
endif;
|
|
endif;
|
|
end;
|
|
|
|
//-----------------------------------------------------------------------------
|
|
// **** Funzione per aggiornare i files di sistema
|
|
// ****
|
|
function _UpdateSysFiles( )
|
|
NUMBER nNotModify, nGoOut, nRet, nInfo, nCurFiles, nLen, nNr;
|
|
STRING szTemp[_MAX_LENGTH], szWin_Ini[_MAX_LENGTH], szSaveDir[_MAX_LENGTH];
|
|
begin
|
|
if (!bNuovaInst) && (!bInstallNetWrk) then
|
|
return;
|
|
endif;
|
|
nSystemFileModified = TRUE;
|
|
nNotModify = FALSE;
|
|
nInfo = FALSE;
|
|
nGoOut = FALSE;
|
|
SetDialogTitle(DLG_ASK_OPTIONS, "Modifica ai 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;
|
|
|
|
// Modifiche per installare BAFAX & FAXMAN (30 settembre 1996)
|
|
if (bProgrammiServer) then
|
|
szSaveDir = szConfigPath;
|
|
else
|
|
szSaveDir = szAppPath;
|
|
endif;
|
|
|
|
VarSave(SRCTARGETDIR);
|
|
SRCDIR = WINDIR;
|
|
TARGETDIR = szSaveDir;
|
|
CopyFile( "WIN.INI", "WIN.PRA" );
|
|
VarRestore(SRCTARGETDIR);
|
|
// Fine modifiche del 30 settembre 1996
|
|
VarSave(SRCTARGETDIR);
|
|
SRCDIR = "C:\\";
|
|
TARGETDIR = szSaveDir;
|
|
CopyFile( "AUTOEXEC.BAT", "AUTOEXEC.PRA" );
|
|
CopyFile( "CONFIG.SYS", "CONFIG.PRA" );
|
|
VarRestore(SRCTARGETDIR);
|
|
if nSystemFileModified then
|
|
BatchSetFileName( "C:\\AUTOEXEC.BAT" );
|
|
ConfigSetFileName( "C:\\CONFIG.SYS" );
|
|
szWin_Ini = WINDIR ^ "WIN.INI";
|
|
else
|
|
szTemp = szSaveDir ^ "AUTOEXEC.PRA";
|
|
BatchSetFileName( szTemp );
|
|
szTemp = szSaveDir ^ "CONFIG.PRA";
|
|
ConfigSetFileName( szTemp );
|
|
szWin_Ini = szSaveDir ^ "WIN.PRA";
|
|
endif;
|
|
if (szOSName = "Windows") then
|
|
EzBatchReplace( STR_SHARE );
|
|
endif;
|
|
EzBatchReplace( STR_TEMP );
|
|
if (bProgrammiServer) then
|
|
szTemp = szConfigPath ^ "PREFIX.TXT";
|
|
szTemp ="SET PREFPATH=" + szTemp;
|
|
EzBatchReplace(szTemp);
|
|
endif;
|
|
szTemp = "C:\\RESET_HL.EXE";
|
|
EzBatchReplace( szTemp );
|
|
nLen = StrLength( szAppPath );
|
|
// Controlla se c'e' la backslash finale, in tale caso lo elimina
|
|
// Comunque questa stringa non avra' piu' bisogno di essere installata
|
|
// in AUTOEXEC.BAT per quanto concerne il PATH
|
|
StrSub(szTemp, szAppPath, nLen - 1, 1);
|
|
if (szTemp = "\\") then
|
|
StrSub( szTemp, szAppPath, 0, nLen - 1);
|
|
else
|
|
szTemp = szAppPath;
|
|
endif;
|
|
EzBatchAddPath( "PATH", szTemp, "", AFTER );
|
|
EzConfigGetValue( "FILES", nCurFiles );
|
|
if nCurFiles < NUM_FILES_IN_CONFIG then
|
|
EzConfigSetValue( "FILES", NUM_FILES_IN_CONFIG );
|
|
endif;
|
|
|
|
// *****************
|
|
// Modifiche per installare BAFAX & FAXMAN
|
|
|
|
nNr = GetProfString(szWin_Ini,"FaxMan,EASYFAX","Application",szTemp);
|
|
if (nNr <0 || szTemp = "") then
|
|
WriteProfString(szWin_Ini,"ports","EASYFAX"," ");
|
|
szTemp = szAppPath ^ "bafax.exe";
|
|
WriteProfString(szWin_Ini,"FaxMan,EASYFAX","Application",szTemp);
|
|
WriteProfString(szWin_Ini,"PrinterPorts","FaxMan","fmfaxdrv,EASYFAX,5,5");
|
|
WriteProfString(szWin_Ini,"devices","FaxMan","fmfaxdrv,EASYFAX");
|
|
endif;
|
|
// *****************
|
|
if nSystemFileModified then
|
|
SprintfBox( WARNING, "Attenzione", STR_FILE_MODIFIED, szSaveDir );
|
|
else
|
|
SprintfBox( WARNING, "Attenzione", STR_FILE_NOTMODIFIED, szSaveDir );
|
|
endif;
|
|
end;
|
|
|
|
//-----------------------------------------------------------------------------
|
|
// **** Funzione per cancellare i files minimi per il fascicolatore
|
|
function _DeleteFilesMinima( )
|
|
NUMBER pDataList, pProgramList, nFile, nFlag, nLen;
|
|
STRING szPath [ _MAX_LENGTH ], szFileName [ _MAX_LENGTH ], szFC [ 2 ], szLine [ _MAX_LENGTH ];
|
|
|
|
begin
|
|
|
|
if !bNuovaInst then
|
|
szPath=szAppPath ^ "install.ini";
|
|
GetProfString(szPath,"Main","Demo",szFC);
|
|
if szFC = "X" then
|
|
// cancella tutti gli eseguibili per evitare sovrapposizioni tra versione demo e normale
|
|
szPath=szAppPath;
|
|
nLen=FindAllFiles(szAppPath, "*.EXE", szFileName, RESET);
|
|
while (nLen=0 )
|
|
DeleteFile(szFileName);
|
|
nLen=FindAllFiles(szAppPath, "*.EXE", szFileName, CONTINUE);
|
|
endwhile;
|
|
endif;
|
|
endif;
|
|
|
|
//************
|
|
// ?????????
|
|
//
|
|
pDataList = ListCreate( STRINGLIST );
|
|
if ( pDataList = LIST_NULL ) then
|
|
_Errore( "Errore in ListCreate ( DataList )" );
|
|
exit;
|
|
endif;
|
|
pProgramList = ListCreate( STRINGLIST );
|
|
if ( pProgramList = LIST_NULL ) then
|
|
_Errore( "Errore in ListCreate ( ProgramList )" );
|
|
exit;
|
|
endif;
|
|
OpenFileMode( FILE_MODE_NORMAL );
|
|
szPath = SRCDIR;
|
|
szFileName = "FTODEL.DAT";
|
|
OpenFile( nFile, szPath, szFileName );
|
|
nFlag = GetLine( nFile, szLine );
|
|
while( nFlag = 0 )
|
|
StrSub( szFC, szLine, 0, 1 );
|
|
nLen = StrLength( szLine);
|
|
StrSub( szFileName, szLine, 1, nLen - 1 );
|
|
if ( szFC != "#" ) then
|
|
if ( szFC = "D" ) then
|
|
ListAddString( pDataList, szFileName, AFTER );
|
|
else
|
|
ListAddString( pProgramList, szFileName, AFTER );
|
|
endif;
|
|
endif;
|
|
nFlag = GetLine( nFile, szLine );
|
|
endwhile;
|
|
CloseFile( nFile );
|
|
VarSave( SRCTARGETDIR );
|
|
TARGETDIR = szDataPath;
|
|
nFlag = ListGetFirstString( pDataList, szLine );
|
|
while ( nFlag = 0 )
|
|
DeleteFile( szLine );
|
|
nFlag = ListGetNextString( pDataList, szLine );
|
|
endwhile;
|
|
ListDestroy( pDataList );
|
|
nFlag = ListGetFirstString( pProgramList, szLine );
|
|
TARGETDIR = szAppPath;
|
|
while ( nFlag = 0 )
|
|
DeleteFile( szLine );
|
|
nFlag = ListGetNextString( pProgramList, szLine );
|
|
endwhile;
|
|
ListDestroy( pProgramList );
|
|
VarRestore( SRCTARGETDIR );
|
|
end;
|
|
|
|
|
|
// ****
|
|
function _InstallaFilesMinima ( )
|
|
NUMBER nRet, ntDisk, nHandle;
|
|
BOOL bRightDisk;
|
|
STRING szTemp [_MAX_LENGTH];
|
|
STRING szStatusText [_MAX_LENGTH];
|
|
begin
|
|
|
|
|
|
// Backup TARGETDIR to local variable
|
|
// Define fileset items
|
|
// --------------------- //
|
|
|
|
SetColor(STATUSBAR,BLUE);
|
|
Enable(FEEDBACK_OPERATION);
|
|
Enable(STATUS);
|
|
|
|
|
|
FileSetBeginDefine ( "WIN");
|
|
TARGETDIR = WINDIR ^ "SYSTEM";
|
|
if ( CompressGet( "WINSYS.Z", "*.*", INCLUDE_SUBDIR ) < 0) then
|
|
szText = STR_ERR_DECOMPRESS + " la libreria WINSYS.";
|
|
_Errore( szText );
|
|
endif;
|
|
if ( CompressGet( "WINSYSCG.Z", "*.*", INCLUDE_SUBDIR ) < 0) then
|
|
szText = STR_ERR_DECOMPRESS + " la libreria WINSYSCG.";
|
|
_Errore( szText );
|
|
endif;
|
|
FileSetEndDefine ( "WIN");
|
|
|
|
FileSetBeginDefine ( "BA");
|
|
TARGETDIR = szAppPath;
|
|
if ( CreateDir( TARGETDIR ) < 0 ) then
|
|
_Errore( STR_DIR_NOTCREATED );
|
|
else
|
|
if ( CompressGet( "SYS.Z", "*.*", INCLUDE_SUBDIR ) < 0) then
|
|
szText = STR_ERR_DECOMPRESS + " la libreria SYS.";
|
|
_Errore( szText );
|
|
endif;
|
|
if bInstallDemo then
|
|
szText = "BADEMO.Z";
|
|
else
|
|
szText = "BA.Z";
|
|
endif;
|
|
if ( CompressGet( szText, "*.*", INCLUDE_SUBDIR ) < 0) then
|
|
szText = STR_ERR_DECOMPRESS + " il programma installatore";
|
|
_Errore( szText );
|
|
endif;
|
|
endif;
|
|
FileSetEndDefine ( "BA");
|
|
|
|
StrToUpper( szAppPath, szAppPath );
|
|
szStatusText = "Installazione su " + szAppPath;
|
|
StatusUpdate( ON, 50 );
|
|
SetStatusWindow( 0, "Installazione librerie e programmi di ambiente ..." );
|
|
_PerformSet ( "WIN");
|
|
|
|
StatusUpdate( ON, 100 );
|
|
SetStatusWindow( 50, "Installazione programmi di base .." );
|
|
_PerformSet ( "BA");
|
|
|
|
szTemp = szAppPath ^ "RECDESC";
|
|
CreateDir(szTemp);
|
|
|
|
Disable(STATUS);
|
|
|
|
end;
|
|
|
|
function _PerformSet ( sFileset)
|
|
NUMBER nDisk;
|
|
BOOL bDone;
|
|
NUMBER nRet, ntDisk, nHandle;
|
|
BOOL bRightDisk;
|
|
STRING szTemp [_MAX_LENGTH];
|
|
STRING szTmp [_MAX_LENGTH];
|
|
STRING szFileName [_MAX_LENGTH];
|
|
STRING szExt [_MAX_LENGTH];
|
|
STRING szText [_MAX_LENGTH];
|
|
STRING szEntDisk [_MAX_LENGTH];
|
|
STRING szMsg [_MAX_LENGTH];
|
|
begin
|
|
bDone = FALSE;
|
|
nDisk = 1;
|
|
while ( !bDone )
|
|
|
|
nRet = FileSetPerformEz ( sFileset, 1);
|
|
switch ( nRet )
|
|
case FS_TONEXTDISK:
|
|
// non usato da FileSetPerformEz
|
|
if nDisk > 0 then
|
|
NumToStr( szExt, nDisk );
|
|
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 );
|
|
switch( nRet )
|
|
case DISKID:
|
|
_Attenzione( "L'unita' indicata non e' valida." );
|
|
case BADPATH:
|
|
_Attenzione( "Il percorso indicato non e' valido." );
|
|
case DRIVEOPEN:
|
|
_Attenzione( "Inserire il disco nell'unita' indicata!" );
|
|
case BADTAGFILE:
|
|
_Attenzione( "Il disco inserito non e' corretto. Inserire il disco richiesto." );
|
|
case CANCEL:
|
|
_ExitOnConfirm( );
|
|
case OK:
|
|
bRightDisk = TRUE;
|
|
endswitch;
|
|
endwhile;
|
|
endif;
|
|
case FS_OPERROR:
|
|
Sprintf( szMsg, "E' stato rilevato un errore copiando il file %s. Il file non e' stato copiato.\n\nErrore FS_OPERROR.", ERRORFILENAME );
|
|
_Errore( szMsg );
|
|
case FS_GENERROR:
|
|
Sprintf( szMsg, "E' stato rilevato un errore copiando il file %s. Il file non e' stato copiato.\n\nErrore FS_GENERROR.", ERRORFILENAME );
|
|
_Errore( szMsg );
|
|
case FS_TARGETREADONLY:
|
|
szMsg="Impossibile scrivere nella directory di destinazione.";
|
|
_Errore( szMsg );
|
|
case FS_INCORRECTDISK:
|
|
_Attenzione( "Disco non valido.\n\nInserire il disco corretto." );
|
|
case FS_DISKONEREQUIRED:
|
|
szEntDisk = STR_INSERTDISK + STR_TAGDISK1;
|
|
_Attenzione( szEntDisk );
|
|
case FS_RESETREQUIRED:
|
|
_Errore( "Impossibile copiare il file a causa di un errore interno." );
|
|
case FS_OUTOFSPACE:
|
|
szMsg= "Lo spazio su disco non e' stato sufficiente per completare la copia dei files.\n\nErrore FS_OUTOFSPACE.";
|
|
_Errore( szMsg );
|
|
case FS_DONE:
|
|
bDone = TRUE;
|
|
default :
|
|
if ( nRet < 0 ) then
|
|
szMsg = "Si e' verificato un errore copiando e decomprimendo il file " ^ ERRORFILENAME;
|
|
_Errore( szMsg );
|
|
endif;
|
|
endswitch;
|
|
endwhile;
|
|
FileSetEndPerform ( sFileset);
|
|
end;
|
|
|
|
// aggiorna il registry (o il ProgramManager)
|
|
function _UpdateRegistry( )
|
|
STRING szItemName [_MAX_LENGTH],
|
|
szFolder [_MAX_LENGTH],
|
|
szCmdLine [_MAX_LENGTH],
|
|
szIconPath [_MAX_LENGTH],
|
|
szWorkingDir[_MAX_LENGTH];
|
|
begin
|
|
Enable( HOURGLASS );
|
|
// Mostra Program Manager
|
|
AppCommand( PROGMAN, CMD_RESTORE );
|
|
// Aggiunge il gruppo di programmi ed i programmi
|
|
szFolder="EuroCAMPO";
|
|
ShowGroup (szFolder , SW_NORMAL );
|
|
if ( TRUE) then
|
|
// Aggiunge EuroCAMPO Program Manager
|
|
if bInstallDemo then
|
|
szItemName = "EuroCAMPO Demo";
|
|
elseif bInstallNetWrk then
|
|
szItemName = "EuroCAMPO WST";
|
|
else
|
|
szItemName = "EuroCAMPO";
|
|
endif;
|
|
szCmdLine = szAppPath ^ "\\BA0.EXE";
|
|
szIconPath = szCmdLine;
|
|
AddFolderIcon( szFolder, szItemName, szCmdLine, "", szIconPath, 0, "", REPLACE );
|
|
//AddProgItemEx ( szFolder, szItemName, szCmdLine, "", szIconPath, 0, "", REPLACE );
|
|
endif;
|
|
AppCommand( PROGMAN, CMD_MINIMIZE );
|
|
Disable( HOURGLASS );
|
|
end;
|
|
|
|
//-----------------------------------------------------------------------------
|
|
function _CambiaDirectory( )
|
|
STRING szText[ _MAX_LENGTH ];
|
|
STRING szModifiedPath[ _MAX_LENGTH ];
|
|
STRING szUserSelectedDrive[ _MAX_LENGTH ];
|
|
STRING szIncorrectPath[ _MAX_LENGTH ];
|
|
begin
|
|
szText = STR_TEXT1;
|
|
SetDialogTitle( DLG_ASK_PATH, "Directory per installare i programmi" );
|
|
if ( AskPath( szText , szAppPath, szModifiedPath ) = OK ) then
|
|
StrToUpper( szModifiedPath, szModifiedPath );
|
|
GetDisk( szModifiedPath, szUserSelectedDrive );
|
|
if ( Is ( VALID_PATH, szModifiedPath ) = 1 ) then
|
|
if szAppPath != szModifiedPath then
|
|
szAppPath = szModifiedPath;
|
|
szDataPath = szAppPath ^ "DATI\\";
|
|
endif;
|
|
szText = STR_DATATEXT1;
|
|
SetDialogTitle( DLG_ASK_PATH, "Directory per installare i dati" );
|
|
if ( AskPath( szText , szDataPath, szModifiedPath ) = OK ) then
|
|
StrToUpper( szModifiedPath, szModifiedPath );
|
|
GetDisk( szModifiedPath, szUserSelectedDrive );
|
|
if ( Is ( VALID_PATH, szModifiedPath ) = 1 ) then
|
|
szDataPath = szModifiedPath;
|
|
else
|
|
szIncorrectPath = STR_INVALID_PATH + "\n" + szModifiedPath;
|
|
_Attenzione( szIncorrectPath );
|
|
endif;
|
|
endif;
|
|
endif;
|
|
endif;
|
|
end;
|
|
|
|
//-----------------------------------------------------------------------------
|
|
// copia il file PRASSI.INI
|
|
function _CopiaPRASSIINI( )
|
|
STRING szPath[_MAX_LENGTH], szFileName[_MAX_LENGTH], szLine[ _MAX_LENGTH], szFC[ 2 ], szTmp[ _MAX_LENGTH];
|
|
NUMBER nFlag, nFileIn, nFileOut, nLoop;
|
|
|
|
begin
|
|
szPath = szDataPath ^ "CONFIG";
|
|
szTmp = szPath ^ "PRASSI.INI";
|
|
if ( ! Is( FILE_EXISTS, szTmp ) ) then
|
|
if ExistsDir( szPath ) = NOTEXISTS then
|
|
if ( CreateDir( szPath ) < 0 ) then
|
|
_Errore( "Impossibile creare la directory CONFIG sotto i dati!" );
|
|
endif;
|
|
endif;
|
|
szFileName = "PRASSI.INI";
|
|
OpenFileMode( FILE_MODE_APPEND );
|
|
CreateFile( nFileOut, szPath, szFileName );
|
|
OpenFileMode( FILE_MODE_NORMAL );
|
|
szPath = szAppPath;
|
|
OpenFile( nFileIn, szPath, szFileName );
|
|
nFlag = GetLine( nFileIn, szLine );
|
|
while( nFlag = 0 )
|
|
if szLine = "[Colors]" then
|
|
nLoop = 0;
|
|
while( nLoop = 0 )
|
|
WriteLine( nFileOut, szLine );
|
|
nFlag = GetLine( nFileIn, szLine );
|
|
nLoop = nFlag;
|
|
if ( nLoop = 0 ) then
|
|
StrSub( szFC, szLine, 0, 1 );
|
|
if ( szFC != "[" ) then
|
|
nFlag = GetLine( nFileIn, szLine );
|
|
else
|
|
nLoop = 1;
|
|
endif;
|
|
endif;
|
|
endwhile;
|
|
else
|
|
if szLine = "[Font]" then
|
|
nLoop = 0;
|
|
while( nLoop = 0 )
|
|
WriteLine( nFileOut, szLine );
|
|
nFlag = GetLine( nFileIn, szLine );
|
|
nLoop = nFlag;
|
|
if ( nLoop = 0 ) then
|
|
StrSub( szFC, szLine, 0, 1 );
|
|
if ( szFC != "[" ) then
|
|
nFlag = GetLine( nFileIn, szLine );
|
|
else
|
|
nLoop = 1;
|
|
endif;
|
|
endif;
|
|
endwhile;
|
|
else
|
|
nFlag = GetLine( nFileIn, szLine );
|
|
endif;
|
|
endif;
|
|
endwhile;
|
|
CloseFile( nFileIn );
|
|
CloseFile( nFileOut );
|
|
endif;
|
|
end;
|
|
|
|
//-----------------------------------------------------------------------------
|
|
// copia il file INSTALL.INI
|
|
function _CopiaINSTALLINI( )
|
|
STRING szPath[_MAX_LENGTH], szFileName[_MAX_LENGTH], szLine[ _MAX_LENGTH], szFC[ 2 ], szTmp[ _MAX_LENGTH];
|
|
STRING szSrcPath[_MAX_LENGTH];
|
|
NUMBER nFlag, nFileOut, nLoop;
|
|
begin
|
|
// 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;
|
|
|
|
|
|
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);
|
|
// ******
|
|
if bInstallDemo then
|
|
szTmp = "X";
|
|
else
|
|
szTmp = " ";
|
|
endif;
|
|
szPath=szAppPath ^ "install.ini";
|
|
if WriteProfString(szPath,"Main","Demo",szTmp) < 0 then
|
|
_Attenzione("Impossibile scrivere il tipo della versione su install.ini");
|
|
endif;
|
|
end;
|
|
|
|
//-----------------------------------------------------------------------------
|
|
function _ProgramPrologue()
|
|
begin
|
|
// setta lo sfondo
|
|
// Abilita il pulsante Exit
|
|
// Disabilita lo screen-saver
|
|
// Mostra una immagine nell'angolo in alto a destra
|
|
_GetOSName( ); // Reperisce il nome del sistema operativo in szOSName
|
|
SetDialogTitle (DLG_ASK_OPTIONS, "Seleziona i componenti");
|
|
SetDialogTitle (DLG_ASK_TEXT, "");
|
|
SetDialogTitle (DLG_ASK_YESNO, "Domanda");
|
|
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;
|
|
|
|
function _ProgramEpilogue()
|
|
begin
|
|
_FineInstallazione( );
|
|
_RiattivaScreenSaver( );
|
|
end;
|
|
|
|
|
|
|