Skip to content

Commit

Permalink
AppImage ready for test
Browse files Browse the repository at this point in the history
  • Loading branch information
davidbannon committed Sep 11, 2024
1 parent db7bb0a commit b49441a
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 6 deletions.
17 changes: 11 additions & 6 deletions buildit.bash
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,8 @@ EXCLUDEMESSAGE=" -vm6058,2005,5027 " # cut down on compiler noise
# 6058 - note about things not being inlined
# 5027 - var not used
# 2005 - level 2 comment
FPCHARD=" -Cg -k-pie -k-znow "
AUTODOWNLOAD=FALSE # downloading large file, use -d to allow it
FPCHARD=" -Cg -k-pie -k-znow " # might get cancelled with a NOHARDENING semaphore file.
AUTODOWNLOAD=FALSE # downloading large file, use -d to allow it

# ------------------------ Some functions ------------------------

Expand All @@ -77,6 +77,7 @@ function ShowHelp () {
echo "-c specify CPU, default is $HOSTTYPE - supported x86_64, i386, arm"
echo "-Q build a Qt5 version (default gtk2)"
echo "-T build a Qt6 version"
echo "-n no hardening, not for Debian build"
echo "When used in SRC DEB toolchain, set -c (if necessary) options in the Makefile."
echo ""
exit 1
Expand Down Expand Up @@ -146,6 +147,7 @@ function CheckLazBuild () {

# We default to GTK2 but if a file is left in working dir called
# Qt5 or Qt6 then we build that. Note a -q does the same thing for qt5.
# We also check for a NOHARDENING semaphore here. Cannot use it in AppImage
function CheckForQt5 () {
echo "----------- Looking for widget semophore in $PWD"
if [ -f "Qt5" ]; then
Expand All @@ -154,6 +156,9 @@ function CheckForQt5 () {
if [ -f "Qt6" ]; then
WIDGET="qt6"
fi
if [ -f "NOHARDENING" ]; then
FPCHARD=""
fi
echo "----------- Using Widget Set $WIDGET"
}

Expand All @@ -172,7 +177,7 @@ while getopts "hQTc:" opt; do
Q)
WIDGET="qt5"
;;
T)
T)
WIDGET="qt6"
;;
\?)
Expand Down Expand Up @@ -337,9 +342,9 @@ echo "$RUNIT"
TOMBOY_NG_VER="$VERSION" $RUNIT 1>>tomboy-ng.log

if [ ! -e "$PROJ" ]; then
echo "======================== ERROR, COMPILE FAILED source/tomboy-ng.log ====="
cat tomboy-ng.log
echo "=========================================================== END of LOG =="
echo "======== ERROR, COMPILE FAILED see source/tomboy-ng.log ====="
# cat tomboy-ng.log
# echo "=========================================================== END of LOG =="
exit 1
else
cp "$PROJ" "tomboy-ng"
Expand Down
22 changes: 22 additions & 0 deletions prepare.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,28 @@ If you don't get a response, did you include 'mentors' in the dput line ?
...after doing the PPA stuff or you must edit the PPA changleog !


**AppImage**
========
Its also possible to build a AppImage using the scripts here and the open source linuxdeploy tools.

**Needed :**
* Linux box with FPC323 or later, Lazarus 3.4 or later.
* All necessary libraries and tools to build the tomboy-ng of your choice, ie Qt5 or Qt6 libraries etc.
* linuxdeploy and linuxdeploy-plugin-qt available from https://github.com/linuxdeploy

**Process**
* mkdir AppImage
* cd AppImage
* wget https://raw.githubusercontent.com/tomboy-notes/tomboy-ng/master/scripts/prepare.debian
bash ./prepare.debian -n -q -l /home/dbannon/bin/Lazarus/lazarus_3_4/lazbuild
* cd tom<tab>
* bash scripts/mkappimage.bash -w Qt6
* mv tomboy-ng-x86_64.AppImage tomboy-ng-x86_64-Qt6.AppImage
* bash scripts/mkappimage.bash -w Qt5
* mv tomboy-ng-x86_64.AppImage tomboy-ng-x86_64-Qt5.AppImage

Resulting bundles are about 35Meg each.


**Launchpad PPA**
========
Expand Down
3 changes: 3 additions & 0 deletions scripts/mkappimage.bash
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,9 @@ else
touch Qt5
fi

# And a semaphore to ensure we don't apply Hardening, has a problem in older OS.
touch NOHARDENING

if [ "$APPDIR" == "" ]; then # OK, so I am a coward !
echo "ERROR, var APPDIR is empty, disaster is on your door step, exiting.."
exit
Expand Down

0 comments on commit b49441a

Please sign in to comment.