[Setup] AppName=EiffelMedia ; Needs to be adapted AppVerName=EiffelMedia 0.8.0 ; Needs to be adapted AppVersion=0.8.0 AppPublisher=Chair of Software Engineering ETH Zurich AppPublisherURL=http://se.inf.ethz.ch/people/bay/ AppCopyright=Copyright (C) 2005 ETH Zurich, Till G. Bay AppSupportURL=http://eiffelmedia.origo.ethz.ch AppUpdatesURL=http://eiffelmedia.origo.ethz.ch DefaultDirName={pf}\eiffelmedia DefaultGroupName=EiffelMedia DisableStartupPrompt=yes WindowShowCaption=yes WindowVisible=no LicenseFile=forum.txt BackColor=clRed BackColor2=clYellow ; Needs to be adapted WizardImageFile=D:\workspace\em\release\tools\em_logo.bmp WizardImageStretch=no WizardImageBackColor=clWhite Compression=bzip/9 ; Needs to be adapted SourceDir=../bcb OutputDir=.. ; Needs to be adapted OutputBaseFilename=em_bcb_0.6.0 ChangesAssociations=no AlwaysRestart=yes UninstallRestartComputer=yes [Registry] Root: HKCU; Subkey: "Environment"; ValueType: string; ValueName: "EM"; ValueData: "{app}"; Flags: uninsdeletevalue [Files] Source: "SDL.dll"; DestDir: "{sys}"; Flags: uninsrestartdelete Source: "jpeg.dll"; DestDir: "{sys}"; Flags: uninsrestartdelete Source: "libpng1.dll"; DestDir: "{sys}"; Flags: uninsrestartdelete Source: "SDL_image.dll"; DestDir: "{sys}"; Flags: uninsrestartdelete Source: "zlib.dll"; DestDir: "{sys}"; Flags: uninsrestartdelete Source: "SDL_mixer.dll"; DestDir: "{sys}"; Flags: uninsrestartdelete Source: "sdlgfx.dll"; DestDir: "{sys}"; Flags: uninsrestartdelete Source: "PathTool.exe"; DestDir: "{app}"; Flags: uninsrestartdelete Source: "*"; Excludes: "*.dll"; DestDir: "{app}"; CopyMode: normal; Flags: recursesubdirs Source: "website.url"; DestDir: "{app}"; AfterInstall: AfterMyProgInstall [Icons] Name: "{group}\hello world"; Filename: "{app}\example\hello_world\hello_world.exe"; IconFilename: "{app}\example\hello_world\icon.ico"; WorkingDir: "{app}\example\hello_world\" Name: "{group}\bitmap font"; Filename: "{app}\example\bitmap_font\bitmap_font.exe"; IconFilename: "{app}\example\bitmap_font\icon.ico"; WorkingDir: "{app}\example\bitmap_font\" Name: "{group}\collision"; Filename: "{app}\example\collision\collision.exe"; IconFilename: "{app}\example\collision\icon.ico"; WorkingDir: "{app}\example\collision\" Name: "{group}\drawable"; Filename: "{app}\example\drawable\drawable.exe"; IconFilename: "{app}\example\drawable\icon.ico"; WorkingDir: "{app}\example\drawable\" Name: "{group}\figure zoom"; Filename: "{app}\example\figure_zoom\figure_zoom.exe"; IconFilename: "{app}\example\figure_zoom\icon.ico"; WorkingDir: "{app}\example\figure_zoom\" Name: "{group}\hello 3d world"; Filename: "{app}\example\hello_3d_world\hello_3d_world.exe"; IconFilename: "{app}\example\hello_3d_world\icon.ico"; WorkingDir: "{app}\example\hello_3d_world\" Name: "{group}\lovely"; Filename: "{app}\example\lovely\lovely.exe"; IconFilename: "{app}\example\lovely\icon.ico"; WorkingDir: "{app}\example\lovely\" Name: "{group}\never ending background"; Filename: "{app}\example\never_ending_background\never_ending_background.exe"; IconFilename: "{app}\example\never_ending_background\icon.ico"; WorkingDir: "{app}\example\never_ending_background\" Name: "{group}\normalized"; Filename: "{app}\example\normalized\normalized.exe"; IconFilename: "{app}\example\normalized\icon.ico"; WorkingDir: "{app}\example\normalized\" Name: "{group}\objects 3d"; Filename: "{app}\example\objects_3d\objects_3d.exe"; IconFilename: "{app}\example\objects_3d\icon.ico"; WorkingDir: "{app}\example\objects_3d\" Name: "{group}\racing"; Filename: "{app}\example\racing\racing.exe"; IconFilename: "{app}\example\racing\icon.ico"; WorkingDir: "{app}\example\racing\" Name: "{group}\racing_3d"; Filename: "{app}\example\racing_3d\racing_3d.exe"; IconFilename: "{app}\example\racing_3d\icon.ico"; WorkingDir: "{app}\example\racing_3d\" Name: "{group}\tunnel"; Filename: "{app}\example\tunnel\tunnel.exe"; IconFilename: "{app}\example\tunnel\icon.ico"; WorkingDir: "{app}\example\tunnel\" Name: "{group}\eiffelmedia.origo.ethz.ch"; Filename: "{app}\website.url" Name: "{group}\readme.txt"; Filename: "{app}\readme.txt"; Name: "{group}\uninstall eiffelmedia"; Filename: "{uninstallexe}" [Code] var Exists_in_user: Boolean; Exists_in_machine: Boolean; Temp_String: String; ResultCode: Integer; function SetGOBOVar(): String; begin Exists_in_machine := RegQueryStringValue (HKLM, 'SYSTEM\CurrentControlSet\Control\Session Manager\Environment', 'GOBO', Result); Exists_in_user := RegQueryStringValue (HKCU, 'Environment', 'GOBO', Result); if ((Exists_in_machine = False) and (Exists_in_user = False)) then begin Temp_String := ExpandConstant('{app}\dependency\gobo') RegWriteStringValue (HKLM, 'SYSTEM\CurrentControlSet\Control\Session Manager\Environment', 'GOBO', Temp_String); RegWriteStringValue (HKLM, 'SYSTEM\CurrentControlSet\Control\Session Manager\Environment', 'ISE_C_COMPILER', 'bcb'); RegWriteStringValue (HKLM, 'SYSTEM\CurrentControlSet\Control\Session Manager\Environment', 'GOBO_CC', 'bcb'); RegWriteStringValue (HKLM, 'SYSTEM\CurrentControlSet\Control\Session Manager\Environment', 'GOBO_EIFFEL', 'ise'); Exec(ExpandConstant('{app}\PathTool.exe'), ExpandConstant('-a:"{app}\dependency\gobo\bin" -silent'), '', SW_SHOW, ewWaitUntilTerminated, ResultCode); // this only makes the installer work for EiffelStudio 5.5 RegQueryStringValue (HKLM, 'SOFTWARE\ISE\Eiffel55\build', 'ISE_EIFFEL', Result); RegWriteStringValue (HKLM, 'SYSTEM\CurrentControlSet\Control\Session Manager\Environment', Result); Exec(ExpandConstant('{app}\PathTool.exe'), '', Result + '\studio\spec\windows\bin', SW_SHOW, ewWaitUntilTerminated, ResultCode); RegWriteStringValue (HKCU, 'Software', 'eiffelmedia', 'gobo_env_var_added'); end if Exists_in_machine then begin Result := ''; MsgBox('The environment variable GOBO is defined for this system and this installation will not overwrite its value. This might affect the functioning of the installation! Please see "developer.txt" to find out how to set this environment variable manually.', mbError, MB_OK); end if Exists_in_user then begin Result := ''; MsgBox('The environment variable GOBO is defined for this user and this installation will not overwrite its value. This might affect the functioning of the installation! Please see "developer.txt" to find out how to set this environment variable manually.', mbError, MB_OK); end end; function SetEWGVar(): String; begin Exists_in_machine := RegQueryStringValue (HKLM, 'SYSTEM\CurrentControlSet\Control\Session Manager\Environment', 'EWG', Result); Exists_in_user := RegQueryStringValue (HKCU, 'Environment', 'EWG', Result); if ((Exists_in_machine = False) and (Exists_in_user = False)) then begin Temp_String := ExpandConstant('{app}\dependency\ewg') RegWriteStringValue (HKLM, 'SYSTEM\CurrentControlSet\Control\Session Manager\Environment', 'EWG', Temp_String); Exec(ExpandConstant('{app}\PathTool.exe'), ExpandConstant('-a:"{app}\dependency\ewg\bin" -silent'), '', SW_SHOW, ewWaitUntilTerminated, ResultCode); RegWriteStringValue (HKCU, 'Software', 'eiffelmedia', 'ewg_env_var_added'); end if Exists_in_machine then begin Result := ''; MsgBox('The environment variable EWG is defined for this system and this installation will not overwrite its value. This might affect the functioning of the installation! Please see "developer.txt" to find out how to set this environment variable manually.', mbError, MB_OK); end if Exists_in_user then begin Result := ''; MsgBox('The environment variable EWG is defined for this user and this installation will not overwrite its value. This might affect the functioning of the installation! Please see "developer.txt" to find out how to set this environment variable manually.', mbError, MB_OK); end end; function SetSDLVar(): String; begin Exists_in_machine := RegQueryStringValue (HKLM, 'SYSTEM\CurrentControlSet\Control\Session Manager\Environment', 'SDL', Result); Exists_in_user := RegQueryStringValue (HKCU, 'Environment', 'SDL', Result); if ((Exists_in_machine = False) and (Exists_in_user = False)) then begin Temp_String := ExpandConstant('{app}\dependency\sdl') RegWriteStringValue (HKLM, 'SYSTEM\CurrentControlSet\Control\Session Manager\Environment', 'SDL', Temp_String); RegWriteStringValue (HKCU, 'Software', 'eiffelmedia', 'sdl_env_var_added'); end if Exists_in_machine then begin Result := ''; MsgBox('The environment variable SDL is defined for this system and this installation will not overwrite its value. This might affect the functioning of the installation! Please see "developer.txt" to find out how to set this environment variable manually.', mbError, MB_OK); end if Exists_in_user then begin Result := ''; MsgBox('The environment variable SDL is defined for this user and this installation will not overwrite its value. This might affect the functioning of the installation! Please see "developer.txt" to find out how to set this environment variable manually.', mbError, MB_OK); end end; function SetSDL_HEADERVar(): String; begin Exists_in_machine := RegQueryStringValue (HKLM, 'SYSTEM\CurrentControlSet\Control\Session Manager\Environment', 'SDL_HEADER', Result); Exists_in_user := RegQueryStringValue (HKCU, 'Environment', 'SDL_HEADER', Result); if ((Exists_in_machine = False) and (Exists_in_user = False)) then begin Temp_String := ExpandConstant('{app}\dependency\sdl\include') RegWriteStringValue (HKLM, 'SYSTEM\CurrentControlSet\Control\Session Manager\Environment', 'SDL_HEADER', Temp_String); RegWriteStringValue (HKCU, 'Software', 'eiffelmedia', 'sdl_header_env_var_added'); Exec(ExpandConstant('{app}\PathTool.exe'), ExpandConstant('-a:"{app}\dependency\sdl\lib" -silent'), '', SW_SHOW, ewWaitUntilTerminated, ResultCode); end if Exists_in_machine then begin Result := ''; MsgBox('The environment variable SDL_HEADER is defined for this system and this installation will not overwrite its value. This might affect the functioning of the installation! Please see "developer.txt" to find out how to set this environment variable manually.', mbError, MB_OK); end if Exists_in_user then begin Result := ''; MsgBox('The environment variable SDL_HEADER is defined for this user and this installation will not overwrite its value. This might affect the functioning of the installation! Please see "developer.txt" to find out how to set this environment variable manually.', mbError, MB_OK); end end; procedure AfterMyProgInstall; begin SetGOBOVar; SetEWGVar; SetSDLVar; SetSDL_HEADERVar; end;