diff --git a/Install/flatpak/0001-515-runtime-fix-for-Qt.patch b/Install/flatpak/0001-515-runtime-fix-for-Qt.patch new file mode 100644 index 00000000..00ad3579 --- /dev/null +++ b/Install/flatpak/0001-515-runtime-fix-for-Qt.patch @@ -0,0 +1,45 @@ +From 11b9c647dd96edaf4a3240a3683493fb37a0e0e0 Mon Sep 17 00:00:00 2001 +From: Johann ELSASS +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 + diff --git a/Install/flatpak/0001-avoid-crash-on-Qt5.patch b/Install/flatpak/0001-avoid-crash-on-Qt5.patch new file mode 100644 index 00000000..b0e8ce2d --- /dev/null +++ b/Install/flatpak/0001-avoid-crash-on-Qt5.patch @@ -0,0 +1,37 @@ +From d73455025d71226472e7eb880da36f6fb85c5df0 Mon Sep 17 00:00:00 2001 +From: Johann ELSASS +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 + diff --git a/Install/flatpak/build.sh b/Install/flatpak/build.sh new file mode 100755 index 00000000..9b7706ea --- /dev/null +++ b/Install/flatpak/build.sh @@ -0,0 +1,22 @@ +#!/bin/bash +set -x + +BUILD_DIR=build +REPO_DIR=repo +FLATPAK_ID=io.github.bgrabitmap.LazPaint + +# Install dependencies +flatpak install --system flathub org.kde.Sdk//5.15-24.08 +flatpak install --system flathub org.kde.Platform//5.15-24.08 +flatpak install --system flathub org.freedesktop.Sdk.Extension.freepascal//24.08 +flatpak install --system flathub org.flatpak.Builder + +# Build +flatpak run org.flatpak.Builder --force-clean --sandbox --user --install --ccache --mirror-screenshots-url=https://dl.flathub.org/media/ --repo=$REPO_DIR $BUILD_DIR $FLATPAK_ID.yml + +# Run +flatpak run $FLATPAK_ID + +# Linter +flatpak run --command=flatpak-builder-lint org.flatpak.Builder manifest $FLATPAK_ID.yml +flatpak run --command=flatpak-builder-lint org.flatpak.Builder repo $REPO_DIR diff --git a/Install/flatpak/io.github.bgrabitmap.LazPaint.metainfo.xml b/Install/flatpak/io.github.bgrabitmap.LazPaint.metainfo.xml new file mode 100644 index 00000000..5cb92d73 --- /dev/null +++ b/Install/flatpak/io.github.bgrabitmap.LazPaint.metainfo.xml @@ -0,0 +1,186 @@ + + + io.github.bgrabitmap.LazPaint + + LazPaint + Fast raster image editor + + BGRABitmap team + + + https://wiki.freepascal.org/LazPaint + https://github.com/bgrabitmap/lazpaint + http://sourceforge.net/donate/index.php?group_id=404555 + https://github.com/bgrabitmap/lazpaint/issues + https://github.com/bgrabitmap/lazpaint/tree/master/lazpaint/release/bin/i18n + + CC0-1.0 + GPL-3.0-only + + +

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)
  • +
  • Intensity : make colors lighter or darker without making them white
  • +
  • Lightness : make colors lighter or darker by making them whiter
  • +
  • Normalize : use the whole range of each color channel and alpha channel
  • +
  • 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
  • +
  • Motion blur : directional blur
  • +
  • Custom blur : blur according to a mask
  • +
  • Sharpen : makes contours more accurate, complementary to Smooth
  • +
  • Smooth : softens whole image, complementary to Sharpen
  • +
  • Median : computes the median of colors around each pixel, which softens corners
  • +
  • Contour : draws contours on a white background (like a pencil drawing)
  • +
  • Emboss : draws contours with shadow
  • +
  • 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.
  • +
+
+ + io.github.bgrabitmap.LazPaint.desktop + + + #dc8add + #613583 + + + + + Light theme + https://wiki.freepascal.org/images/a/a3/lazpaint_pallete.jpg + + + Dark theme + https://wiki.freepascal.org/images/1/17/lazpaint_pallete_dark.jpg + + + + + + https://github.com/bgrabitmap/lazpaint/releases/tag/v7.2.2 + +
    +
  • Completed Czech translation
  • +
  • Compilation fixes for Debian and legacy LCL
  • +
  • Linux shortcut: specify file parameter
  • +
