From 0b1d63d2d9719a9b1547864062a1712a33aaf019 Mon Sep 17 00:00:00 2001 From: David Bannon Date: Wed, 17 Jan 2024 22:23:45 +1100 Subject: [PATCH] set colour of Backlinks Panel to clMenu, tweak MacOS build script --- package/mk_dmg-new.bash | 138 ---------------------------------------- package/mk_dmg.bash | 1 + source/editbox.lfm | 2 + source/editbox.pas | 1 + 4 files changed, 4 insertions(+), 138 deletions(-) delete mode 100644 package/mk_dmg-new.bash diff --git a/package/mk_dmg-new.bash b/package/mk_dmg-new.bash deleted file mode 100644 index 38eb7b8..0000000 --- a/package/mk_dmg-new.bash +++ /dev/null @@ -1,138 +0,0 @@ -#!/bin/bash -# ------------------------------------------------------------ -# -# A script to generate Mac's tomboy-ng dmg files - -# Typical Usage : bash ./mk_dmg.bash $HOME/bin/lazarus/fixes_2_0 -# bash ./mk_dmg.bash packageonly - -# Note we assume config is named same as lazarus dir, ie .laz-200 -# -# Depends (heavily) on https://github.com/andreyvit/create-dmg -# which must be installed. -# -# Probably should put license and readme in there too. -# ------------------------------------------------------------- - -# History -# 2022-11-02 Made allowance for lazconfig not being in $HOME/.* We now assume -# instead that ALL Laz installs have a lazarus.cfg with --pcp= -# 2023-11-08 Work in progress, added packageonly and path changes to get it -# working on the Mac Mini (brew things now in path). -# Not tested doing a compile first, does make the Universal binary -# as long as the two individual binaries exist in ../source -# -# WARNING - as packageonly is not being told where Lazarus is, it cannot find -# Lazarus's premade language files. - -LAZ_FULL_DIR="$1" -LAZ_DIR=`basename "$LAZ_FULL_DIR"` -PRODUCT=tomboy-ng -WORK=source_folder -CONTENTS="$WORK/""$PRODUCT".app/Contents -VERSION=`cat version` -MANUALS=`cat note-files` -MSGFMT="msgfmt" -#MSGFMT="/usr/local/Cellar/gettext/0.19.8.1/bin/msgfmt" -VERSION=`cat version` -PACKAGEONLY='false' - -if [ "$1" == "packageonly" ]; then - PACKAGEONLY='true'; -else - LAZ_PCP=`cat "$LAZ_FULL_DIR"/lazarus.cfg` - - if [ -z "$LAZ_DIR" ]; then - echo "Usage : $0 /Full/Path/Lazarus/dir" - echo "eg : $0 \$HOME/bin/lazarus/fixes_2_0" - exit - fi - - if [ ! -f "$LAZ_FULL_DIR"/lazbuild ]; then - echo "Sorry, ""$LAZ_FULL_DIR"" does not look like it contains a Lazarus build" - exit - fi -fi - # We do some wildcard deletes further on, be safe ! -if [ ! -f tomboy-ng.iss ]; then - echo "Not running in tomboy-ng package dir, too dangerous" - exit -fi - - -function MakeDMG () { - if [ "$1" = "carbon" ]; then - CPU="i386" - BITS="32" - REL="CarbonRelease" - else - CPU="x86_64" - BITS="64" - REL="CocoaRelease" - fi - cd ../source - rm -f "$PRODUCT" # we are building a new one, either with fpc or lipo - - if [ "$PACKAGEONLY" == 'false' ]; then - -# TOMBOY_NG_VER="$VERSION" $LAZ_FULL_DIR/lazbuild --pcp="$HOME/.$LAZ_DIR" -B --cpu="$CPU" --ws="$1" --build-mode="$REL" --os="darwin" Tomboy_NG.lpi - - TOMBOY_NG_VER="$VERSION" $LAZ_FULL_DIR/lazbuild "$LAZ_PCP" -B --cpu="$CPU" --ws="$1" --build-mode="$REL" --os="darwin" Tomboy_NG.lpi - if [ ! -f "$PRODUCT" ]; then - echo "------------------------------------" - echo "Failed to build ""$BITS"" bit binary" - echo "------------------------------------" - exit - fi - else # ie, package only mode - lipo -create -output tomboy-ng tomboy-ng-x86_64 tomboy-ng-aarch64 - fi - strip "$PRODUCT" - cd ../package - - # -------- Packaging starts here -------- - rm -Rf $WORK - mkdir -p $CONTENTS - ln -s /Applications $WORK/Applications - mkdir "$CONTENTS"/SharedSupport - mkdir "$CONTENTS"/Resources - mkdir "$CONTENTS"/MacOS - MANWIDTH=70 man ../doc/tomboy-ng.1 > "$CONTENTS"/SharedSupport/readme.txt - cp -R ../doc/html "$CONTENTS"/SharedSupport/. - sed "s/REPLACEVER/\"$VERSION\"/" Info.plist > "$CONTENTS/Info.plist" - # cp Info.plist "$CONTENTS/." - cp PkgInfo "$CONTENTS/." - cp ../glyphs/tomboy-ng.icns "$CONTENTS/Resources/." - # for i in $MANUALS; do - # cp ../doc/"$i" "$CONTENTS/Resources/."; - # done; - cp -R ../doc/HELP "$CONTENTS/Resources/." - mkdir "$CONTENTS/MacOS/locale" - for i in `ls -b ../po/*.??.po`; do - echo "Name is $i" - BASENAME=`basename -s.po "$i"` - CCODE=`echo "$BASENAME" | cut -d '.' -f2` - echo "CCode is $CCODE" - BASENAME=`basename -s."$CCODE" "$BASENAME"` - mkdir -p "$CONTENTS/MacOS/locale/$CCODE" - "$MSGFMT" -o "$CONTENTS/MacOS/locale/$CCODE"/"$BASENAME".mo "$i" - "$MSGFMT" -o "$CONTENTS/MacOS/locale/$CCODE"/lclstrconsts.mo "$LAZ_FULL_DIR"/lcl/languages/lclstrconsts."$CCODE".po - done - cp ../source/"$PRODUCT" "$CONTENTS/MacOS/." - rm -f "$PRODUCT""$BITS"_"$VERSION".dmg - # ~/create-dmg-master/create-dmg --volname "$PRODUCT""$BITS" --volicon "../glyphs/vol.icns" "$PRODUCT""$BITS"_"$VERSION".dmg "./$WORK/" - create-dmg --volname "$PRODUCT""$BITS" --volicon "../glyphs/vol.icns" "$PRODUCT""$BITS"_"$VERSION".dmg "./$WORK/" -} - -if [ "$PACKAGEONLY" == "false" ]; then - if [ "LAZ_PCP" == "" ]; then - echo "Failed to find config file" - exit - fi -fi - -rm -f *.dmg -# MakeDMG "carbon" -# We don't bother building carbon any more, it should still build, must test occasionally. July 2020 -MakeDMG "cocoa" - diff --git a/package/mk_dmg.bash b/package/mk_dmg.bash index df03f9c..9ce8a42 100644 --- a/package/mk_dmg.bash +++ b/package/mk_dmg.bash @@ -45,6 +45,7 @@ else if [ -z "$LAZ_DIR" ]; then echo "Usage : $0 /Full/Path/Lazarus/dir" echo "eg : $0 \$HOME/bin/lazarus/fixes_2_0" + echo "eg : $0 \$HOME/Desktop/Lazarus/lazarus_3_0" exit fi diff --git a/source/editbox.lfm b/source/editbox.lfm index cdba630..11de473 100644 --- a/source/editbox.lfm +++ b/source/editbox.lfm @@ -1219,9 +1219,11 @@ object EditBoxForm: TEditBoxForm Width = 258 BorderSpacing.Left = 2 BorderSpacing.Top = 2 + BevelColor = clMenu Caption = 'PanelBackLinks' ClientHeight = 234 ClientWidth = 258 + Color = clMenu ParentBackground = False ParentColor = False TabOrder = 4 diff --git a/source/editbox.pas b/source/editbox.pas index 00e51ab..35d68d8 100644 --- a/source/editbox.pas +++ b/source/editbox.pas @@ -240,6 +240,7 @@ 2023/04/08 Get a note's height and width before populating KMemo, saves 200mS on a big note ! 2023/04/09 Keep Find-in-note prompt there unless not found. 2023/12/30 Added ability to display Back Links (Links button with nothing selected) + 2024/01/17 Altered the colour of Backlinks Panel to clMenu AFTER building all except MacOS and Packman }