Create separate Windows launchers for each mod.
This commit is contained in:
13
appveyor.yml
13
appveyor.yml
@@ -53,12 +53,19 @@ after_test:
|
||||
- appveyor DownloadFile "https://raw.githubusercontent.com/wiki/OpenRA/OpenRA/Changelog.md" -FileName Changelog.md
|
||||
- make docs
|
||||
- ps: dir *.md | % {gc $_ -Raw | .\ConvertFrom-Markdown.ps1 | Out-File -FilePath "$($_.Name.TrimEnd(".md")).html"}
|
||||
- ps: (Get-Content "${env:APPVEYOR_BUILD_FOLDER}\packaging\windows\WindowsLauncher.cs.in").replace('DISPLAY_NAME', 'OpenRA').replace('MOD_ID', '').replace('FAQ_URL', 'http://wiki.openra.net/FAQ') | Set-Content "${env:APPVEYOR_BUILD_FOLDER}\packaging\windows\WindowsLauncher.cs"
|
||||
- ps: csc.exe /noconfig /platform:x86 /reference:System.dll /reference:System.Core.dll /reference:System.Drawing.dll /reference:System.Windows.Forms.dll /reference:"${env:APPVEYOR_BUILD_FOLDER}\OpenRA.Game.exe" /out:"${env:APPVEYOR_BUILD_FOLDER}\OpenRA.exe" /win32icon:"${env:APPVEYOR_BUILD_FOLDER}\packaging\windows\OpenRA.ico" /target:winexe ${env:APPVEYOR_BUILD_FOLDER}\packaging\windows\WindowsLauncher.cs
|
||||
- ps: (Get-Content "${env:APPVEYOR_BUILD_FOLDER}\packaging\windows\WindowsLauncher.cs.in").replace('DISPLAY_NAME', 'Red Alert').replace('MOD_ID', 'ra').replace('FAQ_URL', 'http://wiki.openra.net/FAQ') | Set-Content "${env:APPVEYOR_BUILD_FOLDER}\packaging\windows\WindowsLauncher.cs"
|
||||
- ps: csc.exe /noconfig /platform:x86 /reference:System.dll /reference:System.Core.dll /reference:System.Drawing.dll /reference:System.Windows.Forms.dll /reference:"${env:APPVEYOR_BUILD_FOLDER}\OpenRA.Game.exe" /out:"${env:APPVEYOR_BUILD_FOLDER}\RedAlert.exe" /win32icon:"${env:APPVEYOR_BUILD_FOLDER}\packaging\windows\RedAlert.ico" /target:winexe ${env:APPVEYOR_BUILD_FOLDER}\packaging\windows\WindowsLauncher.cs
|
||||
- ps: (Get-Content "${env:APPVEYOR_BUILD_FOLDER}\packaging\windows\WindowsLauncher.cs.in").replace('DISPLAY_NAME', 'Tiberian Dawn').replace('MOD_ID', 'cnc').replace('FAQ_URL', 'http://wiki.openra.net/FAQ') | Set-Content "${env:APPVEYOR_BUILD_FOLDER}\packaging\windows\WindowsLauncher.cs"
|
||||
- ps: csc.exe /noconfig /platform:x86 /reference:System.dll /reference:System.Core.dll /reference:System.Drawing.dll /reference:System.Windows.Forms.dll /reference:"${env:APPVEYOR_BUILD_FOLDER}\OpenRA.Game.exe" /out:"${env:APPVEYOR_BUILD_FOLDER}\TiberianDawn.exe" /win32icon:"${env:APPVEYOR_BUILD_FOLDER}\packaging\windows\TiberianDawn.ico" /target:winexe ${env:APPVEYOR_BUILD_FOLDER}\packaging\windows\WindowsLauncher.cs
|
||||
- ps: (Get-Content "${env:APPVEYOR_BUILD_FOLDER}\packaging\windows\WindowsLauncher.cs.in").replace('DISPLAY_NAME', 'Dune 2000').replace('MOD_ID', 'd2k').replace('FAQ_URL', 'http://wiki.openra.net/FAQ') | Set-Content "${env:APPVEYOR_BUILD_FOLDER}\packaging\windows\WindowsLauncher.cs"
|
||||
- ps: csc.exe /noconfig /platform:x86 /reference:System.dll /reference:System.Core.dll /reference:System.Drawing.dll /reference:System.Windows.Forms.dll /reference:"${env:APPVEYOR_BUILD_FOLDER}\OpenRA.Game.exe" /out:"${env:APPVEYOR_BUILD_FOLDER}\Dune2000.exe" /win32icon:"${env:APPVEYOR_BUILD_FOLDER}\packaging\windows\Dune2000.ico" /target:winexe ${env:APPVEYOR_BUILD_FOLDER}\packaging\windows\WindowsLauncher.cs
|
||||
- ps: cp packaging\windows\OpenRA.ico .
|
||||
- '"C:\Program Files (x86)\NSIS\makensis.exe" /DSRCDIR="%APPVEYOR_BUILD_FOLDER%" /DDEPSDIR="%APPVEYOR_BUILD_FOLDER%\thirdparty\download\windows" /V3 packaging/windows/OpenRA.nsi'
|
||||
- ps: cp packaging\windows\RedAlert.ico .
|
||||
- ps: cp packaging\windows\TiberianDawn.ico .
|
||||
- ps: cp packaging\windows\Dune2000.ico .
|
||||
- if defined APPVEYOR_REPO_TAG_NAME set VERSION=%APPVEYOR_REPO_TAG_NAME%
|
||||
- if not defined APPVEYOR_REPO_TAG_NAME set VERSION=%APPVEYOR_REPO_COMMIT:~0,7%
|
||||
- '"C:\Program Files (x86)\NSIS\makensis.exe" /DSRCDIR="%APPVEYOR_BUILD_FOLDER%" /DDEPSDIR="%APPVEYOR_BUILD_FOLDER%\thirdparty\download\windows" /DTAG="git-%VERSION%" /V3 packaging/windows/OpenRA.nsi'
|
||||
- move /Y %APPVEYOR_BUILD_FOLDER%\packaging\windows\OpenRA.Setup.exe %APPVEYOR_BUILD_FOLDER%\OpenRA-%VERSION%.exe
|
||||
|
||||
artifacts:
|
||||
|
||||
@@ -21,12 +21,6 @@ rm launcher.zip
|
||||
# Copy the template to build the game package
|
||||
cp -r $2/* "OpenRA.app/Contents/Resources/" || exit 3
|
||||
|
||||
# Remove unused icon
|
||||
rm OpenRA.app/Contents/Resources/OpenRA.ico
|
||||
|
||||
# Remove WinForms applications
|
||||
rm OpenRA.app/Contents/Resources/OpenRA.exe
|
||||
|
||||
# Set version string
|
||||
sed "s/{DEV_VERSION}/${1}/" OpenRA.app/Contents/Info.plist > OpenRA.app/Contents/Info.plist.tmp
|
||||
mv OpenRA.app/Contents/Info.plist.tmp OpenRA.app/Contents/Info.plist
|
||||
|
||||
@@ -69,9 +69,6 @@ cp thirdparty/download/MaxMind.Db.dll packaging/built
|
||||
# global chat
|
||||
cp thirdparty/download/SmarIrc4net.dll packaging/built
|
||||
|
||||
# Copy game icon for windows package
|
||||
cp packaging/windows/OpenRA.ico packaging/built
|
||||
|
||||
cd packaging
|
||||
echo "Creating packages..."
|
||||
|
||||
|
||||
BIN
packaging/windows/Dune2000.ico
Normal file
BIN
packaging/windows/Dune2000.ico
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 83 KiB |
@@ -56,17 +56,28 @@ Section "-Reg" Reg
|
||||
; Installation directory
|
||||
WriteRegStr HKLM "Software\OpenRA" "InstallDir" $INSTDIR
|
||||
|
||||
; OpenRA URL Scheme
|
||||
WriteRegStr HKLM "Software\Classes\openra" "" "URL:OpenRA scheme"
|
||||
WriteRegStr HKLM "Software\Classes\openra" "URL Protocol" ""
|
||||
WriteRegStr HKLM "Software\Classes\openra\DefaultIcon" "" "$INSTDIR\OpenRA.ico,0"
|
||||
WriteRegStr HKLM "Software\Classes\openra\Shell\Open\Command" "" "$INSTDIR\OpenRA.exe Launch.URI=%1"
|
||||
; Join server URL Scheme
|
||||
WriteRegStr HKLM "Software\Classes\openra-ra-${TAG}" "" "URL:Join OpenRA server"
|
||||
WriteRegStr HKLM "Software\Classes\openra-ra-${TAG}" "URL Protocol" ""
|
||||
WriteRegStr HKLM "Software\Classes\openra-ra-${TAG}\DefaultIcon" "" "$INSTDIR\RedAlert.ico,0"
|
||||
WriteRegStr HKLM "Software\Classes\openra-ra-${TAG}\Shell\Open\Command" "" "$INSTDIR\RedAlert.exe Launch.URI=%1"
|
||||
|
||||
WriteRegStr HKLM "Software\Classes\openra-cnc-${TAG}" "" "URL:Join OpenRA server"
|
||||
WriteRegStr HKLM "Software\Classes\openra-cnc-${TAG}" "URL Protocol" ""
|
||||
WriteRegStr HKLM "Software\Classes\openra-cnc-${TAG}\DefaultIcon" "" "$INSTDIR\TiberianDawn.ico,0"
|
||||
WriteRegStr HKLM "Software\Classes\openra-cnc-${TAG}\Shell\Open\Command" "" "$INSTDIR\TiberianDawn.exe Launch.URI=%1"
|
||||
|
||||
WriteRegStr HKLM "Software\Classes\openra-d2k-${TAG}" "" "URL:Join OpenRA server"
|
||||
WriteRegStr HKLM "Software\Classes\openra-d2k-${TAG}" "URL Protocol" ""
|
||||
WriteRegStr HKLM "Software\Classes\openra-d2k-${TAG}\DefaultIcon" "" "$INSTDIR\Dune2000.ico,0"
|
||||
WriteRegStr HKLM "Software\Classes\openra-d2k-${TAG}\Shell\Open\Command" "" "$INSTDIR\Dune2000.exe Launch.URI=%1"
|
||||
|
||||
; Remove obsolete file associations
|
||||
DeleteRegKey HKLM "Software\Classes\.orarep"
|
||||
DeleteRegKey HKLM "Software\Classes\OpenRA_replay"
|
||||
DeleteRegKey HKLM "Software\Classes\.oramod"
|
||||
DeleteRegKey HKLM "Software\Classes\OpenRA_mod"
|
||||
DeleteRegKey HKLM "Software\Classes\openra"
|
||||
|
||||
SectionEnd
|
||||
|
||||
@@ -82,7 +93,9 @@ Section "Game" GAME
|
||||
File /r "${SRCDIR}\mods\modcontent"
|
||||
|
||||
SetOutPath "$INSTDIR"
|
||||
File "${SRCDIR}\OpenRA.exe"
|
||||
File "${SRCDIR}\RedAlert.exe"
|
||||
File "${SRCDIR}\TiberianDawn.exe"
|
||||
File "${SRCDIR}\Dune2000.exe"
|
||||
File "${SRCDIR}\OpenRA.Game.exe"
|
||||
File "${SRCDIR}\OpenRA.Game.exe.config"
|
||||
File "${SRCDIR}\OpenRA.Utility.exe"
|
||||
@@ -98,6 +111,9 @@ Section "Game" GAME
|
||||
File "${SRCDIR}\CONTRIBUTING.html"
|
||||
File "${SRCDIR}\DOCUMENTATION.html"
|
||||
File "${SRCDIR}\OpenRA.ico"
|
||||
File "${SRCDIR}\RedAlert.ico"
|
||||
File "${SRCDIR}\TiberianDawn.ico"
|
||||
File "${SRCDIR}\Dune2000.ico"
|
||||
File "${SRCDIR}\SharpFont.dll"
|
||||
File "${SRCDIR}\SDL2-CS.dll"
|
||||
File "${SRCDIR}\OpenAL-CS.dll"
|
||||
@@ -113,8 +129,12 @@ Section "Game" GAME
|
||||
|
||||
!insertmacro MUI_STARTMENU_WRITE_BEGIN Application
|
||||
CreateDirectory "$SMPROGRAMS\$StartMenuFolder"
|
||||
CreateShortCut "$SMPROGRAMS\$StartMenuFolder\OpenRA.lnk" $OUTDIR\OpenRA.exe "" \
|
||||
"$OUTDIR\OpenRA.exe" "" "" "" ""
|
||||
CreateShortCut "$SMPROGRAMS\$StartMenuFolder\Red Alert.lnk" $OUTDIR\RedAlert.exe "" \
|
||||
"$OUTDIR\RedAlert.exe" "" "" "" ""
|
||||
CreateShortCut "$SMPROGRAMS\$StartMenuFolder\Tiberian Dawn.lnk" $OUTDIR\TiberianDawn.exe "" \
|
||||
"$OUTDIR\TiberianDawn.exe" "" "" "" ""
|
||||
CreateShortCut "$SMPROGRAMS\$StartMenuFolder\Dune 2000.lnk" $OUTDIR\Dune2000.exe "" \
|
||||
"$OUTDIR\Dune2000.exe" "" "" "" ""
|
||||
CreateShortCut "$SMPROGRAMS\$StartMenuFolder\README.lnk" $OUTDIR\README.html "" \
|
||||
"$OUTDIR\README.html" "" "" "" ""
|
||||
!insertmacro MUI_STARTMENU_WRITE_END
|
||||
@@ -129,8 +149,12 @@ SectionEnd
|
||||
|
||||
Section "Desktop Shortcut" DESKTOPSHORTCUT
|
||||
SetOutPath "$INSTDIR"
|
||||
CreateShortCut "$DESKTOP\OpenRA.lnk" $INSTDIR\OpenRA.exe "" \
|
||||
"$INSTDIR\OpenRA.exe" "" "" "" ""
|
||||
CreateShortCut "$DESKTOP\OpenRA - Red Alert.lnk" $INSTDIR\RedAlert.exe "" \
|
||||
"$INSTDIR\RedAlert.exe" "" "" "" ""
|
||||
CreateShortCut "$DESKTOP\OpenRA - Tiberian Dawn.lnk" $INSTDIR\TiberianDawn.exe "" \
|
||||
"$INSTDIR\TiberianDawn.exe" "" "" "" ""
|
||||
CreateShortCut "$DESKTOP\OpenRA - Dune 2000.lnk" $INSTDIR\Dune2000.exe "" \
|
||||
"$INSTDIR\Dune2000.exe" "" "" "" ""
|
||||
SectionEnd
|
||||
|
||||
;***************************
|
||||
@@ -177,7 +201,9 @@ Function ${UN}Clean
|
||||
RMDir /r $INSTDIR\maps
|
||||
RMDir /r $INSTDIR\glsl
|
||||
RMDir /r $INSTDIR\lua
|
||||
Delete $INSTDIR\OpenRA.exe
|
||||
Delete $INSTDIR\RedAlert.exe
|
||||
Delete $INSTDIR\TiberianDawn.exe
|
||||
Delete $INSTDIR\Dune2000.exe
|
||||
Delete $INSTDIR\OpenRA.Game.exe
|
||||
Delete $INSTDIR\OpenRA.Game.exe.config
|
||||
Delete $INSTDIR\OpenRA.Utility.exe
|
||||
@@ -194,6 +220,9 @@ Function ${UN}Clean
|
||||
Delete $INSTDIR\CONTRIBUTING.html
|
||||
Delete $INSTDIR\DOCUMENTATION.html
|
||||
Delete $INSTDIR\OpenRA.ico
|
||||
Delete $INSTDIR\RedAlert.ico
|
||||
Delete $INSTDIR\TiberianDawn.ico
|
||||
Delete $INSTDIR\Dune2000.ico
|
||||
Delete "$INSTDIR\global mix database.dat"
|
||||
Delete $INSTDIR\MaxMind.Db.dll
|
||||
Delete $INSTDIR\GeoLite2-Country.mmdb.gz
|
||||
@@ -209,14 +238,18 @@ Function ${UN}Clean
|
||||
RMDir /r $INSTDIR\Support
|
||||
|
||||
DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\OpenRA"
|
||||
DeleteRegKey HKLM "Software\Classes\openra"
|
||||
DeleteRegKey HKLM "Software\Classes\openra-ra-${TAG}"
|
||||
DeleteRegKey HKLM "Software\Classes\openra-cnc-${TAG}"
|
||||
DeleteRegKey HKLM "Software\Classes\openra-d2k-${TAG}"
|
||||
|
||||
Delete $INSTDIR\uninstaller.exe
|
||||
RMDir $INSTDIR
|
||||
|
||||
!insertmacro MUI_STARTMENU_GETFOLDER Application $StartMenuFolder
|
||||
RMDir /r "$SMPROGRAMS\$StartMenuFolder"
|
||||
Delete $DESKTOP\OpenRA.lnk
|
||||
Delete $DESKTOP\OpenRA - Red Alert.lnk
|
||||
Delete $DESKTOP\OpenRA - Tiberian Dawn.lnk
|
||||
Delete $DESKTOP\OpenRA - Dune 2000.lnk
|
||||
DeleteRegKey HKLM "Software\OpenRA"
|
||||
FunctionEnd
|
||||
!macroend
|
||||
|
||||
BIN
packaging/windows/RedAlert.ico
Normal file
BIN
packaging/windows/RedAlert.ico
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 32 KiB |
BIN
packaging/windows/TiberianDawn.ico
Normal file
BIN
packaging/windows/TiberianDawn.ico
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 60 KiB |
22
packaging/windows/buildpackage.sh
Executable file → Normal file
22
packaging/windows/buildpackage.sh
Executable file → Normal file
@@ -8,6 +8,13 @@ OUTPUTDIR="$4"
|
||||
LAUNCHER_LIBS="-r:System.dll -r:System.Drawing.dll -r:System.Windows.Forms.dll -r:${BUILTDIR}/OpenRA.Game.exe"
|
||||
FAQ_URL="http://wiki.openra.net/FAQ"
|
||||
|
||||
SUFFIX=" (dev)"
|
||||
if [[ $TAG == release* ]]; then
|
||||
SUFFIX=""
|
||||
elif [[ $TAG == playtest* ]]; then
|
||||
SUFFIX=" (playtest)"
|
||||
fi
|
||||
|
||||
function makelauncher()
|
||||
{
|
||||
sed "s|DISPLAY_NAME|$2|" WindowsLauncher.cs.in | sed "s|MOD_ID|$3|" | sed "s|FAQ_URL|${FAQ_URL}|" > WindowsLauncher.cs
|
||||
@@ -16,12 +23,17 @@ function makelauncher()
|
||||
mono ${SRCDIR}/fixheader.exe $1 > /dev/null
|
||||
}
|
||||
|
||||
echo "Compiling Windows launcher"
|
||||
makelauncher ${BUILTDIR}/OpenRA.exe "OpenRA" "" OpenRA.ico
|
||||
echo "Compiling Windows launchers"
|
||||
makelauncher ${BUILTDIR}/RedAlert.exe "Red Alert" "ra" RedAlert.ico
|
||||
makelauncher ${BUILTDIR}/TiberianDawn.exe "Tiberian Dawn" "cnc" TiberianDawn.ico
|
||||
makelauncher ${BUILTDIR}/Dune2000.exe "Dune 2000" "d2k" Dune2000.ico
|
||||
|
||||
# Windows specific icons
|
||||
cp OpenRA.ico RedAlert.ico TiberianDawn.ico Dune2000.ico ${BUILTDIR}
|
||||
|
||||
if [ -x /usr/bin/makensis ]; then
|
||||
echo "Building Windows setup.exe"
|
||||
makensis -V2 -DSRCDIR="$BUILTDIR" -DDEPSDIR="${SRCDIR}/thirdparty/download/windows" OpenRA.nsi
|
||||
makensis -V2 -DSRCDIR="$BUILTDIR" -DDEPSDIR="${SRCDIR}/thirdparty/download/windows" -DTAG="${TAG}" OpenRA.nsi
|
||||
if [ $? -eq 0 ]; then
|
||||
mv OpenRA.Setup.exe "$OUTPUTDIR"/OpenRA-$TAG.exe
|
||||
else
|
||||
@@ -30,3 +42,7 @@ if [ -x /usr/bin/makensis ]; then
|
||||
else
|
||||
echo "Skipping Windows setup.exe build due to missing NSIS"
|
||||
fi
|
||||
|
||||
# Cleanup
|
||||
rm ${BUILTDIR}/OpenRA.ico ${BUILTDIR}/RedAlert.ico ${BUILTDIR}/TiberianDawn.ico ${BUILTDIR}/Dune2000.ico
|
||||
rm ${BUILTDIR}/RedAlert.exe ${BUILTDIR}/TiberianDawn.exe ${BUILTDIR}/Dune2000.exe
|
||||
|
||||
Reference in New Issue
Block a user