From 875dbf54534fe4a4dc2cf0bb87a635bc83c48422 Mon Sep 17 00:00:00 2001 From: Michael Date: Thu, 28 May 2026 16:01:59 +0200 Subject: [PATCH 01/20] Create mac-build-intel.sh How to build App on macOS with intel chip. App does work, but DMG not. --- mac-build-intel.sh | 102 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 102 insertions(+) create mode 100644 mac-build-intel.sh diff --git a/mac-build-intel.sh b/mac-build-intel.sh new file mode 100644 index 000000000..d89d9c380 --- /dev/null +++ b/mac-build-intel.sh @@ -0,0 +1,102 @@ +#!/bin/bash +## -- mac-build-intel.sh +## status: works +## +## History +## 2026-05may-28, seems to work for build .app but not app within .dmg. +## - The generated App WITHIN DMG is BAD and will not work. Does nothing. App does not show, but seems to use CPU forever. +## (But the created .app outside the DMG will work) +## +## Instructions +## 1. install brew (Homebrew) on your macOS and the following packages: +## % brew install gtk+3 +## % brew install gtksourceview3 +## % brew install xetex +## % npm install -g appdmg +## +## 2. for some reason a font is hard coded, so install it: +## https://fonts.google.com/specimen/Source+Code+Pro +## Just double click on all font files within macOS Finder to install fonts +## +## 3. follow the instructions here +## + + +echo "mac-build-intel.ch -- Build App for Intel based Macs." +echo "NOTE: This is NOT an automated script!" +echo "Instead you need to do copy past manually to your command line terminal and patch some code manually." +exit + + +## -- get source code from github + +git clone --depth=1 https://github.com/sillsdev/ptx2pdf.git + +cd ptx2pdf + + +## -- prepare for build +## add your Apple Code Sign identity here: +export NOTARIZATION_CODESIGN_IDENTITY="1234567890" + + +## -- find out where you have your homebrew (brew) installed +export HOMEBREW_PREFIX=`brew config | grep HOMEBREW_PREFIX | cut -f2 -d: | awk '{$1=$1};1'` +## /usr/local +echo "-- your HOMEBREW_PREFIX is:" +echo "$HOMEBREW_PREFIX" + + +## -- the following lines are taken from https://github.com/sillsdev/ptx2pdf/mac-build.sh +python3 -m venv --system-site-packages _venv +source _venv/bin/activate +pip3 install -e . +pip3 install pyinstaller + + + + +## -- patch source code + +## -- make sure you use Gtk 3 else your app will crash later + +## main.py add on top: +## import gi +## gi.require_version('Gtk', '3.0') + + +## [PYI-14051:ERROR] Failed to execute script 'ptxprint' due to unhandled exception: gtk-builder-error-quark: .:15738:56 Invalid object type 'GtkSourceBuffer' (6) +## gtkview.py add about on top: +## gi.require_version('GtkSource', '3.0') +## gi.require_version('Gtk', '3.0') + + + + +## -- build + +## -- the following command will compile the .app and .dmg +## -- if you need to re-compile things, just call this line and do the patch below again +pyinstaller ptxprint.spec -y + + + + +## -- patch fix the app binary within ./dist so that it can find xetex + +echo "fix the app so that if finds xetex" +mkdir -p ./dist/PTXprint.app/Contents/Frameworks/ptxprint/xetex/bin/darwin_x86_64/ +ln -s /usr/local/bin/fc-list ./dist/PTXprint.app/Contents/Frameworks/ptxprint/xetex/bin/darwin_x86_64 +ln -s /Library/TeX/texbin/xetex ./dist/PTXprint.app/Contents/Frameworks/ptxprint/xetex/bin/darwin_x86_64 +ln -s /Library/TeX/texbin/xdvipdfmx ./dist/PTXprint.app/Contents/Frameworks/ptxprint/xetex/bin/darwin_x86_64 + + +## -- run app from command line +echo "Run app with ./dist/PTXprint.app/Contents/MacOS/PTXprint-app" +echo "Or just double click PTXprint-app.app within macOS Finder as usual." +echo "You can copy PTXprint-app.app in /Applications folder." + + + + +## EOF. From 8ceefecd85b9733665fdf332cb21861e1ed33931 Mon Sep 17 00:00:00 2001 From: Michael Date: Thu, 28 May 2026 16:14:21 +0200 Subject: [PATCH 02/20] Create mac-build-intel.md --- docs/dev/mac-build-intel.md | 119 ++++++++++++++++++++++++++++++++++++ 1 file changed, 119 insertions(+) create mode 100644 docs/dev/mac-build-intel.md diff --git a/docs/dev/mac-build-intel.md b/docs/dev/mac-build-intel.md new file mode 100644 index 000000000..4b00944fb --- /dev/null +++ b/docs/dev/mac-build-intel.md @@ -0,0 +1,119 @@ +# How to compile and run PTXprint on macOS for macOS with Intel chips + +Date: 2026-05may-28 + +## Ideas for future versions + +- Maybe there should be a Settings > TeTeX path input box where user can setup which TeTeX will be used. + +## Instructions + +- Just follow the instructions in the script below. + +## Issues +- The created .app within the DMG does not work (but the .app outside the dmg does work) + +``` +#!/bin/bash +## -- mac-build-intel.sh +## status: works +## +## History +## 2026-05may-28, seems to work for build .app but not app within .dmg. +## - The generated App WITHIN DMG is BAD and will not work. Does nothing. App does not show, but seems to use CPU forever. +## (But the created .app outside the DMG will work) +## +## Instructions +## 1. install brew (Homebrew) on your macOS and the following packages: +## % brew install gtk+3 +## % brew install gtksourceview3 +## % brew install xetex +## % npm install -g appdmg +## +## 2. for some reason a font is hard coded, so install it: +## https://fonts.google.com/specimen/Source+Code+Pro +## Just double click on all font files within macOS Finder to install fonts +## +## 3. follow the instructions here +## + + +echo "mac-build-intel.ch -- Build App for Intel based Macs." +echo "NOTE: This is NOT an automated script!" +echo "Instead you need to do copy past manually to your command line terminal and patch some code manually." +exit + + +## -- get source code from github + +git clone --depth=1 https://github.com/sillsdev/ptx2pdf.git + +cd ptx2pdf + + +## -- prepare for build +## add your Apple Code Sign identity here: +export NOTARIZATION_CODESIGN_IDENTITY="1234567890" + + +## -- find out where you have your homebrew (brew) installed +export HOMEBREW_PREFIX=`brew config | grep HOMEBREW_PREFIX | cut -f2 -d: | awk '{$1=$1};1'` +## /usr/local +echo "-- your HOMEBREW_PREFIX is:" +echo "$HOMEBREW_PREFIX" + + +## -- the following lines are taken from https://github.com/sillsdev/ptx2pdf/mac-build.sh +python3 -m venv --system-site-packages _venv +source _venv/bin/activate +pip3 install -e . +pip3 install pyinstaller + + + + +## -- patch source code + +## -- make sure you use Gtk 3 else your app will crash later + +## main.py add on top: +## import gi +## gi.require_version('Gtk', '3.0') + + +## [PYI-14051:ERROR] Failed to execute script 'ptxprint' due to unhandled exception: gtk-builder-error-quark: .:15738:56 Invalid object type 'GtkSourceBuffer' (6) +## gtkview.py add about on top: +## gi.require_version('GtkSource', '3.0') +## gi.require_version('Gtk', '3.0') + + + + +## -- build + +## -- the following command will compile the .app and .dmg +## -- if you need to re-compile things, just call this line and do the patch below again +pyinstaller ptxprint.spec -y + + + + +## -- patch fix the app binary within ./dist so that it can find xetex + +echo "fix the app so that if finds xetex" +mkdir -p ./dist/PTXprint.app/Contents/Frameworks/ptxprint/xetex/bin/darwin_x86_64/ +ln -s /usr/local/bin/fc-list ./dist/PTXprint.app/Contents/Frameworks/ptxprint/xetex/bin/darwin_x86_64 +ln -s /Library/TeX/texbin/xetex ./dist/PTXprint.app/Contents/Frameworks/ptxprint/xetex/bin/darwin_x86_64 +ln -s /Library/TeX/texbin/xdvipdfmx ./dist/PTXprint.app/Contents/Frameworks/ptxprint/xetex/bin/darwin_x86_64 + + +## -- run app from command line +echo "Run app with ./dist/PTXprint.app/Contents/MacOS/PTXprint-app" +echo "Or just double click PTXprint-app.app within macOS Finder as usual." +echo "You can copy PTXprint-app.app in /Applications folder." + + + + +## EOF. +``` From 897fd99292e4a60185353651ccf43920e3d275ed Mon Sep 17 00:00:00 2001 From: Michael Date: Thu, 28 May 2026 16:36:29 +0200 Subject: [PATCH 03/20] Create readme.md --- distribution/readme.md | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 distribution/readme.md diff --git a/distribution/readme.md b/distribution/readme.md new file mode 100644 index 000000000..1ede38d31 --- /dev/null +++ b/distribution/readme.md @@ -0,0 +1,4 @@ +# Distribution + +## macOS App (Intel chip only) +- 2026-05may-28, https://www.flagsoft.com/public/ptxprint/2026-05may-28/PTXprint.zip From b40ba4ee1f6108aa7261025143c51f8d39aab338 Mon Sep 17 00:00:00 2001 From: Michael Date: Thu, 28 May 2026 16:39:12 +0200 Subject: [PATCH 04/20] Update readme.md --- distribution/readme.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/distribution/readme.md b/distribution/readme.md index 1ede38d31..5a89e7443 100644 --- a/distribution/readme.md +++ b/distribution/readme.md @@ -1,4 +1,5 @@ # Distribution ## macOS App (Intel chip only) -- 2026-05may-28, https://www.flagsoft.com/public/ptxprint/2026-05may-28/PTXprint.zip + +- 2026-05may-28, Version 3.0.30, https://www.flagsoft.com/public/ptxprint/2026-05may-28/PTXprint.zip From 2d42fdcdce6726455fd74d3612e6747b96ba9dde Mon Sep 17 00:00:00 2001 From: Michael Date: Thu, 28 May 2026 16:47:26 +0200 Subject: [PATCH 05/20] Update readme.md --- distribution/readme.md | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/distribution/readme.md b/distribution/readme.md index 5a89e7443..dd624f30e 100644 --- a/distribution/readme.md +++ b/distribution/readme.md @@ -2,4 +2,15 @@ ## macOS App (Intel chip only) +Important NOTE: When an application gets downloaded from any source other than those that Apple seems suited, the application gets an extended attribute "com.apple.Quarantine". +This triggers the message: " is damaged and can't be opened. You should move it to the Bin." + +Remove the attribute and you can launch the application. + +So after download: open a console and type: +``` +$ xattr -c +``` +After that you can run the App as usual. + - 2026-05may-28, Version 3.0.30, https://www.flagsoft.com/public/ptxprint/2026-05may-28/PTXprint.zip From 6ed15532dbe2ae3e5f10a800b63e7a25df7f6f49 Mon Sep 17 00:00:00 2001 From: Michael Date: Thu, 28 May 2026 16:48:21 +0200 Subject: [PATCH 06/20] Update readme.md --- distribution/readme.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/distribution/readme.md b/distribution/readme.md index dd624f30e..364885819 100644 --- a/distribution/readme.md +++ b/distribution/readme.md @@ -3,7 +3,7 @@ ## macOS App (Intel chip only) Important NOTE: When an application gets downloaded from any source other than those that Apple seems suited, the application gets an extended attribute "com.apple.Quarantine". -This triggers the message: " is damaged and can't be opened. You should move it to the Bin." +This triggers the message: "application XY is damaged and can't be opened. You should move it to the Bin." Remove the attribute and you can launch the application. From ee6839b295067ee8a04580e9550db2ae7c0f8d4c Mon Sep 17 00:00:00 2001 From: Michael Date: Thu, 28 May 2026 16:58:30 +0200 Subject: [PATCH 07/20] Update readme.md --- distribution/readme.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/distribution/readme.md b/distribution/readme.md index 364885819..762b075cd 100644 --- a/distribution/readme.md +++ b/distribution/readme.md @@ -1,5 +1,11 @@ # Distribution +This is an non-official distribution of PTXprint for macOS with Intel(TM) chips. + +02-layout + + + ## macOS App (Intel chip only) Important NOTE: When an application gets downloaded from any source other than those that Apple seems suited, the application gets an extended attribute "com.apple.Quarantine". @@ -14,3 +20,5 @@ $ xattr -c After that you can run the App as usual. - 2026-05may-28, Version 3.0.30, https://www.flagsoft.com/public/ptxprint/2026-05may-28/PTXprint.zip + +sha256sum of ZIP file: 19f6129608b88e5a1343d93c94d4480c10a37863592cc7e578c450deeba4bda4 From 292c9a60a9120ce6e888092cd7c17a6cd754cccd Mon Sep 17 00:00:00 2001 From: Michael Date: Thu, 28 May 2026 17:01:56 +0200 Subject: [PATCH 08/20] Update mac-build-intel.md --- docs/dev/mac-build-intel.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/docs/dev/mac-build-intel.md b/docs/dev/mac-build-intel.md index 4b00944fb..0b5e797ca 100644 --- a/docs/dev/mac-build-intel.md +++ b/docs/dev/mac-build-intel.md @@ -2,6 +2,11 @@ Date: 2026-05may-28 +## Distribution + +You can find an App binary here: +https://github.com/flagsoft/ptx2pdf/blob/master/distribution/readme.md + ## Ideas for future versions - Maybe there should be a Settings > TeTeX path input box where user can setup which TeTeX will be used. From e2676d40460731b5bed5bc8dea696b5f62211949 Mon Sep 17 00:00:00 2001 From: Michael Date: Thu, 28 May 2026 17:13:00 +0200 Subject: [PATCH 09/20] Update readme.md --- distribution/readme.md | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/distribution/readme.md b/distribution/readme.md index 762b075cd..b8240a222 100644 --- a/distribution/readme.md +++ b/distribution/readme.md @@ -8,7 +8,26 @@ This is an non-official distribution of PTXprint for macOS with Intel(TM) chips. ## macOS App (Intel chip only) -Important NOTE: When an application gets downloaded from any source other than those that Apple seems suited, the application gets an extended attribute "com.apple.Quarantine". +### Install + +You *must* install XeTeX with brew (Homebrew), see https://brew.sh/ else it will not work. + +``` +% brew install xetex +``` + +This will install XeTeX with binaries: + +``` +/usr/local/bin/fc-list +/Library/TeX/texbin/xetex +/Library/TeX/texbin/xdvipdfmx +``` + + +### Important NOTE after downloading .app file + +When an application gets downloaded from any source other than those that Apple seems suited, the application gets an extended attribute "com.apple.Quarantine". This triggers the message: "application XY is damaged and can't be opened. You should move it to the Bin." Remove the attribute and you can launch the application. From 2029e88ac9487d3105c2d58b52bd53f4eca60d75 Mon Sep 17 00:00:00 2001 From: Michael Date: Thu, 28 May 2026 17:15:10 +0200 Subject: [PATCH 10/20] Update readme.md --- distribution/readme.md | 37 +++++++++++++++++++++++-------------- 1 file changed, 23 insertions(+), 14 deletions(-) diff --git a/distribution/readme.md b/distribution/readme.md index b8240a222..0082510ce 100644 --- a/distribution/readme.md +++ b/distribution/readme.md @@ -6,23 +6,15 @@ This is an non-official distribution of PTXprint for macOS with Intel(TM) chips. -## macOS App (Intel chip only) +## Download macOS App (for Intel chip only) -### Install -You *must* install XeTeX with brew (Homebrew), see https://brew.sh/ else it will not work. -``` -% brew install xetex -``` +- 2026-05may-28, Version 3.0.30, https://www.flagsoft.com/public/ptxprint/2026-05may-28/PTXprint.zip + +sha256sum of ZIP file: 19f6129608b88e5a1343d93c94d4480c10a37863592cc7e578c450deeba4bda4 -This will install XeTeX with binaries: -``` -/usr/local/bin/fc-list -/Library/TeX/texbin/xetex -/Library/TeX/texbin/xdvipdfmx -``` ### Important NOTE after downloading .app file @@ -38,6 +30,23 @@ $ xattr -c ``` After that you can run the App as usual. -- 2026-05may-28, Version 3.0.30, https://www.flagsoft.com/public/ptxprint/2026-05may-28/PTXprint.zip -sha256sum of ZIP file: 19f6129608b88e5a1343d93c94d4480c10a37863592cc7e578c450deeba4bda4 + +### You must Install XeTeX separately + +You *must* install XeTeX with brew (Homebrew), see https://brew.sh/ else it will not work. + +``` +% brew install xetex +``` + +This will install XeTeX with binaries: + +``` +/usr/local/bin/fc-list +/Library/TeX/texbin/xetex +/Library/TeX/texbin/xdvipdfmx +``` + + + From 0238c133a44cd4c1a3896cd53abdddb6d220083e Mon Sep 17 00:00:00 2001 From: Michael Date: Fri, 29 May 2026 09:28:01 +0200 Subject: [PATCH 11/20] pip install ".[gui]" - typo ? Use: pip install ".[gui]" Not: pip install .[gui] This will issue shell errors --- python/readme.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/python/readme.md b/python/readme.md index bdb37a007..b0aa3d2f7 100644 --- a/python/readme.md +++ b/python/readme.md @@ -56,7 +56,8 @@ cd ptx2pdf python3 -m venv venv source venv/bin/activate pip install --upgrade pip setuptools wheel build -pip install .[gui] +pip install ".[gui]" ``` + Configuration files (like the default path to the translation project files) are stored in `~/.config/ptxprint/` From f80b3de0ff382e4ec99317e66982c151e4559e05 Mon Sep 17 00:00:00 2001 From: Michael Date: Fri, 29 May 2026 16:50:53 +0200 Subject: [PATCH 12/20] Typo? 19 MAY -> 29. MAY Typo? 19 MAY -> 29. MAY --- docs/inno-docs/ReleaseNotes.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/inno-docs/ReleaseNotes.txt b/docs/inno-docs/ReleaseNotes.txt index aa9907fc5..d5fa36a16 100644 --- a/docs/inno-docs/ReleaseNotes.txt +++ b/docs/inno-docs/ReleaseNotes.txt @@ -4,7 +4,7 @@ PTXprint 3.0.31 Release Notes "Bible Layout For Everyone" - Easily create scripture PDFs for trial publications _____________________________________________________________ -Bug fixes and Improvements in 3.0.31 - (19 May 2026) +Bug fixes and Improvements in 3.0.31 - (29 May 2026) * Allow complexpages layout strings in experimental mode -E 1 * Autofill plugins when polyglot requires them * Add attach_console for windows (should give stdout if run from a console) From 1a19154809086151ca7147314358b28e0ff8410c Mon Sep 17 00:00:00 2001 From: Michael Date: Mon, 1 Jun 2026 20:14:38 +0200 Subject: [PATCH 13/20] Update ReleaseNotes.txt --- docs/inno-docs/ReleaseNotes.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/inno-docs/ReleaseNotes.txt b/docs/inno-docs/ReleaseNotes.txt index d5fa36a16..25704f608 100644 --- a/docs/inno-docs/ReleaseNotes.txt +++ b/docs/inno-docs/ReleaseNotes.txt @@ -1,5 +1,5 @@ PTXprint 3.0.31 Release Notes -29 May 2026 +1 Jun 2026 "Bible Layout For Everyone" - Easily create scripture PDFs for trial publications _____________________________________________________________ From f127938a8364f108dcdd90c456ddac51547eae30 Mon Sep 17 00:00:00 2001 From: Michael Date: Mon, 1 Jun 2026 21:01:18 +0200 Subject: [PATCH 14/20] 2026-06jun-01 released --- distribution/readme.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/distribution/readme.md b/distribution/readme.md index 0082510ce..3282ca46d 100644 --- a/distribution/readme.md +++ b/distribution/readme.md @@ -8,9 +8,12 @@ This is an non-official distribution of PTXprint for macOS with Intel(TM) chips. ## Download macOS App (for Intel chip only) +### 2026-06jun-01, Version 3.0.31, https://www.flagsoft.com/public/ptxprint/2026-06jun-01/PTXprint.zip +sha256sum of ZIP file: ad1b6436f35650e404fc072e72f5ec3b663e78b2de8dc8fcc62aed3a5eb8e377 -- 2026-05may-28, Version 3.0.30, https://www.flagsoft.com/public/ptxprint/2026-05may-28/PTXprint.zip + +### 2026-05may-28, Version 3.0.30, https://www.flagsoft.com/public/ptxprint/2026-05may-28/PTXprint.zip sha256sum of ZIP file: 19f6129608b88e5a1343d93c94d4480c10a37863592cc7e578c450deeba4bda4 From 1c5a31ac98835401a2e64f9edeae89033fdf3dbf Mon Sep 17 00:00:00 2001 From: Michael Date: Fri, 5 Jun 2026 14:28:51 +0200 Subject: [PATCH 15/20] Update readme.md --- distribution/readme.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/distribution/readme.md b/distribution/readme.md index 3282ca46d..6163c6f6f 100644 --- a/distribution/readme.md +++ b/distribution/readme.md @@ -8,6 +8,10 @@ This is an non-official distribution of PTXprint for macOS with Intel(TM) chips. ## Download macOS App (for Intel chip only) +Download any version here: +https://www.flagsoft.com/public/ptxprint/ + + ### 2026-06jun-01, Version 3.0.31, https://www.flagsoft.com/public/ptxprint/2026-06jun-01/PTXprint.zip sha256sum of ZIP file: ad1b6436f35650e404fc072e72f5ec3b663e78b2de8dc8fcc62aed3a5eb8e377 From 68090e27f9678145e4733582b209bc0841e2f8cd Mon Sep 17 00:00:00 2001 From: Michael Date: Fri, 5 Jun 2026 14:30:22 +0200 Subject: [PATCH 16/20] Update readme.md --- distribution/readme.md | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/distribution/readme.md b/distribution/readme.md index 6163c6f6f..31c40afda 100644 --- a/distribution/readme.md +++ b/distribution/readme.md @@ -11,16 +11,20 @@ This is an non-official distribution of PTXprint for macOS with Intel(TM) chips. Download any version here: https://www.flagsoft.com/public/ptxprint/ +ba288c6d028d500020876174ccd57921f94789ced71882a11af1cd2628dda60b ./dist/PTXprint.zip + + - + From 1fcebd29ca414f935fdf7b2eb7c9137a690e004d Mon Sep 17 00:00:00 2001 From: Michael Date: Fri, 5 Jun 2026 14:31:22 +0200 Subject: [PATCH 17/20] Update readme.md --- distribution/readme.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/distribution/readme.md b/distribution/readme.md index 31c40afda..4d6d17412 100644 --- a/distribution/readme.md +++ b/distribution/readme.md @@ -11,7 +11,7 @@ This is an non-official distribution of PTXprint for macOS with Intel(TM) chips. Download any version here: https://www.flagsoft.com/public/ptxprint/ -ba288c6d028d500020876174ccd57921f94789ced71882a11af1cd2628dda60b ./dist/PTXprint.zip +ba288c6d028d500020876174ccd57921f94789ced71882a11af1cd2628dda60b, 3.0.32, PTXprint.zip