diff --git a/.travis.yml b/.travis.yml index 75032e0da0..755df06a7a 100644 --- a/.travis.yml +++ b/.travis.yml @@ -23,6 +23,7 @@ addons: - dpkg - zsync - markdown + - imagemagick # Environment variables env: diff --git a/Makefile b/Makefile index e91280634d..cfa0eadd79 100644 --- a/Makefile +++ b/Makefile @@ -236,13 +236,13 @@ install-core: install-engine install-common-mod-files install-default-mods install-linux-icons: for SIZE in 16x16 32x32 48x48 64x64 128x128; do \ $(INSTALL_DIR) "$(DESTDIR)$(datadir)/icons/hicolor/$$SIZE/apps"; \ - $(INSTALL_DATA) packaging/linux/icons/ra_$$SIZE.png "$(DESTDIR)$(datadir)/icons/hicolor/$$SIZE/apps/openra-ra.png"; \ - $(INSTALL_DATA) packaging/linux/icons/cnc_$$SIZE.png "$(DESTDIR)$(datadir)/icons/hicolor/$$SIZE/apps/openra-cnc.png"; \ - $(INSTALL_DATA) packaging/linux/icons/d2k_$$SIZE.png "$(DESTDIR)$(datadir)/icons/hicolor/$$SIZE/apps/openra-d2k.png"; \ + $(INSTALL_DATA) packaging/artwork/ra_$$SIZE.png "$(DESTDIR)$(datadir)/icons/hicolor/$$SIZE/apps/openra-ra.png"; \ + $(INSTALL_DATA) packaging/artwork/cnc_$$SIZE.png "$(DESTDIR)$(datadir)/icons/hicolor/$$SIZE/apps/openra-cnc.png"; \ + $(INSTALL_DATA) packaging/artwork/d2k_$$SIZE.png "$(DESTDIR)$(datadir)/icons/hicolor/$$SIZE/apps/openra-d2k.png"; \ done $(INSTALL_DIR) "$(DESTDIR)$(datadir)/icons/hicolor/scalable/apps" - $(INSTALL_DATA) packaging/linux/icons/ra_scalable.svg "$(DESTDIR)$(datadir)/icons/hicolor/scalable/apps/openra-ra.svg" - $(INSTALL_DATA) packaging/linux/icons/cnc_scalable.svg "$(DESTDIR)$(datadir)/icons/hicolor/scalable/apps/openra-cnc.svg" + $(INSTALL_DATA) packaging/artwork/ra_scalable.svg "$(DESTDIR)$(datadir)/icons/hicolor/scalable/apps/openra-ra.svg" + $(INSTALL_DATA) packaging/artwork/cnc_scalable.svg "$(DESTDIR)$(datadir)/icons/hicolor/scalable/apps/openra-cnc.svg" install-linux-desktop: @$(INSTALL_DIR) "$(DESTDIR)$(datadir)/applications" diff --git a/appveyor.yml b/appveyor.yml index a458c98158..e26422c500 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -20,16 +20,16 @@ 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"} + - pip install Pillow + - python -c "from PIL import Image; i = Image.open('packaging/artwork/ra_256x256.png'); i.save('ra.ico')" + - python -c "from PIL import Image; i = Image.open('packaging/artwork/cnc_256x256.png'); i.save('cnc.ico')" + - python -c "from PIL import Image; i = Image.open('packaging/artwork/d2k_256x256.png'); i.save('d2k.ico')" - 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: C:\"Program Files (x86)"\"Microsoft Visual Studio"\2017\Community\MSBuild\15.0\Bin\Roslyn\csc.exe /noconfig /platform:x64 /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: C:\"Program Files (x86)"\"Microsoft Visual Studio"\2017\Community\MSBuild\15.0\Bin\Roslyn\csc.exe /noconfig /platform:x64 /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}\ra.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: C:\"Program Files (x86)"\"Microsoft Visual Studio"\2017\Community\MSBuild\15.0\Bin\Roslyn\csc.exe /noconfig /platform:x64 /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: C:\"Program Files (x86)"\"Microsoft Visual Studio"\2017\Community\MSBuild\15.0\Bin\Roslyn\csc.exe /noconfig /platform:x64 /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}\cnc.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: C:\"Program Files (x86)"\"Microsoft Visual Studio"\2017\Community\MSBuild\15.0\Bin\Roslyn\csc.exe /noconfig /platform:x64 /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 . - - ps: cp packaging\windows\RedAlert.ico . - - ps: cp packaging\windows\TiberianDawn.ico . - - ps: cp packaging\windows\Dune2000.ico . + - ps: C:\"Program Files (x86)"\"Microsoft Visual Studio"\2017\Community\MSBuild\15.0\Bin\Roslyn\csc.exe /noconfig /platform:x64 /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}\d2k.ico" /target:winexe ${env:APPVEYOR_BUILD_FOLDER}\packaging\windows\WindowsLauncher.cs - 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%" /DTAG="git-%VERSION%" /DSUFFIX=" (dev)" /V3 packaging/windows/OpenRA.nsi' diff --git a/packaging/macos/cnc.iconset/icon_512x512@2x.png b/packaging/artwork/cnc_1024x1024.png similarity index 100% rename from packaging/macos/cnc.iconset/icon_512x512@2x.png rename to packaging/artwork/cnc_1024x1024.png diff --git a/packaging/linux/icons/cnc_128x128.png b/packaging/artwork/cnc_128x128.png similarity index 100% rename from packaging/linux/icons/cnc_128x128.png rename to packaging/artwork/cnc_128x128.png diff --git a/packaging/linux/icons/cnc_16x16.png b/packaging/artwork/cnc_16x16.png similarity index 100% rename from packaging/linux/icons/cnc_16x16.png rename to packaging/artwork/cnc_16x16.png diff --git a/packaging/artwork/cnc_24x24.png b/packaging/artwork/cnc_24x24.png new file mode 100644 index 0000000000..800b5dc251 Binary files /dev/null and b/packaging/artwork/cnc_24x24.png differ diff --git a/packaging/macos/cnc.iconset/icon_256x256.png b/packaging/artwork/cnc_256x256.png similarity index 100% rename from packaging/macos/cnc.iconset/icon_256x256.png rename to packaging/artwork/cnc_256x256.png diff --git a/packaging/linux/icons/cnc_32x32.png b/packaging/artwork/cnc_32x32.png similarity index 100% rename from packaging/linux/icons/cnc_32x32.png rename to packaging/artwork/cnc_32x32.png diff --git a/packaging/linux/icons/cnc_48x48.png b/packaging/artwork/cnc_48x48.png similarity index 100% rename from packaging/linux/icons/cnc_48x48.png rename to packaging/artwork/cnc_48x48.png diff --git a/packaging/macos/cnc.iconset/icon_512x512.png b/packaging/artwork/cnc_512x512.png similarity index 100% rename from packaging/macos/cnc.iconset/icon_512x512.png rename to packaging/artwork/cnc_512x512.png diff --git a/packaging/linux/icons/cnc_64x64.png b/packaging/artwork/cnc_64x64.png similarity index 100% rename from packaging/linux/icons/cnc_64x64.png rename to packaging/artwork/cnc_64x64.png diff --git a/packaging/linux/icons/cnc_scalable.svg b/packaging/artwork/cnc_scalable.svg similarity index 100% rename from packaging/linux/icons/cnc_scalable.svg rename to packaging/artwork/cnc_scalable.svg diff --git a/packaging/macos/d2k.iconset/icon_512x512@2x.png b/packaging/artwork/d2k_1024x1024.png similarity index 100% rename from packaging/macos/d2k.iconset/icon_512x512@2x.png rename to packaging/artwork/d2k_1024x1024.png diff --git a/packaging/linux/icons/d2k_128x128.png b/packaging/artwork/d2k_128x128.png similarity index 100% rename from packaging/linux/icons/d2k_128x128.png rename to packaging/artwork/d2k_128x128.png diff --git a/packaging/linux/icons/d2k_16x16.png b/packaging/artwork/d2k_16x16.png similarity index 100% rename from packaging/linux/icons/d2k_16x16.png rename to packaging/artwork/d2k_16x16.png diff --git a/packaging/artwork/d2k_24x24.png b/packaging/artwork/d2k_24x24.png new file mode 100644 index 0000000000..ce8a21c3e0 Binary files /dev/null and b/packaging/artwork/d2k_24x24.png differ diff --git a/packaging/macos/d2k.iconset/icon_256x256.png b/packaging/artwork/d2k_256x256.png similarity index 100% rename from packaging/macos/d2k.iconset/icon_256x256.png rename to packaging/artwork/d2k_256x256.png diff --git a/packaging/linux/icons/d2k_32x32.png b/packaging/artwork/d2k_32x32.png similarity index 100% rename from packaging/linux/icons/d2k_32x32.png rename to packaging/artwork/d2k_32x32.png diff --git a/packaging/linux/icons/d2k_48x48.png b/packaging/artwork/d2k_48x48.png similarity index 100% rename from packaging/linux/icons/d2k_48x48.png rename to packaging/artwork/d2k_48x48.png diff --git a/packaging/macos/d2k.iconset/icon_512x512.png b/packaging/artwork/d2k_512x512.png similarity index 100% rename from packaging/macos/d2k.iconset/icon_512x512.png rename to packaging/artwork/d2k_512x512.png diff --git a/packaging/linux/icons/d2k_64x64.png b/packaging/artwork/d2k_64x64.png similarity index 100% rename from packaging/linux/icons/d2k_64x64.png rename to packaging/artwork/d2k_64x64.png diff --git a/packaging/macos/background-2x.png b/packaging/artwork/macos-background-2x.png similarity index 100% rename from packaging/macos/background-2x.png rename to packaging/artwork/macos-background-2x.png diff --git a/packaging/macos/background.png b/packaging/artwork/macos-background.png similarity index 100% rename from packaging/macos/background.png rename to packaging/artwork/macos-background.png diff --git a/packaging/macos/ra.iconset/icon_512x512@2x.png b/packaging/artwork/ra_1024x1024.png similarity index 100% rename from packaging/macos/ra.iconset/icon_512x512@2x.png rename to packaging/artwork/ra_1024x1024.png diff --git a/packaging/linux/icons/ra_128x128.png b/packaging/artwork/ra_128x128.png similarity index 100% rename from packaging/linux/icons/ra_128x128.png rename to packaging/artwork/ra_128x128.png diff --git a/packaging/linux/icons/ra_16x16.png b/packaging/artwork/ra_16x16.png similarity index 100% rename from packaging/linux/icons/ra_16x16.png rename to packaging/artwork/ra_16x16.png diff --git a/packaging/artwork/ra_24x24.png b/packaging/artwork/ra_24x24.png new file mode 100644 index 0000000000..6fd5436faf Binary files /dev/null and b/packaging/artwork/ra_24x24.png differ diff --git a/packaging/macos/ra.iconset/icon_256x256.png b/packaging/artwork/ra_256x256.png similarity index 100% rename from packaging/macos/ra.iconset/icon_256x256.png rename to packaging/artwork/ra_256x256.png diff --git a/packaging/linux/icons/ra_32x32.png b/packaging/artwork/ra_32x32.png similarity index 100% rename from packaging/linux/icons/ra_32x32.png rename to packaging/artwork/ra_32x32.png diff --git a/packaging/linux/icons/ra_48x48.png b/packaging/artwork/ra_48x48.png similarity index 100% rename from packaging/linux/icons/ra_48x48.png rename to packaging/artwork/ra_48x48.png diff --git a/packaging/macos/ra.iconset/icon_512x512.png b/packaging/artwork/ra_512x512.png similarity index 100% rename from packaging/macos/ra.iconset/icon_512x512.png rename to packaging/artwork/ra_512x512.png diff --git a/packaging/linux/icons/ra_64x64.png b/packaging/artwork/ra_64x64.png similarity index 100% rename from packaging/linux/icons/ra_64x64.png rename to packaging/artwork/ra_64x64.png diff --git a/packaging/linux/icons/ra_scalable.svg b/packaging/artwork/ra_scalable.svg similarity index 100% rename from packaging/linux/icons/ra_scalable.svg rename to packaging/artwork/ra_scalable.svg diff --git a/packaging/linux/buildpackage.sh b/packaging/linux/buildpackage.sh index 3a8d00fcaf..829708a387 100755 --- a/packaging/linux/buildpackage.sh +++ b/packaging/linux/buildpackage.sh @@ -21,6 +21,7 @@ TAG="$1" OUTPUTDIR="$2" SRCDIR="$(pwd)/../.." BUILTDIR="$(pwd)/build" +ARTWORK_DIR="$(pwd)/../artwork/" UPDATE_CHANNEL="" SUFFIX="-devel" @@ -117,14 +118,14 @@ build_appimage() { sed "s/{MODID}/${MOD_ID}/g" openra-mimeinfo.xml.in | sed "s/{TAG}/${TAG}/g" > temp.xml install -Dm 0755 temp.xml "${APPDIR}/usr/share/mime/packages/openra-${MOD_ID}.xml" - if [ -f "icons/${MOD_ID}_scalable.svg" ]; then - install -Dm644 "icons/${MOD_ID}_scalable.svg" "${APPDIR}/usr/share/icons/hicolor/scalable/apps/openra-${MOD_ID}.svg" + if [ -f "${ARTWORK_DIR}/${MOD_ID}_scalable.svg" ]; then + install -Dm644 "${ARTWORK_DIR}/${MOD_ID}_scalable.svg" "${APPDIR}/usr/share/icons/hicolor/scalable/apps/openra-${MOD_ID}.svg" fi for i in 16x16 32x32 48x48 64x64 128x128 256x256 512x512 1024x1024; do - if [ -f "icons/${MOD_ID}_${i}.png" ]; then - install -Dm644 "icons/${MOD_ID}_${i}.png" "${APPDIR}/usr/share/icons/hicolor/${i}/apps/openra-${MOD_ID}.png" - install -m644 "icons/${MOD_ID}_${i}.png" "${APPDIR}/openra-${MOD_ID}.png" + if [ -f "${ARTWORK_DIR}/${MOD_ID}_${i}.png" ]; then + install -Dm644 "${ARTWORK_DIR}/${MOD_ID}_${i}.png" "${APPDIR}/usr/share/icons/hicolor/${i}/apps/openra-${MOD_ID}.png" + install -m644 "${ARTWORK_DIR}/${MOD_ID}_${i}.png" "${APPDIR}/openra-${MOD_ID}.png" fi done diff --git a/packaging/macos/buildpackage.sh b/packaging/macos/buildpackage.sh index cad5fe56ed..17b978d547 100755 --- a/packaging/macos/buildpackage.sh +++ b/packaging/macos/buildpackage.sh @@ -44,6 +44,7 @@ TAG="$1" OUTPUTDIR="$2" SRCDIR="$(pwd)/../.." BUILTDIR="$(pwd)/build" +ARTWORK_DIR="$(pwd)/../artwork/" modify_plist() { sed "s|$1|$2|g" "$3" > "$3.tmp" && mv "$3.tmp" "$3" @@ -58,7 +59,18 @@ populate_bundle() { cp -r "${BUILTDIR}/OpenRA.app" "${TEMPLATE_DIR}" # Assemble multi-resolution icon - iconutil --convert icns ${MOD_ID}.iconset -o "${TEMPLATE_DIR}/Contents/Resources/${MOD_ID}.icns" + mkdir "${MOD_ID}.iconset" + cp "${ARTWORK_DIR}/${MOD_ID}_16x16.png" "${MOD_ID}.iconset/icon_16x16.png" + cp "${ARTWORK_DIR}/${MOD_ID}_32x32.png" "${MOD_ID}.iconset/icon_16x16@2.png" + cp "${ARTWORK_DIR}/${MOD_ID}_32x32.png" "${MOD_ID}.iconset/icon_32x32.png" + cp "${ARTWORK_DIR}/${MOD_ID}_64x64.png" "${MOD_ID}.iconset/icon_32x32@2x.png" + cp "${ARTWORK_DIR}/${MOD_ID}_128x128.png" "${MOD_ID}.iconset/icon_128x128.png" + cp "${ARTWORK_DIR}/${MOD_ID}_256x256.png" "${MOD_ID}.iconset/icon_128x128@2x.png" + cp "${ARTWORK_DIR}/${MOD_ID}_256x256.png" "${MOD_ID}.iconset/icon_256x256.png" + cp "${ARTWORK_DIR}/${MOD_ID}_512x512.png" "${MOD_ID}.iconset/icon_256x256@2x.png" + cp "${ARTWORK_DIR}/${MOD_ID}_1024x1024.png" "${MOD_ID}.iconset/icon_512x512@2x.png" + iconutil --convert icns "${MOD_ID}.iconset" -o "${TEMPLATE_DIR}/Contents/Resources/${MOD_ID}.icns" + rm -rf "${MOD_ID}.iconset" # Copy macOS specific files modify_plist "{MOD_ID}" "${MOD_ID}" "${TEMPLATE_DIR}/Contents/Info.plist" @@ -125,7 +137,7 @@ sleep 2 # Background image is created from source svg in artsrc repository mkdir "/Volumes/OpenRA/.background/" -tiffutil -cathidpicheck background.png background-2x.png -out "/Volumes/OpenRA/.background/background.tiff" +tiffutil -cathidpicheck "${ARTWORK_DIR}/macos-background.png" "${ARTWORK_DIR}/macos-background-2x.png" -out "/Volumes/OpenRA/.background/background.tiff" cp "${BUILTDIR}/OpenRA - Red Alert.app/Contents/Resources/ra.icns" "/Volumes/OpenRA/.VolumeIcon.icns" diff --git a/packaging/macos/cnc.iconset/icon_128x128.png b/packaging/macos/cnc.iconset/icon_128x128.png deleted file mode 100644 index 29eee9cfd2..0000000000 Binary files a/packaging/macos/cnc.iconset/icon_128x128.png and /dev/null differ diff --git a/packaging/macos/cnc.iconset/icon_16x16.png b/packaging/macos/cnc.iconset/icon_16x16.png deleted file mode 100644 index 9401b640c5..0000000000 Binary files a/packaging/macos/cnc.iconset/icon_16x16.png and /dev/null differ diff --git a/packaging/macos/cnc.iconset/icon_32x32.png b/packaging/macos/cnc.iconset/icon_32x32.png deleted file mode 100644 index 40e15cf85f..0000000000 Binary files a/packaging/macos/cnc.iconset/icon_32x32.png and /dev/null differ diff --git a/packaging/macos/d2k.iconset/icon_128x128.png b/packaging/macos/d2k.iconset/icon_128x128.png deleted file mode 100644 index caba037258..0000000000 Binary files a/packaging/macos/d2k.iconset/icon_128x128.png and /dev/null differ diff --git a/packaging/macos/d2k.iconset/icon_16x16.png b/packaging/macos/d2k.iconset/icon_16x16.png deleted file mode 100644 index d20ed9339d..0000000000 Binary files a/packaging/macos/d2k.iconset/icon_16x16.png and /dev/null differ diff --git a/packaging/macos/d2k.iconset/icon_32x32.png b/packaging/macos/d2k.iconset/icon_32x32.png deleted file mode 100644 index fcc8e30a56..0000000000 Binary files a/packaging/macos/d2k.iconset/icon_32x32.png and /dev/null differ diff --git a/packaging/macos/ra.iconset/icon_128x128.png b/packaging/macos/ra.iconset/icon_128x128.png deleted file mode 100644 index 5ee4baddf1..0000000000 Binary files a/packaging/macos/ra.iconset/icon_128x128.png and /dev/null differ diff --git a/packaging/macos/ra.iconset/icon_16x16.png b/packaging/macos/ra.iconset/icon_16x16.png deleted file mode 100644 index 2d8191e0f6..0000000000 Binary files a/packaging/macos/ra.iconset/icon_16x16.png and /dev/null differ diff --git a/packaging/macos/ra.iconset/icon_32x32.png b/packaging/macos/ra.iconset/icon_32x32.png deleted file mode 100644 index b399ccb682..0000000000 Binary files a/packaging/macos/ra.iconset/icon_32x32.png and /dev/null differ diff --git a/packaging/windows/Dune2000.ico b/packaging/windows/Dune2000.ico deleted file mode 100644 index 10f2a0dce6..0000000000 Binary files a/packaging/windows/Dune2000.ico and /dev/null differ diff --git a/packaging/windows/OpenRA.ico b/packaging/windows/OpenRA.ico deleted file mode 100644 index 0f65e21d36..0000000000 Binary files a/packaging/windows/OpenRA.ico and /dev/null differ diff --git a/packaging/windows/OpenRA.nsi b/packaging/windows/OpenRA.nsi index 3e69381494..4e3ab64872 100644 --- a/packaging/windows/OpenRA.nsi +++ b/packaging/windows/OpenRA.nsi @@ -77,32 +77,32 @@ Section "-Reg" Reg ; 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}\DefaultIcon" "" "$INSTDIR\ra.ico,0" WriteRegStr HKLM "Software\Classes\openra-ra-${TAG}\Shell\Open\Command" "" "$INSTDIR\RedAlert.exe Launch.URI=%1" WriteRegStr HKLM "Software\Classes\discord-${RA_DISCORDID}" "" "URL:Run game ${RA_DISCORDID} protocol" WriteRegStr HKLM "Software\Classes\discord-${RA_DISCORDID}" "URL Protocol" "" - WriteRegStr HKLM "Software\Classes\discord-${RA_DISCORDID}\DefaultIcon" "" "$INSTDIR\RedAlert.ico,0" + WriteRegStr HKLM "Software\Classes\discord-${RA_DISCORDID}\DefaultIcon" "" "$INSTDIR\ra.ico,0" WriteRegStr HKLM "Software\Classes\discord-${RA_DISCORDID}\Shell\Open\Command" "" "$INSTDIR\RedAlert.exe" 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}\DefaultIcon" "" "$INSTDIR\cnc.ico,0" WriteRegStr HKLM "Software\Classes\openra-cnc-${TAG}\Shell\Open\Command" "" "$INSTDIR\TiberianDawn.exe Launch.URI=%1" WriteRegStr HKLM "Software\Classes\discord-${CNC_DISCORDID}" "" "URL:Run game ${CNC_DISCORDID} protocol" WriteRegStr HKLM "Software\Classes\discord-${CNC_DISCORDID}" "URL Protocol" "" - WriteRegStr HKLM "Software\Classes\discord-${CNC_DISCORDID}\DefaultIcon" "" "$INSTDIR\TiberianDawn.ico,0" + WriteRegStr HKLM "Software\Classes\discord-${CNC_DISCORDID}\DefaultIcon" "" "$INSTDIR\cnc.ico,0" WriteRegStr HKLM "Software\Classes\discord-${CNC_DISCORDID}\Shell\Open\Command" "" "$INSTDIR\TiberianDawn.exe" 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}\DefaultIcon" "" "$INSTDIR\d2k.ico,0" WriteRegStr HKLM "Software\Classes\openra-d2k-${TAG}\Shell\Open\Command" "" "$INSTDIR\Dune2000.exe Launch.URI=%1" WriteRegStr HKLM "Software\Classes\discord-${D2K_DISCORDID}" "" "URL:Run game ${D2K_DISCORDID} protocol" WriteRegStr HKLM "Software\Classes\discord-${D2K_DISCORDID}" "URL Protocol" "" - WriteRegStr HKLM "Software\Classes\discord-${D2K_DISCORDID}\DefaultIcon" "" "$INSTDIR\Dune2000.ico,0" + WriteRegStr HKLM "Software\Classes\discord-${D2K_DISCORDID}\DefaultIcon" "" "$INSTDIR\d2k.ico,0" WriteRegStr HKLM "Software\Classes\discord-${D2K_DISCORDID}\Shell\Open\Command" "" "$INSTDIR\Dune2000.exe" ; Remove obsolete file associations @@ -143,10 +143,9 @@ Section "Game" GAME File "${SRCDIR}\README.html" File "${SRCDIR}\CHANGELOG.html" File "${SRCDIR}\CONTRIBUTING.html" - File "${SRCDIR}\OpenRA.ico" - File "${SRCDIR}\RedAlert.ico" - File "${SRCDIR}\TiberianDawn.ico" - File "${SRCDIR}\Dune2000.ico" + File "${SRCDIR}\ra.ico" + File "${SRCDIR}\cnc.ico" + File "${SRCDIR}\d2k.ico" File "${SRCDIR}\SDL2-CS.dll" File "${SRCDIR}\OpenAL-CS.Core.dll" File "${SRCDIR}\global mix database.dat" @@ -228,7 +227,7 @@ Section "-Uninstaller" WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\OpenRA${SUFFIX}" "UninstallString" "$INSTDIR\uninstaller.exe" WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\OpenRA${SUFFIX}" "QuietUninstallString" "$\"$INSTDIR\uninstaller.exe$\" /S" WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\OpenRA${SUFFIX}" "InstallLocation" "$INSTDIR" - WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\OpenRA${SUFFIX}" "DisplayIcon" "$INSTDIR\OpenRA.ico" + WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\OpenRA${SUFFIX}" "DisplayIcon" "$INSTDIR\ra.ico" WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\OpenRA${SUFFIX}" "Publisher" "OpenRA developers" WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\OpenRA${SUFFIX}" "URLInfoAbout" "http://openra.net" WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\OpenRA${SUFFIX}" "Readme" "$INSTDIR\README.html" @@ -264,10 +263,9 @@ Function ${UN}Clean Delete $INSTDIR\README.html Delete $INSTDIR\CHANGELOG.html Delete $INSTDIR\CONTRIBUTING.html - Delete $INSTDIR\OpenRA.ico - Delete $INSTDIR\RedAlert.ico - Delete $INSTDIR\TiberianDawn.ico - Delete $INSTDIR\Dune2000.ico + Delete $INSTDIR\ra.ico + Delete $INSTDIR\cnc.ico + Delete $INSTDIR\d2k.ico Delete "$INSTDIR\global mix database.dat" Delete $INSTDIR\IP2LOCATION-LITE-DB1.IPV6.BIN.ZIP Delete $INSTDIR\soft_oal.dll diff --git a/packaging/windows/RedAlert.ico b/packaging/windows/RedAlert.ico deleted file mode 100644 index 0f65e21d36..0000000000 Binary files a/packaging/windows/RedAlert.ico and /dev/null differ diff --git a/packaging/windows/TiberianDawn.ico b/packaging/windows/TiberianDawn.ico deleted file mode 100644 index 1712f47328..0000000000 Binary files a/packaging/windows/TiberianDawn.ico and /dev/null differ diff --git a/packaging/windows/buildpackage.sh b/packaging/windows/buildpackage.sh index a8776fceec..a1f48bee55 100755 --- a/packaging/windows/buildpackage.sh +++ b/packaging/windows/buildpackage.sh @@ -3,6 +3,7 @@ command -v curl >/dev/null 2>&1 || { echo >&2 "Windows packaging requires curl."; exit 1; } command -v markdown >/dev/null 2>&1 || { echo >&2 "Windows packaging requires markdown."; exit 1; } command -v makensis >/dev/null 2>&1 || { echo >&2 "Windows packaging requires makensis."; exit 1; } +command -v convert >/dev/null 2>&1 || { echo >&2 "Windows packaging requires ImageMagick."; exit 1; } if [ $# -ne "2" ]; then echo "Usage: $(basename "$0") tag outputdir" @@ -16,6 +17,7 @@ TAG="$1" OUTPUTDIR="$2" SRCDIR="$(pwd)/../.." BUILTDIR="$(pwd)/build" +ARTWORK_DIR="$(pwd)/../artwork/" 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" @@ -29,23 +31,33 @@ fi function makelauncher() { - sed "s|DISPLAY_NAME|$2|" WindowsLauncher.cs.in | sed "s|MOD_ID|$3|" | sed "s|FAQ_URL|${FAQ_URL}|" > WindowsLauncher.cs - csc WindowsLauncher.cs -warn:4 -warnaserror -platform:"$5" -out:"$1" -t:winexe ${LAUNCHER_LIBS} -win32icon:"$4" + LAUNCHER_NAME="${1}" + DISPLAY_NAME="${2}" + MOD_ID="${3}" + PLATFORM="${4}" + + # Create multi-resolution icon + convert "${ARTWORK_DIR}/${MOD_ID}_16x16.png" "${ARTWORK_DIR}/${MOD_ID}_24x24.png" "${ARTWORK_DIR}/${MOD_ID}_32x32.png" "${ARTWORK_DIR}/${MOD_ID}_48x48.png" "${ARTWORK_DIR}/${MOD_ID}_256x256.png" "${BUILTDIR}/${MOD_ID}.ico" + + sed "s|DISPLAY_NAME|${DISPLAY_NAME}|" WindowsLauncher.cs.in | sed "s|MOD_ID|${MOD_ID}|" | sed "s|FAQ_URL|${FAQ_URL}|" > WindowsLauncher.cs + csc WindowsLauncher.cs -warn:4 -warnaserror -platform:"${PLATFORM}" -out:"${BUILTDIR}/${LAUNCHER_NAME}" -t:winexe ${LAUNCHER_LIBS} -win32icon:"${BUILTDIR}/${MOD_ID}.ico" rm WindowsLauncher.cs - if [ "$5" = "x86" ]; then + if [ "${PLATFORM}" = "x86" ]; then # Enable the full 4GB address space for the 32 bit game executable # The server and utility do not use enough memory to need this csc MakeLAA.cs -warn:4 -warnaserror -out:"MakeLAA.exe" - mono "MakeLAA.exe" "$1" + mono "MakeLAA.exe" "${BUILTDIR}/${LAUNCHER_NAME}" rm MakeLAA.exe fi } function build_platform() { - echo "Building core files ($1)" - if [ "$1" = "x86" ]; then + PLATFORM="${1}" + + echo "Building core files (${PLATFORM})" + if [ "${PLATFORM}" = "x86" ]; then TARGETPLATFORM="TARGETPLATFORM=win-x86" IS_WIN32="WIN32=true" USE_PROGRAMFILES32="-DUSE_PROGRAMFILES32=true" @@ -63,13 +75,10 @@ function build_platform() make install-dependencies "${TARGETPLATFORM}" gameinstalldir="" DESTDIR="${BUILTDIR}" popd > /dev/null || exit 1 - echo "Compiling Windows launchers ($1)" - makelauncher "${BUILTDIR}/RedAlert.exe" "Red Alert" "ra" RedAlert.ico $1 - makelauncher "${BUILTDIR}/TiberianDawn.exe" "Tiberian Dawn" "cnc" TiberianDawn.ico $1 - makelauncher "${BUILTDIR}/Dune2000.exe" "Dune 2000" "d2k" Dune2000.ico $1 - - # Windows specific files - cp OpenRA.ico RedAlert.ico TiberianDawn.ico Dune2000.ico "${BUILTDIR}" + echo "Compiling Windows launchers (${PLATFORM})" + makelauncher "RedAlert.exe" "Red Alert" "ra" ${PLATFORM} + makelauncher "TiberianDawn.exe" "Tiberian Dawn" "cnc" ${PLATFORM} + makelauncher "Dune2000.exe" "Dune 2000" "d2k" ${PLATFORM} cp "${SRCDIR}/OpenRA.Game.exe.config" "${BUILTDIR}" curl -s -L -O https://raw.githubusercontent.com/wiki/OpenRA/OpenRA/Changelog.md