Skip to content

Commit dce996d

Browse files
committed
Update azure scripts for another Apple workaround attempt
1 parent 010d638 commit dce996d

File tree

3 files changed

+18
-2
lines changed

3 files changed

+18
-2
lines changed

DMGScript.sh

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
#!/usr/bin/env bash
2+
3+
# Basic shell script to retry creating DMG as Azure is buggy
4+
# https://github.com/actions/runner-images/issues/7522
5+
for i in {1..10}; do
6+
if /usr/bin/sudo /usr/bin/hdiutil create macbuild.dmg -volname "OpenBVE" -fs HFS+ -srcfolder "mac/OpenBVE.app"; then
7+
echo "Successfully created DMG on attempt $i"
8+
break
9+
elif [[ $i -eq 10 ]]; then
10+
echo "Failed to create DMG after $i attempts"
11+
exit 1
12+
else
13+
echo "Failed to create DMG on attempt $i, retrying"
14+
fi
15+
done

makefile

+2-2
Original file line numberDiff line numberDiff line change
@@ -161,9 +161,9 @@ $(MAC_BUILD_RESULT): all-release
161161
@echo $(COLOR_RED)Copying build data into $(COLOR_CYAN)OpenBVE.app$(COLOR_END)
162162
@cp -r $(RELEASE_DIR)/* mac/OpenBVE.app/Contents/Resources/
163163

164-
# Because Azure is iffy on MacOS13, try creating DMG as root....
164+
# Because Azure is iffy on MacOS13, let's try a custom script
165165
@echo $(COLOR_RED)Creating $(COLOR_CYAN)$(MAC_BUILD_RESULT)$(COLOR_END)
166-
@/usr/bin/sudo /usr/bin/hdiutil create $(MAC_BUILD_RESULT) -volname "OpenBVE" -fs HFS+ -srcfolder "mac/OpenBVE.app"
166+
@./DMGScript.sh
167167
@echo Renaming final output file
168168
ifeq (, $(PROGRAM_VERSION))
169169
@echo This is a $(COLOR_BLUE)Daily build$(COLOR_END)

source/OpenBVE/System/Program.cs

+1
Original file line numberDiff line numberDiff line change
@@ -284,6 +284,7 @@ private static void Main(string[] args) {
284284
SetProcessDPIAware();
285285
}
286286

287+
result.ExperimentalGLMenu = true;
287288
if (result.ExperimentalGLMenu)
288289
{
289290
result.Start = true;

0 commit comments

Comments
 (0)