mirror of https://github.com/lite-xl/lite-xl.git
Browse Source
Cross compiling improvements + macOS universal binary (#1458)
Cross compiling improvements + macOS universal binary (#1458)
* chore(resources): rename macos_arm64.txt to macos-arm64.txt This matches the platform-arch convention like many other parts of the project. * chore(resources/cross): rename wasm.txt to unknown-wasm32.txt * refactor(scripts/common.sh): use parameter expansion instead of if else * feat(scripts/common.sh): support custom arch and platform for get_default_build_dir * feat(scripts/build.sh): add --cross-platform, --cross-arch and --cross-file * feat(scripts/package.sh): add --cross-platform and --cross-arch * feat(build-packages.sh): add support for new options in build.sh and packages.sh * ci(build): make arm64 binaries in CI * ci(build): do not install external libraries * ci(build): fix invalid artifact name * ci(build): fix INSTALL_NAME * ci(build): change name for macos artifacts * ci(build): add script to build universal dmgs from individual dmgs * ci(build): build universal dmgs * fix(make-universal-binaries): fix wrong path for hdiutil * ci(build): rename macos action * fix(make-universal-binaries.sh): fix wrong pathname for ditto * ci(release): build macos universal binaries * ci(release): remove useless variables * ci(release): fix wrong dependency * ci(build): fix old ubuntu version This version will be restored once I complete some container-specific fixes. * ci(build): make build_macos_universal depend on release * ci(build): fix wrong dmg dir * style(ci): capitalize 'universal' for CI name * fix(make-universal-binaries.sh): fix truncated dmg name when it contains dots * ci: styling changes * ci(release): install appdmg onlypull/1440/head

committed by
GitHub

No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
9 changed files with 315 additions and 79 deletions
-
51.github/workflows/build.yml
-
66.github/workflows/release.yml
-
76build-packages.sh
-
0resources/cross/macos-arm64.txt
-
0resources/cross/unknown-wasm32.txt
-
103scripts/build.sh
-
8scripts/common.sh
-
33scripts/make-universal-binaries.sh
-
57scripts/package.sh
@ -0,0 +1,33 @@ |
|||
#!/usr/bin/env bash |
|||
set -ex |
|||
|
|||
if [ ! -e "src/api/api.h" ]; then |
|||
echo "Please run this script from the root directory of Lite XL." |
|||
exit 1 |
|||
fi |
|||
|
|||
WORKDIR="work" |
|||
DMGDIR="$1" |
|||
|
|||
if [[ -z "$DMGDIR" ]]; then |
|||
echo "Please provide a path containing the dmg files." |
|||
exit 1 |
|||
fi |
|||
|
|||
rm -rf "$WORKDIR" |
|||
mkdir -p "$WORKDIR" |
|||
|
|||
for dmg_path in "$DMGDIR"/*.dmg; do |
|||
dmg="${dmg_path##*/}" |
|||
dmg="${dmg%.dmg}" |
|||
hdiutil attach -mountpoint "/Volumes/$dmg" "$dmg_path" |
|||
if [[ ! -d "$WORKDIR/dmg" ]]; then |
|||
ditto "/Volumes/$dmg/Lite XL.app" "Lite XL.app" |
|||
fi |
|||
cp "/Volumes/$dmg/Lite XL.app/Contents/MacOS/lite-xl" "$WORKDIR/$dmg-lite-xl" |
|||
hdiutil detach "/Volumes/$dmg" |
|||
done |
|||
|
|||
lipo -create -output "Lite XL.app/Contents/MacOS/lite-xl" "$WORKDIR/"*-lite-xl |
|||
|
|||
source scripts/appdmg.sh "$2" |
Write
Preview
Loading…
Cancel
Save
Reference in new issue