Thanks. We have a fix for this that we’ll probably sneak into the current 1.4.8 beta:
@AGulev pointed out that this is a different issue. I didn’t notice that you’re on Windows trying to bundle for macOS.
oh, ok. odd.
does this issue exist on linux, too?
i could test it there if you’re not sure.
Well, yes. We only provide the lipo
tool for macOS currently.
Are there any plans to provide it (again?) on Linux? I remember being able to build for OSX. Or is there an alternative way to bundle for OSX that I might have missed
Well, until we have a prebuilt tool to do it, it is difficult.
The code is open source, but a bit hard to build in my experience, which is why we’ve left it “for later”.
If there is a github repo with nice and clean build steps for windows+linux, then that would be great.
You can technically still bundle twice, once for each x86_64-macOS and once for arm64-macOS, however the problem still remains that you likely want the binary to be a universal binary.
Alright, no worries. I’ll use Bob on Github on an OSX runner for the mac builds as an alternative. That should work too I think.
Just wanted to check if I missed something.
Thanks for the reply!
I have found this repository on GitHub (https://github.com/konoui/lipo) which also already has the different lipo
releases. Maybe this can be of any use for us non-mac users.
Looks really promising on first glance! If I can be of any help somehow with this please let me know
Trying to use this in a Github Action since bundling for macos on Windows/Linux is broken currently without it.
- name: Install lipo
run: |
sudo mkdir -p /libexec/x86_64-linux/
curl -L -o /tmp/lipo https://github.com/konoui/lipo/releases/latest/download/lipo_Linux_amd64
chmod +x /tmp/lipo
sudo mv /tmp/lipo /libexec/x86_64-linux/lipo
...
/libexec/x86_64-linux/lipo could not be found locally, create an application manifest to build the engine remotely.
Cause: java.lang.RuntimeException: /libexec/x86_64-linux/lipo could not be found locally, create an application manifest to build the engine remotely.
Bundling...2023-10-06 22:57:38 SEVERE /libexec/x86_64-linux/lipo could not be found locally, create an application manifest to build the engine remotely.
Any idea what’s wrong here?
Here’s current version of the release file, it has macos step commented out and has another issue I don’t understand either.
defold_create_release.zip (1.2 KB)
Going to try adapting this for my needs, for anyone else running into the lipo problem.
“since bundling for macos on Windows/Linux is broken currently”
We’ll, it’s not supported (not broken)
We could add an option specifying the path to lipo.That library seems promising though.
As for your error, I’m wondering if it’s a path, local to bob. It needs to extract tools (into a temp library), and then run it.
I think you’ll have a better chance with putting the executable in the bob.jar directly.
We’ll, it’s not supported (not broken)
It used to work with bob.jar! Now it does not. I’ve made many macOS builds on a Windows devices over the years. The issue must have come with the new chip support?
I think you’ll have a better chance with putting the executable in the bob.jar directly.
I’ll try.
Lipoing on other platforms? For multiple architectures?
Previously we didn’t support multiple architectures. Now we do.
Just like you couldn’t (can’t) lipo iOS on other platforms.
Sure, it might be confusing, but it’s the expected behavior imho, that we as the default behavior try to lipo the binaries.
Still, it’s something we want, and that library looks very promising so I’ll add a ticket for that.
I mean however macOS builds used to work it was possible for us to do it with bob.jar on Windows devices, though we have not made new production builds on projects for macOS in a while and noticed the new issue recently.
Yes, it was an oversight to not realize users were using it on CI systems.
However, I’m not sure what the strategy would have been. Disable it?
Also, it is still possible to bundle twice (just like you have to do for windows), and then manually lipo it.
I changed to putting it in the same dir as bob.jar and still same error.
Cause: java.lang.RuntimeException: /libexec/x86_64-linux/lipo could not be found locally, create an application manifest to build the engine remotely.
I was referring to putting the executable inside bob.jar (it’s a zip file), at the correct location.
You should be able to do something like (untested) zip bob.jar /libexec/x86_64-linux/lipo
.
I added a new ticket for lipo specifically:
That worked!
defold_github_action_make_release.zip (1.3 KB)
name: Bundle and Release Game
on:
push:
branches:
- main # Adjust this to your desired branch if needed
jobs:
bundle_and_release:
runs-on: ubuntu-latest
# runs-on: macos-latest # this is expensive!
steps:
# Check out the repository
- name: Checkout Repository
uses: actions/checkout@v2
# Set up extras
- uses: actions/setup-java@v1
with:
java-version: '17'
- uses: dapetcu21/setup-defold@v3.0.3
- name: Install patched lipo
run: |
mkdir -p temp/libexec/x86_64-linux
curl -L -o temp/libexec/x86_64-linux/lipo https://github.com/konoui/lipo/releases/latest/download/lipo_Linux_amd64
chmod +x temp/libexec/x86_64-linux/lipo
cd temp
zip -r $BOB libexec/x86_64-linux/lipo
cd ..
rm -rf temp
# Extract game title from game.project
- name: Extract Game Title
run: |
title=$(less game.project | grep "^title = " | cut -d "=" -f2 | sed -e 's/^[[:space:]]*//')
title_no_space=$(echo -e "${title}" | tr -d '[[:space:]]')
echo "GAME_TITLE=$title" >> $GITHUB_ENV
echo "GAME_TITLE_NO_SPACE=$title_no_space" >> $GITHUB_ENV
# Define functions and bundle game for each platform
- name: Bundle and Zip Game
run: |
bob() {
java -Xmx4g -jar $BOB $@
}
build() {
platform=$1
rm -rf build
bob --archive clean resolve build --build-report-html "build-report-${platform}.html" --texture-compression true --variant "release" --platform "${platform}" -e a@a.com -u fake_token --with-symbols
}
bundle() {
platform=$1
bob --platform ${platform} --bundle-output build/${platform} bundle
}
do_platform() {
platform=$1
echo -e "\n[Building ${platform}]"
build ${platform}
echo -e "\n[Bundling ${platform}]"
bundle ${platform}
echo -e "\n[Zipping ${platform}]"
zip -r "${GAME_TITLE_NO_SPACE}_${platform}.zip" "build/${platform}/"
}
do_platform x86-win32
do_platform x86_64-linux
do_platform x86_64-macos
# Create a release with a zip of the bundled game files for each platform
- name: Create Release with Bundled Game
run: |
echo "${{ secrets.GITHUB_TOKEN }}" | gh auth login --with-token
gh release create "${GAME_TITLE_NO_SPACE}-$(date +%Y%m%d)" \
"${GAME_TITLE_NO_SPACE}_x86-win32.zip" \
"${GAME_TITLE_NO_SPACE}_x86_64-linux.zip" \
"${GAME_TITLE_NO_SPACE}_x86_64-macos.zip" \
--title "${GAME_TITLE} Release" \
--notes "Automatic release of ${GAME_TITLE}."
- name: Done
run: echo "[All Done!! - You can now check the release.]"
I added the new lipo tool to the latest beta, and it should work on all platforms (Defold 1.6.1 BETA)