diff options
Diffstat (limited to 'dists')
| -rw-r--r-- | dists/nsis/graphics/scummvm-install.ico | bin | 15086 -> 0 bytes | |||
| -rw-r--r-- | dists/ps3/ICON0.PNG | bin | 0 -> 43210 bytes | |||
| -rw-r--r-- | dists/ps3/PIC1.PNG | bin | 0 -> 3193068 bytes | |||
| -rw-r--r-- | dists/ps3/readme-ps3.md | 49 | ||||
| -rw-r--r-- | dists/ps3/sfo.xml | 33 | ||||
| -rw-r--r-- | dists/redhat/scummvm.spec | 4 | ||||
| -rw-r--r-- | dists/redhat/scummvm.spec.in | 4 | ||||
| -rw-r--r-- | dists/scummvm.rc | 6 | ||||
| -rw-r--r-- | dists/scummvm.rc.in | 6 | ||||
| -rw-r--r-- | dists/win32/ScummVM.iss | 10 | ||||
| -rw-r--r-- | dists/win32/graphics/left.bmp (renamed from dists/nsis/graphics/left.bmp) | bin | 154542 -> 154542 bytes | |||
| -rw-r--r-- | dists/win32/graphics/scummvm-install.ico | bin | 0 -> 77799 bytes | |||
| -rw-r--r-- | dists/win32/plugins/Games.dll | bin | 0 -> 105472 bytes | |||
| -rw-r--r-- | dists/win32/scummvm.gdf.xml | 44 | ||||
| -rw-r--r-- | dists/win32/scummvm.nsi (renamed from dists/nsis/scummvm.nsi) | 147 | ||||
| -rw-r--r-- | dists/win32/scummvm.nsi.in (renamed from dists/nsis/scummvm.nsi.in) | 147 |
16 files changed, 410 insertions, 40 deletions
diff --git a/dists/nsis/graphics/scummvm-install.ico b/dists/nsis/graphics/scummvm-install.ico Binary files differdeleted file mode 100644 index b8b118c7bd..0000000000 --- a/dists/nsis/graphics/scummvm-install.ico +++ /dev/null diff --git a/dists/ps3/ICON0.PNG b/dists/ps3/ICON0.PNG Binary files differnew file mode 100644 index 0000000000..e0dc9d7847 --- /dev/null +++ b/dists/ps3/ICON0.PNG diff --git a/dists/ps3/PIC1.PNG b/dists/ps3/PIC1.PNG Binary files differnew file mode 100644 index 0000000000..1fcdeb71fc --- /dev/null +++ b/dists/ps3/PIC1.PNG diff --git a/dists/ps3/readme-ps3.md b/dists/ps3/readme-ps3.md new file mode 100644 index 0000000000..2fb393b4fb --- /dev/null +++ b/dists/ps3/readme-ps3.md @@ -0,0 +1,49 @@ +Prerequisites +============= +- A homebrew enabled PlayStation 3 console. As of now that mostly means having a custom firmware installed. Obtaining and installing such a software is out of the scope of this document. Sorry, but you're on your own for that one. +- At least one ScummVM supported game. The list of compatible games can be seen here: http://www.scummvm.org/compatibility/ +The page http://wiki.scummvm.org/index.php/Where_to_get_the_games references some places where those games can be bought. Demonstration versions for most of the supported games are downloadable on http://scummvm.org/demos/ +- An USB drive. + +Installing +========== +From a computer, download the installable package of the PS3 port from ScummVM's main site. It should be a .pkg file. Copy it to an USB drive. +After having plugged the USB drive to you PS3, the installation package should appear in the XMB under the "Games > Install Package" menu. Installing it copies ScummVM and its dependencies to your PS3's hard drive. It also adds the "Games > PlayStation 3 > ScummVM" XMB entry which is to be used to launch ScummVM. + +Configuring and playing games +============================= +The user manual describes how to add games to ScummVM and launch them : http://wiki.scummvm.org/index.php/User_Manual + +PlayStation 3 Specifics +======================= +Games can be launched either from an USB drive or from the internal hard drive. The internal hard drive has better performance though. +Savegames are wrote in the /hdd0/game/SCUM12000/saves folder. + +Joypad button mapping +===================== +- Left stick => Mouse +- Cross => Left mouse button +- Circle => Right mouse button +- Triangle => Game menu (F5) +- Square => Escape +- Start => ScummVM's in global game menu +- Select => Toggle virtual keyboard +- L1 => AGI predictive input dialog + +Disclaimer +========== +Unauthorized distribution of an installable package with non freeware games included is a violation of the copyright law and is as such forbidden. + +Building from source +==================== +This port of ScummVM to the PS3 is based on SDL. It uses the open source SDK PSL1GHT. + +The dependencies needed to build it are : + +- The toolchain from https://github.com/ps3dev/ps3toolchain +- SDL from https://github.com/zeldin/SDL_PSL1GHT +- ScummVM from https://github.com/scummvm/scummvm + +Once all the dependencies are correctly setup, an installable package can be obtained from source by issuing the following command : + +./configure --host=ps3 && make ps3pkg diff --git a/dists/ps3/sfo.xml b/dists/ps3/sfo.xml new file mode 100644 index 0000000000..657e1c1410 --- /dev/null +++ b/dists/ps3/sfo.xml @@ -0,0 +1,33 @@ +<?xml version="1.0" ?> +<sfo> + <value name="ATTRIBUTE" type="integer"> + 0 + </value> + <value name="BOOTABLE" type="integer"> + 1 + </value> + <value name="CATEGORY" type="string"> + HG + </value> + <value name="PARENTAL_LEVEL" type="integer"> + 0 + </value> + <value name="PS3_SYSTEM_VER" type="string"> + 01.8000 + </value> + <value name="RESOLUTION" type="integer"> + 63 + </value> + <value name="SOUND_FORMAT" type="integer"> + 279 + </value> + <value name="TITLE" type="string"> + ScummVM + </value> + <value name="TITLE_ID" type="string"> + SCUM12000 + </value> + <value name="VERSION" type="string"> + 01.00 + </value> +</sfo> diff --git a/dists/redhat/scummvm.spec b/dists/redhat/scummvm.spec index 777e0afc8a..cd51f45c0a 100644 --- a/dists/redhat/scummvm.spec +++ b/dists/redhat/scummvm.spec @@ -68,6 +68,8 @@ install -m644 -D dists/engine-data/queen.tbl %{buildroot}%{_datadir}/scummvm/que install -m644 -D dists/engine-data/sky.cpt %{buildroot}%{_datadir}/scummvm/sky.cpt install -m644 -D dists/engine-data/drascula.dat %{buildroot}%{_datadir}/scummvm/drascula.dat install -m644 -D dists/engine-data/teenagent.dat %{buildroot}%{_datadir}/scummvm/teenagent.dat +install -m644 -D dists/engine-data/hugo.dat %{buildroot}%{_datadir}/scummvm/hugo.dat +install -m644 -D dists/engine-data/toon.dat %{buildroot}%{_datadir}/scummvm/toon.dat desktop-file-install --vendor scummvm --dir=%{buildroot}/%{_datadir}/applications dists/scummvm.desktop %clean @@ -105,6 +107,8 @@ fi %{_datadir}/scummvm/lure.dat %{_datadir}/scummvm/drascula.dat %{_datadir}/scummvm/teenagent.dat +%{_datadir}/scummvm/hugo.dat +%{_datadir}/scummvm/toon.dat %{_mandir}/man6/scummvm.6* #------------------------------------------------------------------------------ diff --git a/dists/redhat/scummvm.spec.in b/dists/redhat/scummvm.spec.in index 13ce600d02..838a05411a 100644 --- a/dists/redhat/scummvm.spec.in +++ b/dists/redhat/scummvm.spec.in @@ -68,6 +68,8 @@ install -m644 -D dists/engine-data/queen.tbl %{buildroot}%{_datadir}/scummvm/que install -m644 -D dists/engine-data/sky.cpt %{buildroot}%{_datadir}/scummvm/sky.cpt install -m644 -D dists/engine-data/drascula.dat %{buildroot}%{_datadir}/scummvm/drascula.dat install -m644 -D dists/engine-data/teenagent.dat %{buildroot}%{_datadir}/scummvm/teenagent.dat +install -m644 -D dists/engine-data/hugo.dat %{buildroot}%{_datadir}/scummvm/hugo.dat +install -m644 -D dists/engine-data/toon.dat %{buildroot}%{_datadir}/scummvm/toon.dat desktop-file-install --vendor scummvm --dir=%{buildroot}/%{_datadir}/applications dists/scummvm.desktop %clean @@ -105,6 +107,8 @@ fi %{_datadir}/scummvm/lure.dat %{_datadir}/scummvm/drascula.dat %{_datadir}/scummvm/teenagent.dat +%{_datadir}/scummvm/hugo.dat +%{_datadir}/scummvm/toon.dat %{_mandir}/man6/scummvm.6* #------------------------------------------------------------------------------ diff --git a/dists/scummvm.rc b/dists/scummvm.rc index 109437305c..9fa5489547 100644 --- a/dists/scummvm.rc +++ b/dists/scummvm.rc @@ -5,8 +5,14 @@ #endif #define FILE 256 +#define IDI_ICON 1001 +#define IDI_COUNT 1002 +#define ID_GDF_XML __GDF_XML IDI_ICON ICON DISCARDABLE "icons/scummvm.ico" +IDI_COUNT ICON DISCARDABLE "icons/count.ico" + +ID_GDF_XML DATA "dists/win32/scummvm.gdf.xml" scummmodern.zip FILE "gui/themes/scummmodern.zip" #ifdef USE_TRANSLATION diff --git a/dists/scummvm.rc.in b/dists/scummvm.rc.in index c043ce1644..b91e7ebb0c 100644 --- a/dists/scummvm.rc.in +++ b/dists/scummvm.rc.in @@ -5,8 +5,14 @@ #endif #define FILE 256 +#define IDI_ICON 1001 +#define IDI_COUNT 1002 +#define ID_GDF_XML __GDF_XML IDI_ICON ICON DISCARDABLE "icons/scummvm.ico" +IDI_COUNT ICON DISCARDABLE "icons/count.ico" + +ID_GDF_XML DATA "dists/win32/scummvm.gdf.xml" scummmodern.zip FILE "gui/themes/scummmodern.zip" #ifdef USE_TRANSLATION diff --git a/dists/win32/ScummVM.iss b/dists/win32/ScummVM.iss index 00f4868e60..8edc647e62 100644 --- a/dists/win32/ScummVM.iss +++ b/dists/win32/ScummVM.iss @@ -1,8 +1,12 @@ [Setup] -DefaultDirName={pf}\ScummVM AppCopyright=2011 AppName=ScummVM AppVerName=ScummVM Git +AppPublisher=The ScummVM Team +AppPublisherURL=http://www.scummvm.org/ +AppSupportURL=http://www.scummvm.org/ +AppUpdatesURL=http://www.scummvm.org/ +DefaultDirName={pf}\ScummVM DefaultGroupName=ScummVM AllowNoIcons=true AlwaysUsePersonalGroup=false @@ -14,7 +18,8 @@ DisableStartupPrompt=true AppendDefaultDirName=false SolidCompression=true DirExistsWarning=no -SetupIconFile=scummvm.ico +SetupIconFile=graphics\scummvm-install.ico +WizardImageFile=graphics\left.bmp ShowLanguageDialog=yes LanguageDetectionMethod=uilanguage @@ -44,6 +49,7 @@ Name: es; MessagesFile: compiler:Languages\Spanish.isl [Icons] Name: {group}\{cm:UninstallProgram, ScummVM}; Filename: {uninstallexe} Name: {group}\ScummVM; Filename: {app}\scummvm.exe; WorkingDir: {app}; Comment: scummvm; Flags: createonlyiffileexists; IconIndex: 0 +Name: {group}\ScummVM (noconsole); Filename: {app}\scummvm.exe; Parameters: "--no-console"; WorkingDir: {app}; Comment: scummvm; Flags: createonlyiffileexists; IconIndex: 0 Name: {group}\Authors; Filename: {app}\AUTHORS.txt; WorkingDir: {app}; Comment: AUTHORS; Flags: createonlyiffileexists Name: {group}\Copying; Filename: {app}\COPYING.txt; WorkingDir: {app}; Comment: COPYING; Flags: createonlyiffileexists Name: {group}\Copying.LGPL; Filename: {app}\COPYING.LGPL.txt; WorkingDir: {app}; Comment: COPYING.LGPL; Flags: createonlyiffileexists diff --git a/dists/nsis/graphics/left.bmp b/dists/win32/graphics/left.bmp Binary files differindex 8b31d7d09a..8b31d7d09a 100644 --- a/dists/nsis/graphics/left.bmp +++ b/dists/win32/graphics/left.bmp diff --git a/dists/win32/graphics/scummvm-install.ico b/dists/win32/graphics/scummvm-install.ico Binary files differnew file mode 100644 index 0000000000..6312959509 --- /dev/null +++ b/dists/win32/graphics/scummvm-install.ico diff --git a/dists/win32/plugins/Games.dll b/dists/win32/plugins/Games.dll Binary files differnew file mode 100644 index 0000000000..3a378b7064 --- /dev/null +++ b/dists/win32/plugins/Games.dll diff --git a/dists/win32/scummvm.gdf.xml b/dists/win32/scummvm.gdf.xml new file mode 100644 index 0000000000..1c50924e15 --- /dev/null +++ b/dists/win32/scummvm.gdf.xml @@ -0,0 +1,44 @@ +<?xml version="1.0"?> +<GameDefinitionFile xmlns:baseTypes="urn:schemas-microsoft-com:GamesExplorerBaseTypes.v1" xmlns="urn:schemas-microsoft-com:GameDescription.v1"> + <GameDefinition gameID="{F2475C5C-EA7C-41F0-A56D-1ABF7CFEA389}"> + <Name>ScummVM</Name> + <Description>ScummVM is a program which allows you to run certain classic graphical point-and-click adventure games, provided you already have their data files. The clever part about this: ScummVM just replaces the executables shipped with the games, allowing you to play them on systems for which they were never designed!</Description> + <ReleaseDate>2011-09-30</ReleaseDate> + <Genres> + <Genre>Adventure</Genre> + </Genres> + <Version> + <VersionFile path="scummvm.exe" /> + </Version> + <WindowsSystemPerformanceRating minimum="1.0" recommended="2.0" /> + <Developers> + <Developer URI="http://www.scummvm.org">The ScummVM Team</Developer> + </Developers> + <Publishers> + <Publisher URI="http://www.scummvm.org">The ScummVM Team</Publisher> + </Publishers> + <GameExecutables> + <GameExecutable path="scummvm.exe" /> + </GameExecutables> + <ExtendedProperties> + <GameTasks> + <Play> + <Primary> + <FileTask path="scummvm.exe" arguments="--no-console" /> + </Primary> + <Task index="1" name="Play (console)"> + <FileTask path="scummvm.exe" arguments="" /> + </Task> + </Play> + <Support> + <Task index="0" name="View README"> + <FileTask path="README.txt" arguments="" /> + </Task> + <Task index="1" name="ScummVM Website"> + <URLTask Link="http://www.scummvm.org" /> + </Task> + </Support> + </GameTasks> + </ExtendedProperties> + </GameDefinition> +</GameDefinitionFile>
\ No newline at end of file diff --git a/dists/nsis/scummvm.nsi b/dists/win32/scummvm.nsi index 50ccadaf74..01a7e72afe 100644 --- a/dists/nsis/scummvm.nsi +++ b/dists/win32/scummvm.nsi @@ -20,19 +20,26 @@ #!define _DEBUG #!define _INCLUDE_DATA_FILES +!define _ENABLE_GAME_EXPLORER +#!define _LOG_BUILD +!define _CONVERT_TEXT Name ScummVM # Included files !include MUI2.nsh +# Plugins +!ifdef _ENABLE_GAME_EXPLORER +!AddPluginDir "./plugins" +!endif + ######################################################################################### # Command line options ######################################################################################### #!define top_srcdir "" -#!define build_dir "" -#!define text_dir "" +#!define staging_dir "" #!define ARCH "" ;(optional, defaults to win32) # Check parameters @@ -40,17 +47,19 @@ Name ScummVM !error "Top source folder has not been passed to command line!" !endif -!ifndef build_dir - !error "Build folder has not been passed to command line (this folder should contain the executable and linked DLLs)!" -!endif - -!ifndef text_dir - !error "Text folder has not been passed to command line (this folder should contain all the text files used by the installer)!" +!ifndef staging_dir + !error "Staging folder has not been passed to command line (this folder should contain the executable and linked DLLs)!" !endif !ifndef ARCH !warning "ARCH has not been defined, defaulting to 'win32'" !define ARCH "win32" +!else + !if "${ARCH}" == "" + !warning "ARCH was empty, defaulting to 'win32'" + !undef ARCH + !define ARCH "win32" + !endif !endif ######################################################################################### @@ -72,7 +81,7 @@ Name ScummVM ######################################################################################### # Installer configuration ######################################################################################### -OutFile ${build_dir}\scummvm-${VERSION}-${ARCH}.exe +OutFile ${staging_dir}\scummvm-${VERSION}-${ARCH}.exe InstallDir $PROGRAMFILES\ScummVM ; Default installation folder InstallDirRegKey HKCU "Software\ScummVM\ScummVM" "InstallPath" ; Get installation folder from registry if available ; The application name needs to be refered directly instead of through ${REGKEY} @@ -220,17 +229,35 @@ Var StartMenuGroup # Installer sections ######################################################################################### Section "ScummVM" SecMain +!ifdef _LOG_BUILD + LogSet on +!endif SetOutPath $INSTDIR SetOverwrite on # Text files - File /oname=AUTHORS.txt "${text_dir}\AUTHORS" - File /oname=COPYING.LGPL.txt "${text_dir}\COPYING.LGPL" - File /oname=COPYING.txt "${text_dir}\COPYING" - File /oname=COPYRIGHT.txt "${text_dir}\COPYRIGHT" - File /oname=NEWS.txt "${text_dir}\NEWS" - File /oname=README.txt "${text_dir}\README" - File /oname=README-SDL.txt "${build_dir}\README-SDL" + File /oname=AUTHORS.txt "${top_srcdir}\AUTHORS" + File /oname=COPYING.LGPL.txt "${top_srcdir}\COPYING.LGPL" + File /oname=COPYING.txt "${top_srcdir}\COPYING" + File /oname=COPYRIGHT.txt "${top_srcdir}\COPYRIGHT" + File /oname=NEWS.txt "${top_srcdir}\NEWS" + File /oname=README.txt "${top_srcdir}\README" + +!ifdef _CONVERT_TEXT + # Convert line endings + Push "$INSTDIR\AUTHORS.txt" + Call unix2dos + Push "$INSTDIR\COPYING.LGPL.txt" + Call unix2dos + Push "$INSTDIR\COPYING.txt" + Call unix2dos + Push "$INSTDIR\COPYRIGHT.txt" + Call unix2dos + Push "$INSTDIR\NEWS.txt" + Call unix2dos + Push "$INSTDIR\README.txt" + Call unix2dos +!endif !ifdef _INCLUDE_DATA_FILES # Engine data @@ -253,10 +280,27 @@ Section "ScummVM" SecMain !endif # Main exe and dlls - File "${build_dir}\scummvm.exe" - File "${build_dir}\SDL.dll" + File "${staging_dir}\scummvm.exe" + File "${staging_dir}\SDL.dll" WriteRegStr HKCU "${REGKEY}" InstallPath "$INSTDIR" ; Store installation folder + + #Register with game explorer +!ifdef _ENABLE_GAME_EXPLORER + Games::registerGame "$INSTDIR\scummvm.exe" + pop $0 + # This is for Vista only, for 7 the tasks are defined in the gdf xml + ${If} $0 != "0" + ${AndIf} $0 != "" + ${AndIf} $0 != "$INSTDIR\scummvm.exe" + CreateDirectory "$0\PlayTasks\0" + CreateShortcut "$0\PlayTasks\0\Play.lnk" "$INSTDIR\scummvm.exe" "--no-console" + CreateDirectory "$0\PlayTasks\1" + CreateShortcut "$0\PlayTasks\1\Play (console).lnk" "$INSTDIR\scummvm.exe" + CreateDirectory "$0\SupportTasks\0" + CreateShortcut "$0\SupportTasks\0\Home Page.lnk" "${URL}" + ${EndIf} +!endif SectionEnd # Write Start menu entries and uninstaller @@ -266,7 +310,8 @@ Section -post SecMainPost !insertmacro MUI_STARTMENU_WRITE_BEGIN Application SetShellVarContext all ; Create shortcuts in the all-users folder CreateDirectory "$SMPROGRAMS\$StartMenuGroup" - CreateShortCut "$SMPROGRAMS\$StartMenuGroup\$(^Name).lnk" $INSTDIR\$(^Name).exe "" "$INSTDIR\$(^Name).exe" 0 ; Create shortcut with icon + CreateShortCut "$SMPROGRAMS\$StartMenuGroup\$(^Name).lnk" $INSTDIR\$(^Name).exe "" "$INSTDIR\$(^Name).exe" 0 ; Create shortcut with icon + CreateShortCut "$SMPROGRAMS\$StartMenuGroup\$(^Name) (No console).lnk" $INSTDIR\$(^Name).exe "--no-console" "$INSTDIR\$(^Name).exe" 0 CreateShortcut "$SMPROGRAMS\$StartMenuGroup\Readme.lnk" $INSTDIR\README.txt CreateShortcut "$SMPROGRAMS\$StartMenuGroup\Uninstall $(^Name).lnk" $INSTDIR\uninstall.exe !insertmacro MUI_STARTMENU_WRITE_END @@ -320,6 +365,10 @@ Section -un.Main SecUninstall Delete /REBOOTOK $INSTDIR\translations.dat !endif +!ifdef _ENABLE_GAME_EXPLORER + Games::unregisterGame "$INSTDIR\scummvm.exe" +!endif + Delete /REBOOTOK $INSTDIR\scummvm.exe Delete /REBOOTOK $INSTDIR\SDL.dll SectionEnd @@ -354,3 +403,63 @@ Function un.onInit ReadRegStr $INSTDIR HKCU "${REGKEY}" InstallPath !insertmacro MUI_STARTMENU_GETFOLDER Application $StartMenuGroup FunctionEnd + + +######################################################################################### +# Helper functions +######################################################################################### + +!ifdef _CONVERT_TEXT +;------------------------------------------------------------------------------- +; strips all CRs and then converts all LFs into CRLFs +; (this is roughly equivalent to "cat file | dos2unix | unix2dos") +; +; Usage: +; Push "infile" +; Call unix2dos +; +; Note: this function destroys $0 $1 $2 +Function unix2dos + ClearErrors + + Pop $2 + Rename $2 $2.U2D + FileOpen $1 $2 w + + FileOpen $0 $2.U2D r + + Push $2 ; save name for deleting + + IfErrors unix2dos_done + + ; $0 = file input (opened for reading) + ; $1 = file output (opened for writing) + +unix2dos_loop: + ; read a byte (stored in $2) + FileReadByte $0 $2 + IfErrors unix2dos_done ; EOL + ; skip CR + StrCmp $2 13 unix2dos_loop + ; if LF write an extra CR + StrCmp $2 10 unix2dos_cr unix2dos_write + +unix2dos_cr: + FileWriteByte $1 13 + +unix2dos_write: + ; write byte + FileWriteByte $1 $2 + ; read next byte + Goto unix2dos_loop + +unix2dos_done: + ; close files + FileClose $0 + FileClose $1 + + ; delete original + Pop $0 + Delete $0.U2D +FunctionEnd +!endif diff --git a/dists/nsis/scummvm.nsi.in b/dists/win32/scummvm.nsi.in index c94e5943f7..cba1e81e33 100644 --- a/dists/nsis/scummvm.nsi.in +++ b/dists/win32/scummvm.nsi.in @@ -20,19 +20,26 @@ #!define _DEBUG #!define _INCLUDE_DATA_FILES +!define _ENABLE_GAME_EXPLORER +#!define _LOG_BUILD +!define _CONVERT_TEXT Name ScummVM # Included files !include MUI2.nsh +# Plugins +!ifdef _ENABLE_GAME_EXPLORER +!AddPluginDir "./plugins" +!endif + ######################################################################################### # Command line options ######################################################################################### #!define top_srcdir "" -#!define build_dir "" -#!define text_dir "" +#!define staging_dir "" #!define ARCH "" ;(optional, defaults to win32) # Check parameters @@ -40,17 +47,19 @@ Name ScummVM !error "Top source folder has not been passed to command line!" !endif -!ifndef build_dir - !error "Build folder has not been passed to command line (this folder should contain the executable and linked DLLs)!" -!endif - -!ifndef text_dir - !error "Text folder has not been passed to command line (this folder should contain all the text files used by the installer)!" +!ifndef staging_dir + !error "Staging folder has not been passed to command line (this folder should contain the executable and linked DLLs)!" !endif !ifndef ARCH !warning "ARCH has not been defined, defaulting to 'win32'" !define ARCH "win32" +!else + !if "${ARCH}" == "" + !warning "ARCH was empty, defaulting to 'win32'" + !undef ARCH + !define ARCH "win32" + !endif !endif ######################################################################################### @@ -72,7 +81,7 @@ Name ScummVM ######################################################################################### # Installer configuration ######################################################################################### -OutFile ${build_dir}\scummvm-${VERSION}-${ARCH}.exe +OutFile ${staging_dir}\scummvm-${VERSION}-${ARCH}.exe InstallDir $PROGRAMFILES\ScummVM ; Default installation folder InstallDirRegKey HKCU "Software\ScummVM\ScummVM" "InstallPath" ; Get installation folder from registry if available ; The application name needs to be refered directly instead of through ${REGKEY} @@ -220,17 +229,35 @@ Var StartMenuGroup # Installer sections ######################################################################################### Section "ScummVM" SecMain +!ifdef _LOG_BUILD + LogSet on +!endif SetOutPath $INSTDIR SetOverwrite on # Text files - File /oname=AUTHORS.txt "${text_dir}\AUTHORS" - File /oname=COPYING.LGPL.txt "${text_dir}\COPYING.LGPL" - File /oname=COPYING.txt "${text_dir}\COPYING" - File /oname=COPYRIGHT.txt "${text_dir}\COPYRIGHT" - File /oname=NEWS.txt "${text_dir}\NEWS" - File /oname=README.txt "${text_dir}\README" - File /oname=README-SDL.txt "${build_dir}\README-SDL" + File /oname=AUTHORS.txt "${top_srcdir}\AUTHORS" + File /oname=COPYING.LGPL.txt "${top_srcdir}\COPYING.LGPL" + File /oname=COPYING.txt "${top_srcdir}\COPYING" + File /oname=COPYRIGHT.txt "${top_srcdir}\COPYRIGHT" + File /oname=NEWS.txt "${top_srcdir}\NEWS" + File /oname=README.txt "${top_srcdir}\README" + +!ifdef _CONVERT_TEXT + # Convert line endings + Push "$INSTDIR\AUTHORS.txt" + Call unix2dos + Push "$INSTDIR\COPYING.LGPL.txt" + Call unix2dos + Push "$INSTDIR\COPYING.txt" + Call unix2dos + Push "$INSTDIR\COPYRIGHT.txt" + Call unix2dos + Push "$INSTDIR\NEWS.txt" + Call unix2dos + Push "$INSTDIR\README.txt" + Call unix2dos +!endif !ifdef _INCLUDE_DATA_FILES # Engine data @@ -253,10 +280,27 @@ Section "ScummVM" SecMain !endif # Main exe and dlls - File "${build_dir}\scummvm.exe" - File "${build_dir}\SDL.dll" + File "${staging_dir}\scummvm.exe" + File "${staging_dir}\SDL.dll" WriteRegStr HKCU "${REGKEY}" InstallPath "$INSTDIR" ; Store installation folder + + #Register with game explorer +!ifdef _ENABLE_GAME_EXPLORER + Games::registerGame "$INSTDIR\scummvm.exe" + pop $0 + # This is for Vista only, for 7 the tasks are defined in the gdf xml + ${If} $0 != "0" + ${AndIf} $0 != "" + ${AndIf} $0 != "$INSTDIR\scummvm.exe" + CreateDirectory "$0\PlayTasks\0" + CreateShortcut "$0\PlayTasks\0\Play.lnk" "$INSTDIR\scummvm.exe" "--no-console" + CreateDirectory "$0\PlayTasks\1" + CreateShortcut "$0\PlayTasks\1\Play (console).lnk" "$INSTDIR\scummvm.exe" + CreateDirectory "$0\SupportTasks\0" + CreateShortcut "$0\SupportTasks\0\Home Page.lnk" "${URL}" + ${EndIf} +!endif SectionEnd # Write Start menu entries and uninstaller @@ -266,7 +310,8 @@ Section -post SecMainPost !insertmacro MUI_STARTMENU_WRITE_BEGIN Application SetShellVarContext all ; Create shortcuts in the all-users folder CreateDirectory "$SMPROGRAMS\$StartMenuGroup" - CreateShortCut "$SMPROGRAMS\$StartMenuGroup\$(^Name).lnk" $INSTDIR\$(^Name).exe "" "$INSTDIR\$(^Name).exe" 0 ; Create shortcut with icon + CreateShortCut "$SMPROGRAMS\$StartMenuGroup\$(^Name).lnk" $INSTDIR\$(^Name).exe "" "$INSTDIR\$(^Name).exe" 0 ; Create shortcut with icon + CreateShortCut "$SMPROGRAMS\$StartMenuGroup\$(^Name) (No console).lnk" $INSTDIR\$(^Name).exe "--no-console" "$INSTDIR\$(^Name).exe" 0 CreateShortcut "$SMPROGRAMS\$StartMenuGroup\Readme.lnk" $INSTDIR\README.txt CreateShortcut "$SMPROGRAMS\$StartMenuGroup\Uninstall $(^Name).lnk" $INSTDIR\uninstall.exe !insertmacro MUI_STARTMENU_WRITE_END @@ -320,6 +365,10 @@ Section -un.Main SecUninstall Delete /REBOOTOK $INSTDIR\translations.dat !endif +!ifdef _ENABLE_GAME_EXPLORER + Games::unregisterGame "$INSTDIR\scummvm.exe" +!endif + Delete /REBOOTOK $INSTDIR\scummvm.exe Delete /REBOOTOK $INSTDIR\SDL.dll SectionEnd @@ -354,3 +403,63 @@ Function un.onInit ReadRegStr $INSTDIR HKCU "${REGKEY}" InstallPath !insertmacro MUI_STARTMENU_GETFOLDER Application $StartMenuGroup FunctionEnd + + +######################################################################################### +# Helper functions +######################################################################################### + +!ifdef _CONVERT_TEXT +;------------------------------------------------------------------------------- +; strips all CRs and then converts all LFs into CRLFs +; (this is roughly equivalent to "cat file | dos2unix | unix2dos") +; +; Usage: +; Push "infile" +; Call unix2dos +; +; Note: this function destroys $0 $1 $2 +Function unix2dos + ClearErrors + + Pop $2 + Rename $2 $2.U2D + FileOpen $1 $2 w + + FileOpen $0 $2.U2D r + + Push $2 ; save name for deleting + + IfErrors unix2dos_done + + ; $0 = file input (opened for reading) + ; $1 = file output (opened for writing) + +unix2dos_loop: + ; read a byte (stored in $2) + FileReadByte $0 $2 + IfErrors unix2dos_done ; EOL + ; skip CR + StrCmp $2 13 unix2dos_loop + ; if LF write an extra CR + StrCmp $2 10 unix2dos_cr unix2dos_write + +unix2dos_cr: + FileWriteByte $1 13 + +unix2dos_write: + ; write byte + FileWriteByte $1 $2 + ; read next byte + Goto unix2dos_loop + +unix2dos_done: + ; close files + FileClose $0 + FileClose $1 + + ; delete original + Pop $0 + Delete $0.U2D +FunctionEnd +!endif |
