aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLittleboy2011-07-01 09:18:51 -0400
committerLittleboy2011-07-04 14:26:26 -0400
commitf88ef9b96589f29104ffd2b3900d6ed7bf8ed343 (patch)
tree7215e905988c0701fa9e9840c09fac20daa585d5
parent3afa4c312f0161c1162eb0b14ca9e02c5c277b52 (diff)
downloadscummvm-rg350-f88ef9b96589f29104ffd2b3900d6ed7bf8ed343.tar.gz
scummvm-rg350-f88ef9b96589f29104ffd2b3900d6ed7bf8ed343.tar.bz2
scummvm-rg350-f88ef9b96589f29104ffd2b3900d6ed7bf8ed343.zip
NSIS: Register with game explorer on installation
-rw-r--r--dists/win32/plugins/Games.dllbin0 -> 105472 bytes
-rw-r--r--dists/win32/scummvm.gdf.xml5
-rw-r--r--dists/win32/scummvm.nsi38
-rw-r--r--dists/win32/scummvm.nsi.in38
4 files changed, 78 insertions, 3 deletions
diff --git a/dists/win32/plugins/Games.dll b/dists/win32/plugins/Games.dll
new file mode 100644
index 0000000000..3a378b7064
--- /dev/null
+++ b/dists/win32/plugins/Games.dll
Binary files differ
diff --git a/dists/win32/scummvm.gdf.xml b/dists/win32/scummvm.gdf.xml
index 899260eaf7..1c50924e15 100644
--- a/dists/win32/scummvm.gdf.xml
+++ b/dists/win32/scummvm.gdf.xml
@@ -24,8 +24,11 @@
<GameTasks>
<Play>
<Primary>
- <FileTask path="scummvm.exe" arguments="-noconsole" />
+ <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">
diff --git a/dists/win32/scummvm.nsi b/dists/win32/scummvm.nsi
index 480f8f47ee..f5eb584a42 100644
--- a/dists/win32/scummvm.nsi
+++ b/dists/win32/scummvm.nsi
@@ -20,12 +20,20 @@
#!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
#########################################################################################
@@ -221,6 +229,9 @@ Var StartMenuGroup
# Installer sections
#########################################################################################
Section "ScummVM" SecMain
+!ifdef _LOG_BUILD
+ LogSet on
+!endif
SetOutPath $INSTDIR
SetOverwrite on
@@ -232,6 +243,7 @@ Section "ScummVM" SecMain
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
@@ -245,6 +257,7 @@ Section "ScummVM" SecMain
Call unix2dos
Push "$INSTDIR\README.txt"
Call unix2dos
+!endif
!ifdef _INCLUDE_DATA_FILES
# Engine data
@@ -271,6 +284,22 @@ Section "ScummVM" SecMain
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 != ""
+ 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
@@ -280,7 +309,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
@@ -334,6 +364,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
@@ -374,6 +408,7 @@ 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")
@@ -426,3 +461,4 @@ unix2dos_done:
Pop $0
Delete $0.U2D
FunctionEnd
+!endif
diff --git a/dists/win32/scummvm.nsi.in b/dists/win32/scummvm.nsi.in
index a87f5d6244..51a299905b 100644
--- a/dists/win32/scummvm.nsi.in
+++ b/dists/win32/scummvm.nsi.in
@@ -20,12 +20,20 @@
#!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
#########################################################################################
@@ -221,6 +229,9 @@ Var StartMenuGroup
# Installer sections
#########################################################################################
Section "ScummVM" SecMain
+!ifdef _LOG_BUILD
+ LogSet on
+!endif
SetOutPath $INSTDIR
SetOverwrite on
@@ -232,6 +243,7 @@ Section "ScummVM" SecMain
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
@@ -245,6 +257,7 @@ Section "ScummVM" SecMain
Call unix2dos
Push "$INSTDIR\README.txt"
Call unix2dos
+!endif
!ifdef _INCLUDE_DATA_FILES
# Engine data
@@ -271,6 +284,22 @@ Section "ScummVM" SecMain
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 != ""
+ 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
@@ -280,7 +309,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
@@ -334,6 +364,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
@@ -374,6 +408,7 @@ 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")
@@ -426,3 +461,4 @@ unix2dos_done:
Pop $0
Delete $0.U2D
FunctionEnd
+!endif