added installer full stuff

git-svn-id: svn://scm.gforge.inria.fr/svnroot/paradiseo@798 331e1502-861f-0410-8da2-ba01fb791d7f
This commit is contained in:
legrand 2007-11-22 16:28:34 +00:00
commit 8ae1c8c30d

View file

@ -1,77 +1,104 @@
; Script generated by the Inno Setup Script Wizard.
; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES!
; ParadisEO install script
; Author: Thomas Legrand
#define generatorWizardPageIndex= 7
#define launchBuildWizardPageIndex= 12
[Setup]
AppName=ParadisEO
AppVerName=ParadisEO-ix86-1.1
AppVerName=ParadisEO-ix86-1.0
AppPublisher=INRIA Futurs Dolphin Project-team
AppPublisherURL=http://paradiseo.gforge.inria.fr
AppSupportURL=http://paradiseo.gforge.inria.fr
AppUpdatesURL=http://paradiseo.gforge.inria.fr
DefaultDirName={pf}\ParadisEO
DefaultGroupName=ParadisEO
LicenseFile=E:\software\paradisEO\windows installer\LICENSE.txt
InfoBeforeFile=E:\software\paradisEO\windows installer\INSTRUCTIONS.txt
InfoAfterFile=E:\software\paradisEO\windows installer\FINAL_INSTRUCTIONS.txt
LicenseFile=E:\software\paradisEO\repository\trunk\LICENSE
OutputDir=E:\software\paradisEO\windows installer\compiler output
OutputBaseFilename=paradiseo-1.0-win32-installer
Compression=lzma
OutputBaseFilename=paradiseo-1.0-win32-preinstaller
Compression=lzma/max
SolidCompression=yes
WizardImageFile=E:\software\paradisEO\img\paradisEO.bmp
WizardImageFile=E:\software\paradisEO\repository\utilities\trunk\windows\img\paradiseo.bmp
SetupIconFile=E:\software\paradisEO\repository\utilities\trunk\windows\img\paradiseo.ico
UninstallDisplayName=ParadisEO
WindowVisible=False
RestartIfNeededByRun=False
ShowTasksTreeLines=True
VersionInfoVersion=1.0
VersionInfoCompany=INRIA
VersionInfoDescription=ParadisEO
VersionInfoTextVersion=ParadisEO
[Languages]
Name: "english"; MessagesFile: "compiler:Default.isl"
Name: "french"; MessagesFile: "compiler:Languages\French.isl"
[Tasks]
Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked
[CustomMessages]
english.CMakeMissing=CMake cannot be found on your computer. You must have CMake installed to use ParadisEO.
english.FullInstall=Full installation
english.CustomInstall=Custom installation
english.EoDescription=EO: Evolving Objects: Library for evolutionnary computation
english.MoDescription=MO: Moving Objects: Single based metaheuristics computation
english.MoeoDescription=MOEO: Multi Objective Evolving Objects
english.ErrorOccured=An error has occured
english.LaunchingBuildProcess=Launching CMake build process...
english.error=Error
english.ErrorAbort=Error,abort.
english.CannotCompleteInstall=Impossible to complete the install of
english.BPFinished=Finished
english.BPSuccessfull=The build process has been successfully performed.
english.SelectCompiler=Select the program you want to use to compile:
english.ChooseGenerator=ParadisEO can be compiled using several generators.
english.GenCMakeFiles=Generate CMake configuration files
english.BuildProcess=
english.NextGenCaption=Click on the 'Next' button to launch the build process and generate the configuration files
english.ProcessingCMake=Generating the configuration files...
english.DolphinMsg=ParadisEO: An INRIA Dolphin Team project - 2007
;---------------------------------------------------------------------------------------------------------------------------------
french.CMakeMissing=CMake n'a pas été détecté sur votre ordinateur. CMake doit être installé pour utiliser ParadisEO.
french.FullInstall=Installation complète
french.CustomInstall=Installation personnalisée
french.EoDescription= EO: Evolving Objects: Librairie dédiée aux méthodes évolutionnaires
french.MoDescription= MO: Moving Objects: Métaheuristiques à base de solutions uniques
french.MoeoDescription= MOEO: Multi Objective Evolving Objects: Module multi-objectif
french.ErrorOccured=Une erreur est survenue
french.LaunchingBuildProcess=Construction des fichiers de configuration (build process)...
french.error=Erreur
french.ErrorAbort=Une erreur est survenue, installation annulée.
french.CannotCompleteInstall=Impossible de terminer l'installation de
french.BPFinished=Fin de la construction des fichiers de configuration
french.BPSuccessfull=Succès.
french.SelectCompiler=Sélectionnez le programme que vous souhaitez utiliser pour compiler:
french.ChooseGenerator=ParadisEO peut être compiler par plusieurs programmes.
french.GenCMakeFiles=Générer les fichiers de configuration CMake
french.BuildProcess=
french.NextGenCaption=Cliquez sur le bouton 'Suivant' pour lancer CMake et générer les fichiers de configuration
french.ProcessingCMake=Génération des fichiers de configuration en cours...
french.DolphinMsg=ParadisEO: Un projet de l'équipe INRIA Dolphin - 2007
[Types]
Name: "full"; Description: "Full installation"
Name: "custom"; Description: "Custom installation"; Flags: iscustom
Name: "custom"; Description: {cm:CustomInstall}; Flags: iscustom
Name: "full"; Description: {cm:FullInstall}
[Components]
Name: "eo"; Description: "EO: Evolving Objects: Library for evolutionnary computation"; Types: full custom; Flags: fixed
Name: "mo"; Description: "MO: Moving Objects: Single based mateheuristics computation"; Types: full custom ; Flags: checkablealone
Name: "mo\doc"; Description: "Documentation (html, latex, man)"; Types: full custom; Flags: dontinheritcheck
Name: "mo\tutorial"; Description: "Ready-to-use tutorials"; Types: full custom; Flags: dontinheritcheck
Name: "moeo"; Description: "MOEO: Multi Objective Evolving Objects"; Types: full ; Flags: checkablealone
Name: "moeo\doc"; Description: "Documentation (html, latex, man)"; Types: full custom; Flags: dontinheritcheck
Name: "moeo\tutorial"; Description: "Ready-to-use tutorials"; Types: full custom; Flags: dontinheritcheck
;---------------------------------------------------------------------------------------------------------------------------------
Name: eo; Description: {cm:EoDescription}; Types: full custom; Flags: fixed
Name: mo; Description:{cm:MoDescription}; Types: full custom;
Name: moeo; Description: {cm:MoeoDescription}; Types: full custom;
[Files]
Source: "E:\software\paradisEO\windows installer\files\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs
// Source: "E:\software\paradisEO\windows installer\files\generator.config"; DestDir: "{app}"; AfterInstall: LaunchBuildProcess() ;
Source: "E:\software\paradisEO\repository\tags\paradiseo-ix86-1.0\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs
[Icons]
Name: "{group}\ParadisEO"; Filename: "{app}\genParadisEOSol.bat"
Name: "{commondesktop}\ParadisEO"; Filename: "{app}\genParadisEOSol.bat"; Tasks: desktopicon
[Run]
Filename: "{app}\genParadisEOSol.bat"; Description: "{cm:LaunchProgram, Lancer la compilation}"; Flags: nowait postinstall skipifsilent
[Code]
var
GeneratorPage: TWizardPage;
BuildProcessPage: TWizardPage;
ProgressPage: TOutputProgressWizardPage;
GeneratorBox: TNewCheckListBox;
Generator: String;
ProgressBarLabel: TLabel;
ProgressBar: TNewProgressBar;
procedure SetCmakeGenerator();
begin
@ -113,97 +140,177 @@ begin
end;
procedure onErrorMsg(ErrorCode: Integer);
function isError(ErrorCode: Integer): Boolean;
begin
MsgBox('An error has occured. Impossible to complete the install', mbError, mb_Ok);
exit;
if not (ErrorCode = 0) then
begin
MsgBox(CustomMessage('ErrorOccured') + ': [code='+ IntToStr(ErrorCode) + ']' , mbCriticalError, mb_Ok);
Result:= true;
end else begin
Result:= false;
end;
end;
procedure LaunchBuildProcess();
function checkCMakeAvailable(): Integer;
var
ErrorCode: Integer;
FilePath: String;
begin
// Need the app path
FilePath := ExpandConstant('{app}');
// Set the Cmake generator
SetCmakeGenerator();
// launch CMake for MOEO
ShellExec('open', 'cmake.exe','','', SW_SHOWNORMAL, ewWaitUntilTerminated, ErrorCode);
Result:= ErrorCode;
end;
function LaunchEOBuildProcess():Integer;
var
ErrorCode: Integer;
FilePath: String;
begin
// Need the app path
FilePath := ExpandConstant('{app}');
// launch CMake for EO
if not ShellExec('open', 'cmake.exe', ' ..\' + ' -G"' + Generator + '"', FilePath +'\paradiseo-eo\build', SW_SHOWNORMAL, ewWaitUntilTerminated, ErrorCode) then
begin
onErrorMsg(ErrorCode);
end;
ShellExec('open', 'cmake.exe', ' ..\' + ' -G"' + Generator + '"', FilePath +'\paradiseo-eo\build', SW_SHOWNORMAL, ewWaitUntilTerminated, ErrorCode);
// launch CMake for MO
if not ShellExec('open', 'cmake.exe', ' ..\' + ' -G"' + Generator + '"', FilePath +'\paradiseo-mo\build', SW_SHOWNORMAL, ewWaitUntilTerminated, ErrorCode) then
begin
onErrorMsg(ErrorCode);
end;
Result:= ErrorCode;
end;
function LaunchMOBuildProcess(): Integer;
var
ErrorCode: Integer;
FilePath: String;
begin
// Need the app path
FilePath := ExpandConstant('{app}');
// launch CMake for MOEO
if not ShellExec('open', 'cmake.exe', ' ..\' + ' -G"' + Generator + '"' + ' -Dconfig=' + FilePath + '\install.cmake', FilePath +'\paradiseo-moeo\build', 0, ewWaitUntilTerminated, ErrorCode) then
begin
onErrorMsg(ErrorCode);
end;
end;
ShellExec('open', 'cmake.exe', ' ..\' + ' -G"' + Generator + '" -Dconfig="'+FilePath + '\install.cmake"', FilePath +'\paradiseo-mo\build', SW_SHOWNORMAL, ewWaitUntilTerminated, ErrorCode);
function ShouldSkipPage(PageID: Integer): Boolean;
Result:= ErrorCode;
end;
function LaunchMOEOBuildProcess(): Integer;
var
ErrorCode: Integer;
FilePath: String;
begin
{ Skip pages that shouldn't be shown }
if (PageID = BuildProcessPage.ID) then
Result := False
else
Result := False;
// Need the app path
FilePath := ExpandConstant('{app}');
// launch CMake for MOEO
ShellExec('open', 'cmake.exe', ' ..\' + ' -G"' + Generator + '" -Dconfig="'+FilePath + '\install.cmake"', FilePath +'\paradiseo-moeo\build', SW_SHOWNORMAL, ewWaitUntilTerminated, ErrorCode);
Result:= ErrorCode;
end;
procedure updateProgressBar(StartFrom: Integer;ProgressPurcentage: Integer);
var
I: Integer;
begin
try
for I := StartFrom to ProgressPurcentage do begin
ProgressPage.SetProgress(I, 100);
Sleep(50);
end;
finally
end;
end;
procedure CurStepChanged(CurStep: TSetupStep);
begin
if CurStep = ssInstall then begin
if (isError(checkCMakeAvailable())) then begin
MsgBox(CustomMessage('CMakeMissing'), mbCriticalError, mb_Ok);
Abort;
end;
end;
end;
function NextButtonClick(CurPageID: Integer): Boolean;
var
I: Integer;
begin
if CurPageID = BuildProcessPage.ID then begin
MsgBox('Arrived in build wizard page', mbError, mb_Ok);
ProgressPage.SetText('Launching CMake build process...', '');
ProgressPage.SetProgress(0, 0);
if (CurPageID = BuildProcessPage.ID) then begin
ProgressPage.SetText('',CustomMessage('LaunchingBuildProcess'));
updateProgressBar(0,0);
ProgressPage.Show;
try
for I := 0 to 10 do begin
ProgressPage.SetProgress(I, 10);
Sleep(100);
end;
finally
ProgressPage.Hide;
end;
end
SetCmakeGenerator();
updateProgressBar(0,5);
if (isError(launchEOBuildProcess())) then
begin
ProgressPage.SetText(CustomMessage('Error'), CustomMessage('ErrorAbort'));
MsgBox(CustomMessage('CannotCompleteInstall')+'ParadisEO-EO' , mbCriticalError, mb_Ok);
ProgressPage.Hide;
Result := True;
exit;
end;
updateProgressBar(5,50);
if IsComponentSelected('mo') then
begin
if (isError(launchMOBuildProcess())) then
begin
ProgressPage.SetText(CustomMessage('Error'), CustomMessage('ErrorAbort'));
MsgBox(CustomMessage('CannotCompleteInstall')+'ParadisEO-MO' , mbCriticalError, mb_Ok);
ProgressPage.Hide;
Result := True;
exit;
end;
end;
updateProgressBar(50,80);
if IsComponentSelected('moeo') then
begin
if (isError(launchMOEOBuildProcess())) then
begin
ProgressPage.SetText(CustomMessage('Error'), CustomMessage('ErrorAbort'));
MsgBox(CustomMessage('CannotCompleteInstall')+'ParadisEO-MOEO' , mbCriticalError, mb_Ok);
ProgressPage.Hide;
Result := True;
exit;
end;
end;
updateProgressBar(80,100);
ProgressPage.SetText(CustomMessage('BPFinished'), CustomMessage('BPSuccessfull'));
sleep(2000);
ProgressPage.SetText('Fin','Vous devez maintenant compiler');
ProgressPage.Hide;
end;
Result := True;
end;
procedure CreateTheWizardPages;
procedure CreateTheWizardPages;
var
Lbl: TLabel;
begin
GeneratorPage := CreateCustomPage({#generatorWizardPageIndex}, 'ParadisEO can be compiled using several generators.', '');
GeneratorPage := CreateCustomPage({#generatorWizardPageIndex}, CustomMessage('ChooseGenerator'), '');
GeneratorBox := TNewCheckListBox.Create(GeneratorPage);
GeneratorBox.Top := ScaleY(15);
GeneratorBox.Top := ScaleY(0);
GeneratorBox.Width := GeneratorPage.SurfaceWidth;
GeneratorBox.Height := ScaleY(200);
GeneratorBox.Height := ScaleY(180);
GeneratorBox.BorderStyle := bsNone;
GeneratorBox.ParentColor := True;
GeneratorBox.MinItemHeight := WizardForm.TasksList.MinItemHeight;
GeneratorBox.ShowLines := False;
GeneratorBox.WantTabs := True;
GeneratorBox.Parent := GeneratorPage.Surface;
GeneratorBox.AddGroup('Select the program that will be used to compile:', '', 0, nil);
GeneratorBox.AddGroup(CustomMessage('SelectCompiler'), '', 0, nil);
GeneratorBox.AddRadioButton('Visual Studio 8 2005', '', 0, True, True, nil);
GeneratorBox.AddRadioButton('Visual Studio 7 .NET 2003', '', 0, False, True, nil);
GeneratorBox.AddRadioButton('NMake', '', 0, False, True, nil);
@ -212,24 +319,20 @@ begin
GeneratorBox.AddRadioButton('MSYS', '', 0, False, True, nil);
GeneratorBox.AddRadioButton('WMake', '', 0, False, True, nil);
BuildProcessPage := CreateCustomPage({#launchBuildWizardPageIndex}, 'Generate CMake files', 'Build process');
BuildProcessPage := CreateCustomPage({#launchBuildWizardPageIndex},CustomMessage('GenCMakeFiles'),CustomMessage('BuildProcess'));
Lbl := TLabel.Create(BuildProcessPage);
Lbl.Top := Memo.Top + Memo.Height + ScaleY(8);
Lbl.Caption := 'TLabel';
Lbl.Top := ScaleY(20);
Lbl.Caption :=CustomMessage('NextGenCaption');
Lbl.AutoSize := True;
Lbl.Parent := Page.Surface;
ProgressPage := CreateOutputProgressPage('Build process',
'Generating the configuration files...');
Lbl.Parent := BuildProcessPage.Surface;
ProgressPage := CreateOutputProgressPage(CustomMessage('ProcessingCMake'),CustomMessage('BuildProcess'));
end;
procedure AboutButtonOnClick(Sender: TObject);
begin
MsgBox('ParadisEO: An INRIA Dolphin Team project - 2007 ', mbInformation, mb_Ok);
MsgBox(CustomMessage('DolphinMsg'), mbInformation, mb_Ok);
end;
@ -265,7 +368,6 @@ begin
URLLabel.Cursor := crHand;
URLLabel.OnClick := @URLLabelOnClick;
URLLabel.Parent := WizardForm;
{ Alter Font *after* setting Parent so the correct defaults are inherited first }
URLLabel.Font.Style := URLLabel.Font.Style + [fsUnderline];
URLLabel.Font.Color := clBlue;
URLLabel.Top := AboutButton.Top + AboutButton.Height - URLLabel.Height - 2;
@ -273,11 +375,6 @@ begin
end;
procedure DeinitializeSetup();
begin
end;
[UninstallDelete]
Type: files; Name: "{app}\*"
Type: filesandordirs; Name: "{app}\*"