Replace gtk-mac-bundler with abcreate (467892d2) · Commits · René de Hesselle / rnote_macos · GitLab
René de Hesselle
·
2025-11-03
·
via rnote_macos:v0.14.0+227 commits
| Original line number |
Diff line number |
Diff line |
|
@@ -30,10 +30,6 @@ if $CI; then # break in CI, otherwise we get interactive prompt by JHBuild |
|
|
error_trace_enable
|
|
|
fi
|
|
|
|
|
|
#-------------------------------------------- install application bundle creator
|
|
|
|
|
|
jhb build gtkmacbundler
|
|
|
|
|
|
#------------------------------------------------------------- create disk image
|
|
|
|
|
|
jhb build imagemagick # used to create dmg background |
| Original line number |
Diff line number |
Diff line |
|
@@ -18,7 +18,7 @@ source "$(dirname "${BASH_SOURCE[0]}")"/jhb/etc/jhb.conf.sh |
|
|
|
|
|
### variables ##################################################################
|
|
|
|
|
|
# Nothing here.
|
|
|
SELF_DIR=$(dirname "$(greadlink -f "$0")")
|
|
|
|
|
|
### functions ##################################################################
|
|
|
|
|
@@ -40,6 +40,11 @@ fi |
|
|
git -C "$RNOTE_SRC_DIR" checkout "$RNOTE_VERSION"
|
|
|
git -C "$RNOTE_SRC_DIR" submodule update --init --recursive
|
|
|
|
|
|
(
|
|
|
cd "$RNOTE_SRC_DIR" || return
|
|
|
patch -p1 < "$SELF_DIR"/resources/rnote_bundle.patch
|
|
|
)
|
|
|
|
|
|
# add build number to Rnote version
|
|
|
gsed -i "s/\(patch\ = '[^']*\)/\1 ($RNOTE_BUILD)/" "$RNOTE_SRC_DIR"/meson.build
|
|
|
|
|
|
| Original line number |
Diff line number |
Diff line |
|
@@ -34,29 +34,14 @@ svg2icns \ |
|
|
"$RNOTE_SRC_DIR"/crates/rnote-ui/data/icons/scalable/apps/rnote-devel.svg \
|
|
|
"$TMP_DIR"/Rnote.icns
|
|
|
|
|
|
#----------------------------------------------------- create application bundle
|
|
|
|
|
|
(
|
|
|
cd "$SELF_DIR" || exit 1
|
|
|
export ART_DIR # is referenced in rnote.bundle
|
|
|
cp "$SELF_DIR"/resources/rnote_document.icns "$TMP_DIR"
|
|
|
|
|
|
jhb run gtk-mac-bundler resources/rnote.bundle
|
|
|
)
|
|
|
|
|
|
lib_change_path @executable_path/../Resources/lib/libpoppler.139.dylib \
|
|
|
"$RNOTE_APP_CON_DIR"/MacOS/Rnote
|
|
|
lib_change_path @executable_path/../Resources/lib/libpoppler-glib.8.dylib \
|
|
|
"$RNOTE_APP_CON_DIR"/MacOS/Rnote
|
|
|
#----------------------------------------------------- create application bundle
|
|
|
|
|
|
# Libraries in RNOTE_APP_LIB_DIR can reference each other directly.
|
|
|
lib_change_siblings "$RNOTE_APP_LIB_DIR"
|
|
|
cp "$SELF_DIR"/resources/rnote.plist "$TMP_DIR"
|
|
|
|
|
|
# Adjust library paths for other binaries.
|
|
|
lib_change_paths @executable_path/../Resources/lib "$RNOTE_APP_LIB_DIR" \
|
|
|
"$RNOTE_APP_CON_DIR/MacOS/rnote-cli \
|
|
|
$RNOTE_APP_CON_DIR/MacOS/gtk4-demo \
|
|
|
$RNOTE_APP_CON_DIR/MacOS/adwaita-1-demo \
|
|
|
"
|
|
|
abcreate create -i "$VER_DIR" -o "$ART_DIR" \
|
|
|
"$SELF_DIR"/resources/applicationbundle.xml
|
|
|
|
|
|
#------------------------------------------------------------- update Info.plist
|
|
|
|
|
@@ -97,16 +82,6 @@ $(date +%Y) Felix Zwettler'" "$RNOTE_APP_PLIST" |
|
|
/usr/libexec/PlistBuddy -c "Add NSRemoveableVolumesUsageDescription string \
|
|
|
'Rnote needs your permission to access removeable volumes.'" "$RNOTE_APP_PLIST"
|
|
|
|
|
|
# add supported languages
|
|
|
/usr/libexec/PlistBuddy -c "Add CFBundleLocalizations array" \
|
|
|
"$RNOTE_APP_PLIST"
|
|
|
/usr/libexec/PlistBuddy -c "Add CFBundleLocalizations: string 'en'" \
|
|
|
"$RNOTE_APP_PLIST" # because there is no en.po file
|
|
|
for locale in "$RNOTE_SRC_DIR"/crates/rnote-ui/po/*.po; do
|
|
|
/usr/libexec/PlistBuddy -c "Add CFBundleLocalizations: string \
|
|
|
'$(basename -s .po "$locale")'" "$RNOTE_APP_PLIST"
|
|
|
done
|
|
|
|
|
|
# add additional font directory for bundled fonts
|
|
|
/usr/libexec/PlistBuddy -c "Add ATSApplicationFontsPath string \
|
|
|
'share/rnote/fonts/'" "$RNOTE_APP_PLIST"
|
|
|
| Original line number |
Diff line number |
Diff line |
|
|
--- a/configure 2020-11-29 14:24:17.000000000 +0100
|
|
|
+++ b/configure 2020-11-29 14:21:40.000000000 +0100
|
|
|
@@ -0,0 +1,21 @@
|
|
|
+#!/usr/bin/env bash
|
|
|
+
|
|
|
+# This mocks a configure script to provide an interface for JHBuild.
|
|
|
+# We're only interested in the prefix so we can patch the Makefile.
|
|
|
+
|
|
|
+while [ "$#" -gt 0 ]; do
|
|
|
+ case $1 in
|
|
|
+ --prefix=*) PREFIX=${1:9}; break ;;
|
|
|
+ *) echo "ignoring parameter: $1" ;;
|
|
|
+ esac
|
|
|
+ shift
|
|
|
+done
|
|
|
+
|
|
|
+if [ -z $PREFIX ]; then
|
|
|
+ echo "--prefix=* argument not found"
|
|
|
+ exit 1
|
|
|
+else
|
|
|
+ sed -i "" "/bindir=/a\\
|
|
|
+ bindir=$PREFIX\/bin\\
|
|
|
+ " Makefile
|
|
|
+fi |
| Original line number |
Diff line number |
Diff line |
|
@@ -79,29 +79,6 @@ |
|
|
<dep package="glib" />
|
|
|
</dependencies>
|
|
|
</meson>
|
|
|
<!--
|
|
|
GTK Mac Bundler https://gitlab.gnome.org/GNOME/gtk-mac-bundler
|
|
|
-->
|
|
|
<autotools id="gtkmacbundler"
|
|
|
autogen-sh="configure"
|
|
|
makeargs="&& make install"
|
|
|
skip-install="yes"
|
|
|
supports-non-srcdir-builds="no">
|
|
|
<branch module="gtk-mac-bundler/-/archive/90443a1d/gtk-mac-bundler-90443a1d.tar.bz2"
|
|
|
version="90443a1d"
|
|
|
hash="sha256:447146bacc3428f1336da88bd1a297d78fc2f4382494d22d29709fe38344e0a9"
|
|
|
checkoutdir="gtk-mac-bundler-90443a1d"
|
|
|
rename-tarball="gtk-mac-bundler-90443a1d.tar.bz2"
|
|
|
repo="gnome_gitlab">
|
|
|
<!--
|
|
|
Mocks autotools interface to the extent that it provides a
|
|
|
"configure". (But the "make install" is still broken and needs to
|
|
|
be skipped.)
|
|
|
-->
|
|
|
<patch file="gtk-mac-bundler_autotools.patch"
|
|
|
strip="1" />
|
|
|
</branch>
|
|
|
</autotools>
|
|
|
<!--
|
|
|
ImageMagick https://imagemagick.org
|
|
|
-->
|
|
|
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。