Skip to content

Commit

Permalink
packaging fix
Browse files Browse the repository at this point in the history
  • Loading branch information
ottelo9 committed Oct 23, 2024
1 parent b505fba commit 8063070
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 6 deletions.
3 changes: 2 additions & 1 deletion packaging/functions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,8 @@ install_data() (
if [ "${MOD_ID}" = "ra" ] || [ "${MOD_ID}" = "cnc" ] || [ "${MOD_ID}" = "d2k" ]; then
echo "Installing mod ${MOD_ID} to ${DEST_PATH}"
cp -r "${SRC_PATH}/mods/${MOD_ID}" "${DEST_PATH}/mods/"
cp -r "${SRC_PATH}/mods/modcontent" "${DEST_PATH}/mods/"
cp -r "${SRC_PATH}/mods/common-content" "${DEST_PATH}/mods/"
cp -r "${SRC_PATH}/mods/${MOD_ID}-content" "${DEST_PATH}/mods/"
fi

shift
Expand Down
2 changes: 1 addition & 1 deletion packaging/linux/buildpackage.sh
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ build_appimage() {
install_assemblies "${SRCDIR}" "${APPDIR}/usr/lib/openra" "linux-x64" "net6" "True" "True" "${IS_D2K}"
install_data "${SRCDIR}" "${APPDIR}/usr/lib/openra" "${MOD_ID}"
set_engine_version "${TAG}" "${APPDIR}/usr/lib/openra"
set_mod_version "${TAG}" "${APPDIR}/usr/lib/openra/mods/${MOD_ID}/mod.yaml" "${APPDIR}/usr/lib/openra/mods/modcontent/mod.yaml"
set_mod_version "${TAG}" "${APPDIR}/usr/lib/openra/mods/${MOD_ID}/mod.yaml" "${APPDIR}/usr/lib/openra/mods/${MOD_ID}-content/mod.yaml"

# Add launcher and icons
sed "s/{MODID}/${MOD_ID}/g" AppRun.in | sed "s/{MODNAME}/${DISPLAY_NAME}/g" > "${APPDIR}/AppRun"
Expand Down
8 changes: 6 additions & 2 deletions packaging/macos/buildpackage.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
# Generate using `base64 certificate.p12 | pbcopy`
# MACOS_DEVELOPER_CERTIFICATE_PASSWORD: password to unlock the MACOS_DEVELOPER_CERTIFICATE_BASE64 certificate
#
# The applicaton bundles will be notarized if the following environment variables are defined:
# The application bundles will be notarized if the following environment variables are defined:
# MACOS_DEVELOPER_USERNAME: Email address for the developer account
# MACOS_DEVELOPER_PASSWORD: App-specific password for the developer account
#
Expand Down Expand Up @@ -81,7 +81,7 @@ build_app() {

install_data "${SRCDIR}" "${LAUNCHER_RESOURCES_DIR}" "${MOD_ID}"
set_engine_version "${TAG}" "${LAUNCHER_RESOURCES_DIR}"
set_mod_version "${TAG}" "${LAUNCHER_RESOURCES_DIR}/mods/${MOD_ID}/mod.yaml" "${LAUNCHER_RESOURCES_DIR}/mods/modcontent/mod.yaml"
set_mod_version "${TAG}" "${LAUNCHER_RESOURCES_DIR}/mods/${MOD_ID}/mod.yaml" "${LAUNCHER_RESOURCES_DIR}/mods/${MOD_ID}-content/mod.yaml"

# Assemble multi-resolution icon
mkdir "${MOD_ID}.iconset"
Expand Down Expand Up @@ -149,6 +149,10 @@ build_app "${TEMPLATE_DIR}" "${BUILTDIR}/OpenRA - Dune 2000.app" "d2k" "Dune 200
rm -rf "${TEMPLATE_DIR}"

echo "Packaging disk image"
if hdiutil info | grep -q "/Volumes/OpenRA"; then
echo "Some process is stealing our resources! /Volumes/OpenRA is already mounted!"
fi

hdiutil create "build.dmg" -format UDRW -volname "OpenRA" -fs HFS+ -srcfolder build
DMG_DEVICE=$(hdiutil attach -readwrite -noverify -noautoopen "build.dmg" | egrep '^/dev/' | sed 1q | awk '{print $1}')
sleep 2
Expand Down
5 changes: 4 additions & 1 deletion packaging/windows/OpenRA.nsi
Original file line number Diff line number Diff line change
Expand Up @@ -122,10 +122,13 @@ Section "Game" GAME
RMDir /r "$INSTDIR\mods"
SetOutPath "$INSTDIR\mods"
File /r "${SRCDIR}\mods\common"
File /r "${SRCDIR}\mods\common-content"
File /r "${SRCDIR}\mods\cnc"
File /r "${SRCDIR}\mods\cnc-content"
File /r "${SRCDIR}\mods\d2k"
File /r "${SRCDIR}\mods\d2k-content"
File /r "${SRCDIR}\mods\ra"
File /r "${SRCDIR}\mods\modcontent"
File /r "${SRCDIR}\mods\ra-content"

SetOutPath "$INSTDIR"
File "${SRCDIR}\*.exe"
Expand Down
2 changes: 1 addition & 1 deletion packaging/windows/buildpackage.sh
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ function build_platform()
install_assemblies "${SRCDIR}" "${BUILTDIR}" "win-${PLATFORM}" "net6" "False" "True" "True"
install_data "${SRCDIR}" "${BUILTDIR}" "cnc" "d2k" "ra"
set_engine_version "${TAG}" "${BUILTDIR}"
set_mod_version "${TAG}" "${BUILTDIR}/mods/cnc/mod.yaml" "${BUILTDIR}/mods/d2k/mod.yaml" "${BUILTDIR}/mods/ra/mod.yaml" "${BUILTDIR}/mods/modcontent/mod.yaml"
set_mod_version "${TAG}" "${BUILTDIR}/mods/cnc/mod.yaml" "${BUILTDIR}/mods/d2k/mod.yaml" "${BUILTDIR}/mods/ra/mod.yaml" "${BUILTDIR}/mods/cnc-content/mod.yaml" "${BUILTDIR}/mods/d2k-content/mod.yaml" "${BUILTDIR}/mods/ra-content/mod.yaml"

echo "Compiling Windows launchers (${PLATFORM})"
makelauncher "RedAlert" "Red Alert" "ra" "${PLATFORM}"
Expand Down

0 comments on commit 8063070

Please sign in to comment.