diff --git a/packaging/.itch.toml b/packaging/.itch.toml new file mode 100644 index 0000000000..281a87515b --- /dev/null +++ b/packaging/.itch.toml @@ -0,0 +1,17 @@ +[[prereqs]] +name = "net-4.7.2" + +[[actions]] +os = "windows" +name = "Red Alert" +path = "RedAlert.exe" + +[[actions]] +os = "windows" +name = "Dune 2000" +path = "Dune2000.exe" + +[[actions]] +os = "windows" +name = "Tiberian Dawn" +path = "TiberianDawn.exe" diff --git a/packaging/upload-itch.sh b/packaging/upload-itch.sh index ca8afdaeb2..4c9b274abf 100755 --- a/packaging/upload-itch.sh +++ b/packaging/upload-itch.sh @@ -29,10 +29,12 @@ chmod +x butler ./butler -V ./butler login -./butler push "${BUILD_OUTPUT_DIR}/OpenRA-${GIT_TAG}-x64.exe" "openra/openra:win" --userversion-file ../VERSION +cp ${BUILD_OUTPUT_DIR}/OpenRA-${GIT_TAG}-x64-winportable.zip OpenRA-${GIT_TAG}-x64-win-itch-portable.zip +zip -u OpenRA-${GIT_TAG}-x64-win-itch-portable.zip .itch.toml +./butler push "OpenRA-${GIT_TAG}-x64-win-itch-portable.zip" "openra/openra:win" --userversion-file ../VERSION ./butler push --fix-permissions "${BUILD_OUTPUT_DIR}/OpenRA-${GIT_TAG}.dmg" "openra/openra:osx" --userversion-file ../VERSION ./butler push --fix-permissions "${BUILD_OUTPUT_DIR}/OpenRA-Dune-2000-x86_64.AppImage" "openra/openra:linux-d2k" --userversion-file ../VERSION ./butler push --fix-permissions "${BUILD_OUTPUT_DIR}/OpenRA-Red-Alert-x86_64.AppImage" "openra/openra:linux-ra" --userversion-file ../VERSION ./butler push --fix-permissions "${BUILD_OUTPUT_DIR}/OpenRA-Tiberian-Dawn-x86_64.AppImage" "openra/openra:linux-td" --userversion-file ../VERSION -rm butler butler-linux-amd64.zip +rm butler butler-linux-amd64.zip 7z.so libc7zip.so diff --git a/packaging/windows/buildpackage.sh b/packaging/windows/buildpackage.sh index c9d7cfd4a7..894b5bb9c4 100755 --- a/packaging/windows/buildpackage.sh +++ b/packaging/windows/buildpackage.sh @@ -42,6 +42,10 @@ function makelauncher() csc WindowsLauncher.cs -warn:4 -warnaserror -platform:"${PLATFORM}" -out:"${BUILTDIR}/${LAUNCHER_NAME}" -t:winexe ${LAUNCHER_LIBS} -win32icon:"${BUILTDIR}/${MOD_ID}.ico" rm WindowsLauncher.cs + # We need to set the loadFromRemoteSources flag for the launcher, but only for the "portable" zip package. + # Windows automatically un-trusts executables that are extracted from a downloaded zip file + cp "${BUILTDIR}/OpenRA.Game.exe.config" "${BUILTDIR}/${LAUNCHER_NAME}.config" + 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 @@ -76,11 +80,12 @@ function build_platform() make install-dependencies "${TARGETPLATFORM}" gameinstalldir="" DESTDIR="${BUILTDIR}" popd > /dev/null || exit 1 + cp "${SRCDIR}/OpenRA.Game.exe.config" "${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}" echo "Building Windows setup.exe ($1)" makensis -V2 -DSRCDIR="${BUILTDIR}" -DTAG="${TAG}" -DSUFFIX="${SUFFIX}" ${USE_PROGRAMFILES32} OpenRA.nsi @@ -90,6 +95,12 @@ function build_platform() exit 1 fi + echo "Packaging zip archive ($1)" + pushd "${BUILTDIR}" > /dev/null + zip "OpenRA-${TAG}-${1}-winportable.zip" -r -9 * --quiet + mv "OpenRA-${TAG}-${1}-winportable.zip" "${OUTPUTDIR}" + popd > /dev/null + rm -rf "${BUILTDIR}" }