diff --git a/packaging/windows/buildpackage.sh b/packaging/windows/buildpackage.sh index 8fc609298..47e53a7c8 100755 --- a/packaging/windows/buildpackage.sh +++ b/packaging/windows/buildpackage.sh @@ -91,6 +91,10 @@ cp -Lr "${TEMPLATE_ROOT}/mods/"* "${BUILTDIR}/mods" cp "mod.ico" "${BUILTDIR}/${MOD_ID}.ico" cp "${SRC_DIR}/OpenRA.Game.exe.config" "${BUILTDIR}" +# 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 "${SRC_DIR}/OpenRA.Game.exe.config" "${BUILTDIR}/${PACKAGING_WINDOWS_LAUNCHER_NAME}.exe.config" + echo "Compiling Windows launcher" sed "s|DISPLAY_NAME|${PACKAGING_DISPLAY_NAME}|" "${SRC_DIR}/packaging/windows/WindowsLauncher.cs.in" | sed "s|MOD_ID|${MOD_ID}|" | sed "s|FAQ_URL|${PACKAGING_FAQ_URL}|" > "${BUILTDIR}/WindowsLauncher.cs" mcs -sdk:4.5 "${BUILTDIR}/WindowsLauncher.cs" -warn:4 -codepage:utf8 -warnaserror -out:"${BUILTDIR}/${PACKAGING_WINDOWS_LAUNCHER_NAME}.exe" -t:winexe ${LAUNCHER_LIBS} -win32icon:"${BUILTDIR}/${MOD_ID}.ico"