Browse Source

Updated Flatpak and Snap packaging files for version 7.3. Added AppImage packaging.

Chronos 3 months ago
parent
commit
8e55a0be04

+ 0 - 45
Install/flatpak/0001-515-runtime-fix-for-Qt.patch

@@ -1,45 +0,0 @@
-From 11b9c647dd96edaf4a3240a3683493fb37a0e0e0 Mon Sep 17 00:00:00 2001
-From: Johann ELSASS <[email protected]>
-Date: Thu, 28 Dec 2023 16:40:48 +0100
-Subject: [PATCH] #515 runtime fix for Qt
-
----
- lazpaint/lazpaintmainform.lfm | 1 +
- lazpaint/lazpaintmainform.pas | 2 ++
- 2 files changed, 3 insertions(+)
-
-diff --git a/lazpaint/lazpaintmainform.lfm b/lazpaint/lazpaintmainform.lfm
-index a2dffa1..2765760 100644
---- a/lazpaint/lazpaintmainform.lfm
-+++ b/lazpaint/lazpaintmainform.lfm
-@@ -5769,6 +5769,7 @@ object FMain: TFMain
-     Top = 514
-   end
-   object TimerUpdate: TTimer
-+    Enabled = False
-     Interval = 50
-     OnTimer = TimerUpdateTimer
-     Left = 653
-diff --git a/lazpaint/lazpaintmainform.pas b/lazpaint/lazpaintmainform.pas
-index 708cb24..551c7d0 100644
---- a/lazpaint/lazpaintmainform.pas
-+++ b/lazpaint/lazpaintmainform.pas
-@@ -1251,6 +1251,7 @@ begin
-   UpdateToolBar;
-   FShouldArrange := true;
-   QueryArrange;
-+  TimerUpdate.Enabled := true;
- end;
- 
- procedure TFMain.OnLatestVersionUpdate(ANewVersion: string);
-@@ -2593,6 +2594,7 @@ end;
- 
- procedure TFMain.FormHide(Sender: TObject);
- begin
-+  TimerUpdate.Enabled := false;
-   FShouldArrange := false;
-   FTopMostInfo := LazPaintInstance.HideTopmost;
-   LazPaintInstance.SaveMainWindowPosition;
--- 
-2.43.0
-

+ 0 - 37
Install/flatpak/0001-avoid-crash-on-Qt5.patch

@@ -1,37 +0,0 @@
-From d73455025d71226472e7eb880da36f6fb85c5df0 Mon Sep 17 00:00:00 2001
-From: Johann ELSASS <[email protected]>
-Date: Thu, 6 Oct 2022 21:44:47 +0200
-Subject: [PATCH] avoid crash on Qt5
-
----
- lazpaint/lazpaintinstance.pas | 1 +
- lazpaint/lazpaintmainform.pas | 1 +
- 2 files changed, 2 insertions(+)
-
-diff --git a/lazpaint/lazpaintinstance.pas b/lazpaint/lazpaintinstance.pas
-index 5da9ac6..b5f624b 100644
---- a/lazpaint/lazpaintinstance.pas
-+++ b/lazpaint/lazpaintinstance.pas
-@@ -374,6 +374,7 @@ procedure TLazPaintInstance.ReportActionProgress(AProgressPercent: integer);
- var
-   delay: Integer;
- begin
-+  {$IFDEF LCLqt5}exit;{$ENDIF}
-   if AProgressPercent < 100 then delay := 10000 else delay := 1000;
-   if Assigned(FMain) then FMain.UpdatingPopup:= true;
-   try
-diff --git a/lazpaint/lazpaintmainform.pas b/lazpaint/lazpaintmainform.pas
-index 0fe875c..708cb24 100644
---- a/lazpaint/lazpaintmainform.pas
-+++ b/lazpaint/lazpaintmainform.pas
-@@ -2695,6 +2695,7 @@ end;
- 
- procedure TFMain.TimerUpdateTimer(Sender: TObject);
- begin
-+  if FLazPaintInstance = nil then exit;
-   TimerUpdate.Enabled := false;
-   if ToolManager.ToolSleeping and not spacePressed and
-      ([ssLeft,ssRight,ssMiddle] * FLayout.MouseButtonState = []) then
--- 
-2.43.0
-

+ 0 - 9
Install/snap/local/build.sh

@@ -1,9 +0,0 @@
-#!/bin/bash
-
-ln -s Install/snap ../../../snap
-
-pushd ../../..
-snapcraft --debug --use-lxd $@
-popd
-
-rm ../../../snap

