aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar mitchell <70453897+orbitalquark@users.noreply.github.com>2022-03-01 17:47:14 -0500
committerGravatar mitchell <70453897+orbitalquark@users.noreply.github.com>2022-03-01 17:47:14 -0500
commit11f694ca3cc308138c4fab8b1f2c069d159a84e8 (patch)
treefc9338ef8034bf6965966c9e403299a5b45909f5
parent4507e0fdbd32200147607967759dd1f5e65fe513 (diff)
Build macOS executables using GTK 3.
Requires my new gtkosx archive. The minimum required macOS is now 10.10 (Yosemite).
-rw-r--r--docs/manual.md4
-rwxr-xr-xscripts/osx/textadept_osx7
-rw-r--r--src/Makefile9
3 files changed, 10 insertions, 10 deletions
diff --git a/docs/manual.md b/docs/manual.md
index 3e042eae..917cca1e 100644
--- a/docs/manual.md
+++ b/docs/manual.md
@@ -161,8 +161,8 @@ version depends only on a wide-character implementation of curses like [ncurses]
Linux and BSD systems either already have these dependencies installed, or they are readily
available from a package manager.
-Windows XP and Mac OSX 10.7 (Lion) are the minimum required operating systems. Linux and BSD
-have no defined minimum.
+Windows XP and Mac OSX 10.10 (Yosemite) are the minimum required operating systems. Linux and
+BSD have no defined minimum.
[GTK]: https://gtk.org
[ncurses]: https://invisible-island.net/ncurses/ncurses.html
diff --git a/scripts/osx/textadept_osx b/scripts/osx/textadept_osx
index 7dd6303d..44943c1e 100755
--- a/scripts/osx/textadept_osx
+++ b/scripts/osx/textadept_osx
@@ -8,9 +8,10 @@ export DYLD_LIBRARY_PATH="$bundle_res/lib"
export GTK_DATA_PREFIX="$bundle_res"
export GTK_EXE_PREFIX="$bundle_res"
export GTK_PATH="$bundle_res"
-export GTK2_RC_FILES="$bundle_res/etc/gtk-2.0/gtkrc"
-export GTK_IM_MODULE_FILE="$bundle_res/etc/gtk-2.0/gtk.immodules"
-export GDK_PIXBUF_MODULE_FILE="$bundle_res/etc/gtk-2.0/gdk-pixbuf.loaders"
+export GTK_IM_MODULE_FILE="$bundle_res/lib/gtk-3.0/3.0.0/gtk.immodules"
+export GDK_PIXBUF_MODULE_FILE="$bundle_res/lib/gdk-pixbuf-2.0/2.10.0/loaders.cache"
+export XDG_DATA_DIRS="$bundle_res/share"
+export XDG_CONFIG_DIRS="$bundle_res/etc"
export PANGO_LIBDIR="$bundle_res/lib"
export PANGO_SYSCONFDIR="$bundle_res/etc"
export CHARSETALIASDIR="$bundle_res/lib"
diff --git a/src/Makefile b/src/Makefile
index 2d269385..f6ac70fe 100644
--- a/src/Makefile
+++ b/src/Makefile
@@ -21,7 +21,7 @@ $(info gtk_flags_win=$(gtk_flags_win))
glib_flags_win := $(shell PKG_CONFIG_PATH=`pwd`/gtkwin/lib/pkgconfig \
pkg-config --define-variable=prefix=gtkwin --cflags glib-2.0)
gtk_flags_osx := $(shell PKG_CONFIG_PATH=`pwd`/gtkosx/lib/pkgconfig \
- pkg-config --define-variable=prefix=gtkosx --cflags gtk+-2.0)
+ pkg-config --define-variable=prefix=gtkosx --cflags gtk+-3.0)
glib_flags_osx := $(shell PKG_CONFIG_PATH=`pwd`/gtkosx/lib/pkgconfig \
pkg-config --define-variable=prefix=gtkosx --cflags glib-2.0)
@@ -291,7 +291,7 @@ $(osx_exes): $(call osx-objs, $(common_objs))
$(osx_exes): CXX := x86_64-apple-darwin17-c++
$(osx_exes): CXXFLAGS += -mdynamic-no-pic -stdlib=libc++ -Wno-register
../textadept-osx: LDFLAGS += $(shell PKG_CONFIG_PATH=`pwd`/gtkosx/lib/pkgconfig \
- pkg-config --define-variable=prefix=gtkosx --libs gtk+-2.0 gmodule-2.0 gtk-mac-integration) \
+ pkg-config --define-variable=prefix=gtkosx --libs gtk+-3.0 gmodule-2.0 gtk-mac-integration) \
-framework Cocoa
$(osx_exes): LDLIBS := -liconv
../textadept-osx-curses: LDLIBS += -lncurses
@@ -409,9 +409,8 @@ $(osx_dir): $(osx_exes)
cp -rL ../docs ../lexers $@/$(osxapp_res)
mv $@/$(osxapp_res)/core/images/textadept.icns $@/$(osxapp_res)
cp -r $(addprefix gtkosx/, etc lib share) $@/$(osxapp_res)
- rm -r $(addprefix $@/$(osxapp_res)/lib/, libffi-3.0.10 libgail* libjpeg* libtiff* pkgconfig)
+ rm -r $(addprefix $@/$(osxapp_res)/lib/, glib-2.0 pkgconfig)
find $@/$(osxapp_res)/lib -type l -delete
- rm -r $(addprefix $@/$(osxapp_res)/lib/gtk-2.0/, include modules 2.10.0/printbackends)
$(osx_dir).zip: $(osx_dir) ; zip -r $<.zip $< && rm -r $<
# External dependencies.
@@ -447,7 +446,7 @@ cdk_tgz := cdk-5.0-20200923.tgz
termkey_tgz := libtermkey-0.20.tar.gz
gtkwin_zip := gtkwin-3.24.31.zip
pdcurses_zip := PDCurses-3.9.zip
-gtkosx_tgz := gtkosx-2.24.31.tar.gz
+gtkosx_tgz := gtkosx-3.24.30.tar.gz
cloc_zip := v1.90.zip
$(scintilla_tgz): ; $(WGET) https://www.scintilla.org/$@