diff --git a/utilities/trunk/windows/genParadisEOSol.bat b/utilities/trunk/windows/genParadisEOSol.bat new file mode 100644 index 000000000..f52199592 --- /dev/null +++ b/utilities/trunk/windows/genParadisEOSol.bat @@ -0,0 +1,173 @@ +:: genParadisEOSol.bat +:: Generates ParadisEO's Visual Studio solutions +:: +@ECHO OFF + + +:: Keep the current directory +set _cdir=%CD% + + + +:-------------------------- How ParadisEO will be compiled ? ----------------------------------------------: + +:: Preliminary checking +IF NOT EXIST paradiseo-eo GOTO errorNoEO +IF NOT EXIST paradiseo-mo GOTO errorNoMO +IF NOT EXIST paradiseo-moeo GOTO errorNoMOEO + +CLS + +echo. +echo. +echo ===================================================================== +echo Generate configuration files for ParadisEO +echo ===================================================================== +echo. +echo. + +:: Install type +echo CMake can generate many configuration files for ParadisEO. +echo. + +echo 1) Visual Studio 8 2005 +echo 2) Visual Studio 8 2005 Win64 +echo 3) Visual Studio 7 .NET 2003 +echo 4) Visual Studio 7 +echo 5) Visual Studio 6 +echo 6) NMake Makefiles +echo 7) MinGW Makefiles +echo 8) MSYS Makefiles +echo 9) Borland Makefiles +echo 10) Watcom WMake +echo 11) Unix Makefiles + + +:: Read the user's choice +echo. +set /p install=Please choose your generator: + +:: Adapt the CMake generator +if "%install%"=="1" set _cmake_generator="Visual Studio 8 2005" +if "%install%"=="2" set _cmake_generator="Visual Studio 8 2005 Win64" +if "%install%"=="3" set _cmake_generator="Visual Studio 7 .NET 2003" +if "%install%"=="4" set _cmake_generator="Visual Studio 7" +if "%install%"=="5" set _cmake_generator="Visual Studio 6" +if "%install%"=="6" set _cmake_generator="NMake Makefiles" +if "%install%"=="7" set _cmake_generator="MinGW Makefiles" +if "%install%"=="8" set _cmake_generator="MSYS Makefiles" +if "%install%"=="9" set _cmake_generator="Borland Makefiles" +if "%install%"=="10" set _cmake_generator="Watcom WMake" +if "%install%"=="11" set _cmake_generator="Unix Makefiles" + +if %_cmake_generator%=="" goto invalidInstall + +:----------------------------------------------------------------------------------------------------------: + + + +:-------------------------- EO INSTALL ----------------------------------------------: +:: Go to ParadisEO-EO directory +cd %_cdir%\paradiseo-eo\build + +:: Run CMake +cmake "%_cdir%\paradiseo-eo" -G %_cmake_generator% + +echo. +if "%errorlevel%"=="0" echo ----- Generate ParadisEO-EO configuration files DONE +if "%errorlevel%"=="-1" goto errorInstall +echo. +echo. + +:: Go back to the initial directory +cd %_cdir% + +:------------------------------------------------------------------------------------: + + + + +:-------------------------- MO INSTALL ----------------------------------------------: + +:: Go to ParadisEO-MO directory +cd %_cdir%\paradiseo-mo\build + +:: Run CMake +cmake "%_cdir%\paradiseo-mo" -G %_cmake_generator% "-Dconfig=%_cdir%\install.cmake" + +echo. +if %errorlevel%==0 echo ----- Generate ParadisEO-MO configuration files DONE +if %errorlevel%==-1 goto errorInstall +echo. +echo. +:------------------------------------------------------------------------------------: + + + + +:-------------------------- MOEO INSTALL ----------------------------------------------: + +:: Go back to the initial directory +cd %_cdir% + +:: Go to ParadisEO-MOEO directory +cd %_cdir%\paradiseo-moeo\build + +:: Run CMake +cmake "%_cdir%\paradiseo-moeo" -G %_cmake_generator% "-Dconfig=%_cdir%\install.cmake" + + +echo. +if %errorlevel%==0 echo ----- Generate ParadisEO-MOEO configuration files DONE +if not %errorlevel%==0 goto errorInstall +echo. +echo. +:------------------------------------------------------------------------------------: + + + + +:-------------------------- Error management ----------------------------------------: + +:: Go back to the initial directory +cd %_cdir% + +goto end + +:: Error management +:errorNoEO +echo. +echo. Cound not find %_cdir%\paradiseo-eo. Abort. +echo. +goto end + +:errorNoMO +echo. +echo. Cound not find %_cdir%\paradiseo-mo. Abort. +echo. +goto end + +:errorNoMOEO +echo. +echo. Cound not find %_cdir%\paradiseo-moeo. Abort. +echo. +goto end + +:invalidInstall +echo. +echo. No CMake generator read, Abort. +echo. +goto end + + +:errorInstall +echo. +echo. An error has occurend, end. +echo. +goto end +:------------------------------------------------------------------------------------: + + +:: End +:end +PAUSE diff --git a/utilities/trunk/windows/genParadisEOSol.zip b/utilities/trunk/windows/genParadisEOSol.zip new file mode 100644 index 000000000..f57679265 Binary files /dev/null and b/utilities/trunk/windows/genParadisEOSol.zip differ diff --git a/utilities/trunk/windows/paradiseo_installer_script.iss b/utilities/trunk/windows/paradiseo_installer_script.iss new file mode 100644 index 000000000..987cbb292 --- /dev/null +++ b/utilities/trunk/windows/paradiseo_installer_script.iss @@ -0,0 +1,285 @@ +; Script generated by the Inno Setup Script Wizard. +; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES! + +#define generatorWizardPageIndex= 7 +#define launchBuildWizardPageIndex= 12 + +[Setup] +AppName=ParadisEO +AppVerName=ParadisEO-ix86-1.1 +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 +OutputDir=E:\software\paradisEO\windows installer\compiler output +OutputBaseFilename=paradiseo-1.0-win32-installer +Compression=lzma +SolidCompression=yes +WizardImageFile=E:\software\paradisEO\img\paradisEO.bmp +UninstallDisplayName=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 + +;--------------------------------------------------------------------------------------------------------------------------------- + +[Types] +Name: "full"; Description: "Full installation" +Name: "custom"; Description: "Custom installation"; Flags: iscustom + +[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 + +;--------------------------------------------------------------------------------------------------------------------------------- + +[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() ; + +[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 + if GeneratorBox.Checked[1] then + begin + Generator:='Visual Studio 8 2005' ; + exit; + end; + if GeneratorBox.Checked[2] then + begin + Generator:='Visual Studio 7 .NET 2003' ; + exit; + end; + if GeneratorBox.Checked[3] then + begin + Generator:='NMake' ; + exit; + end; + if GeneratorBox.Checked[4] then + begin + Generator:='MinGW' ; + exit; + end; + if GeneratorBox.Checked[5] then + begin + Generator:='Borland' ; + exit; + end; + if GeneratorBox.Checked[6] then + begin + Generator:='MSYS' ; + exit; + end; + if GeneratorBox.Checked[7] then + begin + Generator:='WMake' ; + exit; + end; +end; + + +procedure onErrorMsg(ErrorCode: Integer); +begin + MsgBox('An error has occured. Impossible to complete the install', mbError, mb_Ok); + exit; +end; + + +procedure LaunchBuildProcess(); +var + ErrorCode: Integer; + FilePath: String; +begin + + // Need the app path + FilePath := ExpandConstant('{app}'); + + // Set the Cmake generator + SetCmakeGenerator(); + + // 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; + + // 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; + + // 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; + + +function ShouldSkipPage(PageID: Integer): Boolean; +begin + { Skip pages that shouldn't be shown } + if (PageID = BuildProcessPage.ID) then + Result := False + else + Result := False; +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); + ProgressPage.Show; + + try + for I := 0 to 10 do begin + ProgressPage.SetProgress(I, 10); + Sleep(100); + end; + finally + ProgressPage.Hide; + end; + + end + Result := True; +end; + + + + + +procedure CreateTheWizardPages; + +begin + GeneratorPage := CreateCustomPage({#generatorWizardPageIndex}, 'ParadisEO can be compiled using several generators.', ''); + GeneratorBox := TNewCheckListBox.Create(GeneratorPage); + GeneratorBox.Top := ScaleY(15); + GeneratorBox.Width := GeneratorPage.SurfaceWidth; + GeneratorBox.Height := ScaleY(200); + 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.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); + GeneratorBox.AddRadioButton('MinGW', '', 0, False, True, nil); + GeneratorBox.AddRadioButton('Borland', '', 0, False, True, nil); + GeneratorBox.AddRadioButton('MSYS', '', 0, False, True, nil); + GeneratorBox.AddRadioButton('WMake', '', 0, False, True, nil); + + + BuildProcessPage := CreateCustomPage({#launchBuildWizardPageIndex}, 'Generate CMake files', 'Build process'); + + Lbl := TLabel.Create(BuildProcessPage); + Lbl.Top := Memo.Top + Memo.Height + ScaleY(8); + Lbl.Caption := 'TLabel'; + Lbl.AutoSize := True; + Lbl.Parent := Page.Surface; + + + ProgressPage := CreateOutputProgressPage('Build process', + 'Generating the configuration files...'); + +end; + +procedure AboutButtonOnClick(Sender: TObject); +begin + MsgBox('ParadisEO: An INRIA Dolphin Team project - 2007 ', mbInformation, mb_Ok); +end; + + +procedure URLLabelOnClick(Sender: TObject); +var + ErrorCode: Integer; +begin + ShellExec('open', 'http://paradiseo.gforge.inria.fr', '', '', SW_SHOWNORMAL, ewNoWait, ErrorCode); +end; + + +procedure InitializeWizard(); +var + AboutButton, CancelButton: TButton; + URLLabel: TNewStaticText; + BackgroundBitmapImage: TBitmapImage; + BackgroundBitmapText: TNewStaticText; +begin + CreateTheWizardPages; + CancelButton := WizardForm.CancelButton; + + AboutButton := TButton.Create(WizardForm); + AboutButton.Left := WizardForm.ClientWidth - CancelButton.Left - CancelButton.Width - ScaleX(5); + AboutButton.Top := CancelButton.Top; + AboutButton.Width := CancelButton.Width; + AboutButton.Height := CancelButton.Height; + AboutButton.Caption := '&About...'; + AboutButton.OnClick := @AboutButtonOnClick; + AboutButton.Parent := WizardForm; + + URLLabel := TNewStaticText.Create(WizardForm); + URLLabel.Caption := 'http://paradiseo.gforge.inria.fr'; + 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; + URLLabel.Left := AboutButton.Left + AboutButton.Width + ScaleX(10); +end; + + +procedure DeinitializeSetup(); +begin +end; + + +[UninstallDelete] +Type: files; Name: "{app}\*" +Type: filesandordirs; Name: "{app}\*" + +