Skip to content

Commit 4d24032

Browse files
committed
Add workaround for untrusted exes on Windows.
1 parent dc86a69 commit 4d24032

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

packaging/windows/buildpackage.sh

+4
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,10 @@ cp -Lr "${TEMPLATE_ROOT}/mods/"* "${BUILTDIR}/mods"
9191
cp "mod.ico" "${BUILTDIR}/${MOD_ID}.ico"
9292
cp "${SRC_DIR}/OpenRA.Game.exe.config" "${BUILTDIR}"
9393

94+
# We need to set the loadFromRemoteSources flag for the launcher, but only for the "portable" zip package.
95+
# Windows automatically un-trusts executables that are extracted from a downloaded zip file
96+
cp "${SRC_DIR}/OpenRA.Game.exe.config" "${BUILTDIR}/${PACKAGING_WINDOWS_LAUNCHER_NAME}.exe.config"
97+
9498
echo "Compiling Windows launcher"
9599
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"
96100
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"

0 commit comments

Comments
 (0)