diff options
| author | Junio C Hamano <gitster@pobox.com> | 2025-05-29 09:03:01 -0700 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2025-05-29 09:03:01 -0700 |
| commit | fcfe60668e05ffde2610bfef9045797618c145ac (patch) | |
| tree | 16afb5b7ca43ab64de02c79363b80515ff259e1d /git-gui/generate-macos-app.sh | |
| parent | 6ab5693aa298f0e3034a1273cf4bf61c31b0e7f0 (diff) | |
| parent | 61f8788fe9d362efb112f69a58cf0510a7e49ee0 (diff) | |
Merge branch 'master' of https://github.com/j6t/git-gui
* 'master' of https://github.com/j6t/git-gui:
git-gui: wire up support for the Meson build system
git-gui: stop including GIT-VERSION-FILE file
git-gui: extract script to generate macOS app
git-gui: extract script to generate macOS wrapper
git-gui: extract script to generate "tclIndex"
git-gui: extract script to generate "git-gui"
git-gui: drop no-op GITGUI_SCRIPT replacement
git-gui: make output of GIT-VERSION-GEN source'able
git-gui: prepare GIT-VERSION-GEN for out-of-tree builds
git-gui: replace GIT-GUI-VARS with GIT-GUI-BUILD-OPTIONS
Diffstat (limited to 'git-gui/generate-macos-app.sh')
| -rwxr-xr-x | git-gui/generate-macos-app.sh | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/git-gui/generate-macos-app.sh b/git-gui/generate-macos-app.sh new file mode 100755 index 0000000000..71b9fa67a4 --- /dev/null +++ b/git-gui/generate-macos-app.sh @@ -0,0 +1,30 @@ +#!/bin/sh + +set -e + +SOURCE_DIR="$1" +OUTPUT="$2" +BUILD_OPTIONS="$3" +VERSION_FILE="$4" + +. "$BUILD_OPTIONS" +. "$VERSION_FILE" + +rm -rf "$OUTPUT" "$OUTPUT+" + +mkdir -p "$OUTPUT+/Contents/MacOS" +mkdir -p "$OUTPUT+/Contents/Resources/Scripts" + +cp "$TKEXECUTABLE" "$OUTPUT+/Contents/MacOS" +cp "$SOURCE_DIR/macosx/git-gui.icns" "$OUTPUT+/Contents/Resources" +sed \ + -e "s/@@GITGUI_VERSION@@/$GITGUI_VERSION/g" \ + -e "s/@@GITGUI_TKEXECUTABLE@@/$(basename "$TKEXECUTABLE")/g" \ + "$SOURCE_DIR/macosx/Info.plist" \ + >"$OUTPUT+/Contents/Info.plist" +sed \ + -e "s|@@gitexecdir@@|$GITGUI_GITEXECDIR|" \ + -e "s|@@GITGUI_LIBDIR@@|$GITGUI_LIBDIR|" \ + "$SOURCE_DIR/macosx/AppMain.tcl" \ + >"$OUTPUT+/Contents/Resources/Scripts/AppMain.tcl" +mv "$OUTPUT+" "$OUTPUT" |