+ 2 - 0
lazpaint/release/appimage/AppRun

@@ -0,0 +1,2 @@
+#!/bin/bash
+exec $APPDIR/usr/bin/lazpaint

+ 21 - 0
lazpaint/release/appimage/build.sh

@@ -0,0 +1,21 @@
+#!/bin/bash
+
+sudo apt-get install zsync
+wget -nc https://github.com/AppImage/appimagetool/releases/download/continuous/appimagetool-x86_64.AppImage
+chmod +x appimagetool-x86_64.AppImage
+lazbuild --build-mode=Release ../../../use/bgrabitmap/bgrabitmap/bgrabitmappack.lpk
+lazbuild --build-mode=Release ../../../use/bgracontrols/bgracontrols.lpk
+lazbuild --build-mode=Release ../../../lazpaintcontrols/lazpaintcontrols.lpk
+lazbuild --build-mode=Release ../../../lazpaint/lazpaint.lpi
+install -Dm755 ../bin/lazpaint -t AppDir/usr/bin
+install -Dm644 ../debian/applications/lazpaint.desktop AppDir/io.github.bgrabitmap.LazPaint.desktop
+install -Dm644 ../debian/applications/lazpaint.desktop AppDir/usr/share/applications/io.github.bgrabitmap.LazPaint.desktop
+install -Dm644 ../../../resources/icon/256x256.png AppDir/usr/share/icons/hicolor/256x256/apps/io.github.bgrabitmap.LazPaint.png
+install -Dm644 ../../../resources/icon/256x256.png AppDir/lazpaint.png
+install -Dm644 ../bin/i18n/*.po -t AppDir/usr/share/lazpaint/i18n
+cp -r ../../../resources/scripts AppDir/usr/share/lazpaint
+cp -r ../bin/models AppDir/usr/share/lazpaint
+install -Dm644 ../common/lazpaint.xml AppDir/usr/share/mime/packages/io.github.bgrabitmap.LazPaint.xml
+install -Dm644 ../flatpak/io.github.bgrabitmap.LazPaint.metainfo.xml AppDir/usr/share/metainfo/io.github.bgrabitmap.LazPaint.metainfo.xml
+install -Dm755 AppRun -t AppDir
+ARCH=x86_64 ./appimagetool-x86_64.AppImage AppDir LazPaint.AppImage

+ 0 - 0
Install/snap/local/lazpaint.xml → lazpaint/release/common/lazpaint.xml


+ 0 - 0
Install/flatpak/build.sh → lazpaint/release/flatpak/build.sh


+ 28 - 0
Install/flatpak/io.github.bgrabitmap.LazPaint.metainfo.xml → lazpaint/release/flatpak/io.github.bgrabitmap.LazPaint.metainfo.xml

@@ -86,6 +86,34 @@ Filters can be applied to the whole image or to the active selection.
   </screenshots>
 
   <releases>
+    <release version="7.3.0" date="2025-05-25">
+      <url type="details">https://github.com/bgrabitmap/lazpaint/releases/tag/v7.3</url>
+      <description>
+        <ul>
+          <li>fixes for high DPI</li>
+          <li>binding keys (digits) to colors</li>
+          <li>compilation fix for newer FPC / LCL</li>
+          <li>runtime fix for Qt</li>
+          <li>improve safety of Python scripts</li>
+          <li>enable or disable preview in filter windows</li>
+          <li>Turkish translation</li>
+          <li>add hypocycloid in Render menu</li>
+          <li>increase maximum shape per layer</li>
+          <li>auto-switch between selection tools</li>
+          <li>fixed deformation grid error</li>
+          <li>fixed blank print error</li>
+          <li>adapt print UI on Linux</li>
+          <li>fix selection with vertical text alignment</li>
+          <li>fix euro symbol with AltGr</li>
+          <li>add superformula layer</li>
+          <li>easy of use for beginners</li>
+          <li>aliasing option for shapes</li>
+          <li>increase canvas size when pasting</li>
+          <li>increase max shape count</li>
+          <li>complete translations</li>
+        </ul>
+      </description>
+    </release>
     <release version="7.2.2" date="2022-08-23">
       <url type="details">https://github.com/bgrabitmap/lazpaint/releases/tag/v7.2.2</url>
       <description>

+ 6 - 7
Install/flatpak/io.github.bgrabitmap.LazPaint.yml → lazpaint/release/flatpak/io.github.bgrabitmap.LazPaint.yml

@@ -26,21 +26,20 @@ modules:
     sources:
       - type: git
         url: https://github.com/bgrabitmap/bgrabitmap.git
-        commit: f9748a37f5382b18d1cd197293d1032a522e8561
+        commit: 6ada359c45fe2230b8af6e108bd6c660bf9202ec
         dest: 'bgrabitmap'
+        disable-submodules: true
       - type: git
         url: https://github.com/bgrabitmap/bgracontrols.git
-        commit: f5efbf8b79d0725d33b88c5bd41857d9139428bd
+        commit: 20dbed8ca89620721dc3028c221c91609db53fe2
         dest: 'bgracontrols'
+        disable-submodules: true
       - type: git
         url: https://github.com/bgrabitmap/lazpaint.git
-        commit: 501d44c511fb49ca166dc0ec101305dddbf3aee6
+        commit: a11930b418c7d9050886bd7d321fe78acfcd7ea6
+        disable-submodules: true
       - type: file
         path: io.github.bgrabitmap.LazPaint.metainfo.xml
-      - type: patch
-        path: 0001-515-runtime-fix-for-Qt.patch
-      - type: patch
-        path: 0001-avoid-crash-on-Qt5.patch
       - type: patch
         path: no-image-browser-by-default.patch
     buildsystem: simple

+ 0 - 0
Install/flatpak/no-image-browser-by-default.patch → lazpaint/release/flatpak/no-image-browser-by-default.patch


+ 9 - 0
lazpaint/release/snap/local/build.sh

@@ -0,0 +1,9 @@
+#!/bin/bash
+
+ln -s lazpaint/release/snap ../../../../snap
+
+pushd ../../../..
+snapcraft --debug --use-lxd -v $@
+popd
+
+rm ../../../../snap

+ 55 - 20
Install/snap/snapcraft.yaml → lazpaint/release/snap/snapcraft.yaml

@@ -1,22 +1,22 @@
 name: lazpaint
 title: LazPaint
-version: '7.2.2'
+version: '7.3.0'
 summary: Image editor with raster and vector layers.
 description: |
   Free cross-platform image editor with raster and vector layers, written in Lazarus (Free Pascal).
   Can read layered files (lzp, ora, pdn, oXo, flat psd), multi-images (gif, ico, tiff), flat files (bmp, jpeg, pcx, png, tga, webp, xpm, xwd), raw images (dng, cr2, nef, arw...), vectorial (svg), 3D (obj). Has drawing tools, vector shapes, phong shading, curve adjustments, filters, render some textures, Python scripting. Uses Qt5 widgetset.
-  
+
   **Features**
   * Files: read and write a variety of file formats, including layered bitmaps and 3D files.
   * Tools: many tools are available to draw on the layers.
   * Edit/Select: select parts of an image with antialiasing and modify the selection as a mask.
   * View: color window, layer stack window and toolbox window.
   * Command line: call LazPaint from a console.
-  
+
   **Image manipulation**
   * An image can be resampled, flipped horizontally and vertically.
   * Smart zoom x3 : resize the image x3 and detects borders; this provides a useful zoom with ancient games sprites.
- 
+
   **Color manipulation**
   * Colorize : set the color of an image while preserving intensities
   * Shift colors : cycle colors and change colorness (saturation)
@@ -26,7 +26,7 @@ description: |
   * Negative : invert colors (with gamma correction)
   * Linear negative : invert colors (without gamma correction)
   * Grayscale : converts colors to grayscale with gamma correction
-  
+
   **Filters**
   Filters can be applied to the whole image or to the active selection.
   * Radial blur : non directional blur
@@ -40,9 +40,9 @@ description: |
   * Sphere : spherical projection
   * Cylinder : cylinder projection
   * Clouds : add clouds of the current pen color
-  * Scripts: scripts are provided to do layer effects. You can as well write your own Python scripts.  
+  * Scripts: scripts are provided to do layer effects. You can as well write your own Python scripts.
 confinement: strict
-base: core20
+base: core24
 grade: stable
 icon: "resources/icon/64x64.png"
 license: NLPL
@@ -52,15 +52,47 @@ parts:
     plugin: nil
     source: .
     source-type: local
-    build-packages: 
+    build-packages:
     - wget
     - libgtk2.0-dev
     override-build: |
-      wget -nc https://downloads.sourceforge.net/project/lazarus/Lazarus%20Linux%20amd64%20DEB/Lazarus%202.2.2/lazarus-project_2.2.2-0_amd64.deb
-      wget -nc https://downloads.sourceforge.net/project/lazarus/Lazarus%20Linux%20amd64%20DEB/Lazarus%202.2.2/fpc-laz_3.2.2-210709_amd64.deb
-      wget -nc https://downloads.sourceforge.net/project/lazarus/Lazarus%20Linux%20amd64%20DEB/Lazarus%202.2.2/fpc-src_3.2.2-210709_amd64.deb
-      apt install ./lazarus-project_2.2.2-0_amd64.deb ./fpc-laz_3.2.2-210709_amd64.deb ./fpc-src_3.2.2-210709_amd64.deb
+      wget -nc https://downloads.sourceforge.net/project/lazarus/Lazarus%20Linux%20amd64%20DEB/Lazarus%204.0/lazarus-project_4.0.0-0_amd64.deb
+      wget -nc https://downloads.sourceforge.net/project/lazarus/Lazarus%20Linux%20amd64%20DEB/Lazarus%204.0/fpc-laz_3.2.2-210709_amd64.deb
+      wget -nc https://downloads.sourceforge.net/project/lazarus/Lazarus%20Linux%20amd64%20DEB/Lazarus%204.0/fpc-src_3.2.2-210709_amd64.deb
+      apt install ./lazarus-project_4.0.0-0_amd64.deb ./fpc-laz_3.2.2-210709_amd64.deb ./fpc-src_3.2.2-210709_amd64.deb
     prime: [-*]
+  bgrabitmap:
+    plugin: nil
+    source: use/bgrabitmap
+    source-type: local
+    override-build: |
+      snapcraftctl build
+      cd bgrabitmap
+      lazbuild --build-mode=Release bgrabitmappack.lpk
+    after:
+    - lazarus
+    - desktop-gtk2
+  bgracontrols:
+    plugin: nil
+    source: use/bgracontrols
+    source-type: local
+    override-build: |
+      snapcraftctl build
+      lazbuild --build-mode=Release bgracontrols.lpk
+    after:
+    - lazarus
+    - desktop-gtk2
+  lazpaintcontrols:
+    plugin: nil
+    source: .
+    source-type: local
+    override-build: |
+      snapcraftctl build
+      cd lazpaintcontrols
+      lazbuild --build-mode=Release lazpaintcontrols.lpk
+    after:
+    - lazarus
+    - desktop-gtk2
   lazpaint:
     plugin: nil
     source: .
@@ -80,10 +112,13 @@ parts:
       install -m 755 ../resources/icon/64x64.png $SNAPCRAFT_PART_INSTALL/usr/share/pixmaps/lazpaint.png
       cp -r ../resources/scripts $SNAPCRAFT_PART_INSTALL/usr/share/lazpaint
       install -d -m 755 $SNAPCRAFT_PART_INSTALL/usr/share/mime/packages
-      install -m 755 ../Install/snap/local/lazpaint.xml $SNAPCRAFT_PART_INSTALL/usr/share/mime/packages
+      install -m 755 ../packaging/common/lazpaint.xml $SNAPCRAFT_PART_INSTALL/usr/share/mime/packages
     after:
     - lazarus
     - desktop-gtk2
+    - bgrabitmap
+    - bgracontrols
+    - lazpaintcontrols
     stage:
     - etc
     - usr
@@ -134,11 +169,11 @@ parts:
     - libgtk2.0-dev
     stage-packages:
     - libxkbcommon0  # XKB_CONFIG_ROOT
-    - ttf-ubuntu-font-family
+    #- ttf-ubuntu-font-family
     - dmz-cursor-theme
     - light-themes
     - adwaita-icon-theme
-    - gnome-themes-standard
+    #- gnome-themes-standard
     - shared-mime-info
     - libgtk2.0-0
     - libgdk-pixbuf2.0-0
@@ -146,13 +181,13 @@ parts:
     - libgtk2.0-bin
     - unity-gtk2-module
     - locales-all
-    - libappindicator1
+    #- libappindicator1
     - xdg-user-dirs
     - ibus-gtk
     - libibus-1.0-5
-      
+
 # Additional plugs to pick up the GTK theme and icons from the system
-plugs: 
+plugs:
   icon-themes:
     interface: content
     target: $SNAP/data-dir/icons
@@ -173,13 +208,13 @@ plugs:
 environment:
   XDG_DATA_DIRS: $SNAP/usr/share:$XDG_DATA_DIRS
   GTK_PATH: $SNAP/lib/gtk-2.0
-  
+
 apps:
   lazpaint:
     command: usr/bin/lazpaint
     command-chain:
     - bin/desktop-launch
-    desktop: usr/share/applications/lazpaint.desktop    
+    desktop: usr/share/applications/lazpaint.desktop
     plugs:
     - desktop
     - x11