Generate platform-specific artwork from common source files.
|
Before Width: | Height: | Size: 323 KiB After Width: | Height: | Size: 323 KiB |
|
Before Width: | Height: | Size: 18 KiB After Width: | Height: | Size: 18 KiB |
|
Before Width: | Height: | Size: 933 B After Width: | Height: | Size: 933 B |
BIN
packaging/artwork/cnc_24x24.png
Normal file
|
After Width: | Height: | Size: 1.6 KiB |
|
Before Width: | Height: | Size: 49 KiB After Width: | Height: | Size: 49 KiB |
|
Before Width: | Height: | Size: 2.5 KiB After Width: | Height: | Size: 2.5 KiB |
|
Before Width: | Height: | Size: 4.6 KiB After Width: | Height: | Size: 4.6 KiB |
|
Before Width: | Height: | Size: 127 KiB After Width: | Height: | Size: 127 KiB |
|
Before Width: | Height: | Size: 7.0 KiB After Width: | Height: | Size: 7.0 KiB |
|
Before Width: | Height: | Size: 11 KiB After Width: | Height: | Size: 11 KiB |
|
Before Width: | Height: | Size: 1.0 MiB After Width: | Height: | Size: 1.0 MiB |
|
Before Width: | Height: | Size: 19 KiB After Width: | Height: | Size: 19 KiB |
|
Before Width: | Height: | Size: 784 B After Width: | Height: | Size: 784 B |
BIN
packaging/artwork/d2k_24x24.png
Normal file
|
After Width: | Height: | Size: 1.3 KiB |
|
Before Width: | Height: | Size: 74 KiB After Width: | Height: | Size: 74 KiB |
|
Before Width: | Height: | Size: 2.1 KiB After Width: | Height: | Size: 2.1 KiB |
|
Before Width: | Height: | Size: 3.8 KiB After Width: | Height: | Size: 3.8 KiB |
|
Before Width: | Height: | Size: 272 KiB After Width: | Height: | Size: 272 KiB |
|
Before Width: | Height: | Size: 6.1 KiB After Width: | Height: | Size: 6.1 KiB |
|
Before Width: | Height: | Size: 119 KiB After Width: | Height: | Size: 119 KiB |
|
Before Width: | Height: | Size: 45 KiB After Width: | Height: | Size: 45 KiB |
|
Before Width: | Height: | Size: 126 KiB After Width: | Height: | Size: 126 KiB |
|
Before Width: | Height: | Size: 16 KiB After Width: | Height: | Size: 16 KiB |
|
Before Width: | Height: | Size: 632 B After Width: | Height: | Size: 632 B |
BIN
packaging/artwork/ra_24x24.png
Normal file
|
After Width: | Height: | Size: 936 B |
|
Before Width: | Height: | Size: 19 KiB After Width: | Height: | Size: 19 KiB |
|
Before Width: | Height: | Size: 1.6 KiB After Width: | Height: | Size: 1.6 KiB |
|
Before Width: | Height: | Size: 3.1 KiB After Width: | Height: | Size: 3.1 KiB |
|
Before Width: | Height: | Size: 48 KiB After Width: | Height: | Size: 48 KiB |
|
Before Width: | Height: | Size: 4.6 KiB After Width: | Height: | Size: 4.6 KiB |
|
Before Width: | Height: | Size: 6.9 KiB After Width: | Height: | Size: 6.9 KiB |
@@ -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
|
||||
|
||||
|
||||
@@ -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"
|
||||
|
||||
|
||||
|
Before Width: | Height: | Size: 19 KiB |
|
Before Width: | Height: | Size: 920 B |
|
Before Width: | Height: | Size: 2.4 KiB |
|
Before Width: | Height: | Size: 22 KiB |
|
Before Width: | Height: | Size: 898 B |
|
Before Width: | Height: | Size: 2.2 KiB |
|
Before Width: | Height: | Size: 8.2 KiB |
|
Before Width: | Height: | Size: 666 B |
|
Before Width: | Height: | Size: 1.5 KiB |
|
Before Width: | Height: | Size: 83 KiB |
|
Before Width: | Height: | Size: 32 KiB |
@@ -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
|
||||
|
||||
|
Before Width: | Height: | Size: 32 KiB |
|
Before Width: | Height: | Size: 60 KiB |
@@ -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
|
||||
|
||||