+
+
+ + https://github.com/bgrabitmap/lazpaint/releases/tag/v7.2.1 + +
    +
  • adapt quick save shortcut on MacOS
  • +
  • translations : German, Portuguese, Chinese, Dutch, Spanish
  • +
  • added "screenshot" command line
  • +
  • libavif dll
  • +
  • multi click on text (#266)
  • +
  • fix in Python scripting (dialog.py)
  • +
  • added "-editor" parameter
  • +
+
+
+ + https://github.com/bgrabitmap/lazpaint/releases/tag/v7.2 + +
    +
  • MacOS: handle right-click on layerstack
  • +
  • MacOS: fixed light theme interface
  • +
  • MacOS: avoid key binding conflict with CMD-H
  • +
  • interface: handle cancel language or icon size change
  • +
  • interface: restore main form after embedded editor
  • +
  • interface: restore selection tool after delete
  • +
  • interface: fix shift-arrows in file list
  • +
  • interface: handle right click on switch color button
  • +
  • interface: remember docked toolbox visibility
  • +
  • interface: center on zoom fit
  • +
  • interface: less margin to select outside of color circle
  • +
  • interface: tooltip on arrow start/end
  • +
  • interface: show hotkey in toolbar
  • +
  • interface: update workspace when resizing/rotating
  • +
  • interface: handle keys in embedded editors
  • +
  • interface: prevent ALT key from opening menu
  • +
  • interface: handle ALT-wheel only when applicable
  • +
  • interface: keep fill options visible when changing opacity
  • +
  • layer stack: tooltip for visible and opacity controls
  • +
  • blend mode: removed horizontal scrollbar in blend mode lists
  • +
  • language: tool shortcuts for Cyrillic keyboard
  • +
  • language: translation of color description
  • +
  • language: completed Russian translation
  • +
  • file: prevent saving incorrect filename
  • +
  • file: handle path in file textbox
  • +
  • file: generate new filename with number
  • +
  • file: added quick save action (Ctlr-Q shortcut)
  • +
  • file: overwrite prompt when saving palette
  • +
  • file: experimental support for AVIF format
  • +
  • file: show save prompt when drag'n'drop image to the program
  • +
  • file: save CUR and ICO with command line
  • +
  • SVG: close path when export as SVG
  • +
  • SVG: fixed RTL text export
  • +
  • new file: better handling of ratios
  • +
  • motion blur: fixed sticky mouse click
  • +
  • canvas size: restrict percent to max accepted size
  • +
  • tools: update shape when pressing/releasing SHIFT key
  • +
  • tools: ignore 0 alpha with solid colors
  • +
  • tools: improved hints timing
  • +
  • tools: disambiguation of shortcut keys (Y, K, F and R)
  • +
  • deformation grid tool: handle extreme deformation
  • +
  • déformation grid tool: ESCAPE to exit tool
  • +
  • layer perspective tool: change cursor when hovering points
  • +
  • layer tools: delete current layer with DELETE key
  • +
  • rectangle tool: fixed bug when changing join type
  • +
  • text tool: update when change antialiasing
  • +
  • text tool: provide text style, bidi mode, vertical alignment in toolbar
  • +
  • text tool: allow travel mode with space
  • +
  • text tool: display flipped text
  • +
  • vector tools: avoid error after rasterizing
  • +
  • polygon/closed curve tools: hide center point when ALT key pressed
  • +
  • polyline/opened curve tool: don't reopen shape
  • +
  • poly tools: added RIGHT-click hint
  • +
  • selection tools: deselect when ESCAPE pressed and selection layer empty
  • +
  • selection tools: keep selection mode after undo/redo
  • +
  • rectangle selection tool: include ratio of current image
  • +
  • selection pen: show circular cursor
  • +
  • filter: added negative angle for twirl
  • +
  • script: ignore some Python errors
  • +
+
+
+
+ + + Graphics + + + +
diff --git a/Install/flatpak/io.github.bgrabitmap.LazPaint.yml b/Install/flatpak/io.github.bgrabitmap.LazPaint.yml new file mode 100644 index 00000000..549602fd --- /dev/null +++ b/Install/flatpak/io.github.bgrabitmap.LazPaint.yml @@ -0,0 +1,61 @@ +app-id: io.github.bgrabitmap.LazPaint +runtime: org.kde.Platform +runtime-version: '5.15-24.08' +sdk: org.kde.Sdk +sdk-extensions: + - org.freedesktop.Sdk.Extension.freepascal +command: lazpaint +rename-icon: lazpaint +rename-desktop-file: lazpaint.desktop +finish-args: + - --share=ipc + - --socket=fallback-x11 + - --socket=wayland + - --device=dri +modules: + - name: qt5pas + buildsystem: qmake + config-opts: + - -after + - target.path=/app/lib + sources: + - type: shell + commands: + - cp -r /usr/lib/sdk/freepascal/share/lazarus/lcl/interfaces/qt5/cbindings/. . + - name: LazPaint + sources: + - type: git + url: https://github.com/bgrabitmap/bgrabitmap.git + commit: f9748a37f5382b18d1cd197293d1032a522e8561 + dest: 'bgrabitmap' + - type: git + url: https://github.com/bgrabitmap/bgracontrols.git + commit: f5efbf8b79d0725d33b88c5bd41857d9139428bd + dest: 'bgracontrols' + - type: git + url: https://github.com/bgrabitmap/lazpaint.git + commit: 501d44c511fb49ca166dc0ec101305dddbf3aee6 + - 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 + build-commands: + - | + . /usr/lib/sdk/freepascal/enable.sh + lazbuild --build-mode=Release --ws=qt5 bgrabitmap/bgrabitmap/bgrabitmappack.lpk + lazbuild --build-mode=Release --ws=qt5 bgracontrols/bgracontrols.lpk + lazbuild --build-mode=Release --ws=qt5 lazpaintcontrols/lazpaintcontrols.lpk + lazbuild --build-mode=Release --ws=qt5 lazpaint/lazpaint.lpi + - install -Dm755 lazpaint/release/bin/lazpaint -t $FLATPAK_DEST/bin + - install -Dm644 lazpaint/release/debian/applications/lazpaint.desktop -t $FLATPAK_DEST/share/applications + - install -Dm644 resources/icon/256x256.png $FLATPAK_DEST/share/icons/hicolor/256x256/apps/lazpaint.png + - install -Dm644 lazpaint/release/bin/i18n/*.po -t $FLATPAK_DEST/share/lazpaint/i18n + - cp -r resources/scripts $FLATPAK_DEST/share/lazpaint + - cp -r lazpaint/release/bin/models $FLATPAK_DEST/share/lazpaint + - install -Dm644 Install/snap/local/lazpaint.xml $FLATPAK_DEST/share/mime/packages/$FLAPTAK_ID.xml + - install -Dm644 ${FLATPAK_ID}.metainfo.xml -t $FLATPAK_DEST/share/metainfo diff --git a/Install/flatpak/no-image-browser-by-default.patch b/Install/flatpak/no-image-browser-by-default.patch new file mode 100644 index 00000000..19d8345e --- /dev/null +++ b/Install/flatpak/no-image-browser-by-default.patch @@ -0,0 +1,13 @@ +diff --git a/lazpaint/uconfig.pas b/lazpaint/uconfig.pas +index ee16357..b13b491 100644 +--- a/lazpaint/uconfig.pas ++++ b/lazpaint/uconfig.pas +@@ -804,7 +804,7 @@ end; + + function TLazPaintConfig.DefaultUseImageBrowser: boolean; + begin +- result := iniOptions.ReadBool('General','UseImageBrowser',{$IFDEF DARWIN}false{$ELSE}true{$ENDIF}); ++ result := iniOptions.ReadBool('General','UseImageBrowser',{$IFDEF DARWIN}false{$ELSE}false{$ENDIF}); + end; + + procedure TLazPaintConfig.SetDefaultUseImageBrowser(value: boolean); diff --git a/Install/snap/local/build.sh b/Install/snap/local/build.sh index 99a1e1f8..bb78ccdb 100755 --- a/Install/snap/local/build.sh +++ b/Install/snap/local/build.sh @@ -3,7 +3,7 @@ ln -s Install/snap ../../../snap pushd ../../.. -snapcraft --debug --use-lxd +snapcraft --debug --use-lxd $@ popd rm ../../../snap diff --git a/Install/snap/snapcraft.yaml b/Install/snap/snapcraft.yaml index 89792f9f..7ee4079a 100644 --- a/Install/snap/snapcraft.yaml +++ b/Install/snap/snapcraft.yaml @@ -1,9 +1,46 @@ name: lazpaint title: LazPaint -version: '7.1.6' +version: '7.2.2' 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) + * Intensity : make colors lighter or darker without making them white + * Lightness : make colors lighter or darker by making them whiter + * Normalize : use the whole range of each color channel and alpha channel + * 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 + * Motion blur : directional blur + * Custom blur : blur according to a mask + * Sharpen : makes contours more accurate, complementary to Smooth + * Smooth : softens whole image, complementary to Sharpen + * Median : computes the median of colors around each pixel, which softens corners + * Contour : draws contours on a white background (like a pencil drawing) + * Emboss : draws contours with shadow + * 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. confinement: strict base: core20 grade: stable @@ -19,10 +56,10 @@ parts: - wget - libgtk2.0-dev override-build: | - wget -nc https://deac-ams.dl.sourceforge.net/project/lazarus/Lazarus%20Linux%20amd64%20DEB/Lazarus%202.0.12/lazarus-project_2.0.12-0_amd64.deb - wget -nc https://netix.dl.sourceforge.net/project/lazarus/Lazarus%20Linux%20amd64%20DEB/Lazarus%202.0.12/fpc-laz_3.2.0-1_amd64.deb - wget -nc https://netix.dl.sourceforge.net/project/lazarus/Lazarus%20Linux%20amd64%20DEB/Lazarus%202.0.12/fpc-src_3.2.0-1_amd64.deb - apt install ./lazarus-project_2.0.12-0_amd64.deb ./fpc-laz_3.2.0-1_amd64.deb ./fpc-src_3.2.0-1_amd64.deb + 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 prime: [-*] lazpaint: plugin: nil