-
-
Notifications
You must be signed in to change notification settings - Fork 58
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #592 from chronoscz/master
Added flatpak packaging files and updated snap files
- Loading branch information
Showing
8 changed files
with
407 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
From 11b9c647dd96edaf4a3240a3683493fb37a0e0e0 Mon Sep 17 00:00:00 2001 | ||
From: Johann ELSASS <circular@operamail.com> | ||
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 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
From d73455025d71226472e7eb880da36f6fb85c5df0 Mon Sep 17 00:00:00 2001 | ||
From: Johann ELSASS <circular@fastmail.com> | ||
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 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
186 changes: 186 additions & 0 deletions
186
Install/flatpak/io.github.bgrabitmap.LazPaint.metainfo.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,186 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<component type="desktop-application"> | ||
<id>io.github.bgrabitmap.LazPaint</id> | ||
|
||
<name>LazPaint</name> | ||
<summary>Fast raster image editor</summary> | ||
<developer id="io.github.bgrabitmap"> | ||
<name>BGRABitmap team</name> | ||
</developer> | ||
|
||
<url type="homepage">https://wiki.freepascal.org/LazPaint</url> | ||
<url type="vcs-browser">https://github.com/bgrabitmap/lazpaint</url> | ||
<url type="donation">http://sourceforge.net/donate/index.php?group_id=404555</url> | ||
<url type="bugtracker">https://github.com/bgrabitmap/lazpaint/issues</url> | ||
<url type="translate">https://github.com/bgrabitmap/lazpaint/tree/master/lazpaint/release/bin/i18n</url> | ||
|
||
<metadata_license>CC0-1.0</metadata_license> | ||
<project_license>GPL-3.0-only</project_license> | ||
|
||
<description> | ||
<p>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.</p> | ||
|
||
<p>Features:</p> | ||
<ul> | ||
<li>Files: read and write a variety of file formats, including layered bitmaps and 3D files.</li> | ||
<li>Tools: many tools are available to draw on the layers.</li> | ||
<li>Edit/Select: select parts of an image with antialiasing and modify the selection as a mask.</li> | ||
<li>View: color window, layer stack window and toolbox window.</li> | ||
<li>Command line: call LazPaint from a console.</li> | ||
</ul> | ||
|
||
<p>Image manipulation:</p> | ||
<ul> | ||
<li>An image can be resampled, flipped horizontally and vertically.</li> | ||
<li>Smart zoom x3 : resize the image x3 and detects borders; this provides a useful zoom with ancient games sprites.</li> | ||
</ul> | ||
|
||
<p>Color manipulation:</p> | ||
<ul> | ||
<li>Colorize : set the color of an image while preserving intensities</li> | ||
<li>Shift colors : cycle colors and change colorness (saturation)</li> | ||
<li>Intensity : make colors lighter or darker without making them white</li> | ||
<li>Lightness : make colors lighter or darker by making them whiter</li> | ||
<li>Normalize : use the whole range of each color channel and alpha channel</li> | ||
<li>Negative : invert colors (with gamma correction)</li> | ||
<li>Linear negative : invert colors (without gamma correction)</li> | ||
<li>Grayscale : converts colors to grayscale with gamma correction</li> | ||
</ul> | ||
|
||
<p>Filters: | ||
Filters can be applied to the whole image or to the active selection. | ||
</p> | ||
<ul> | ||
<li>Radial blur : non directional blur</li> | ||
<li>Motion blur : directional blur</li> | ||
<li>Custom blur : blur according to a mask</li> | ||
<li>Sharpen : makes contours more accurate, complementary to Smooth</li> | ||
<li>Smooth : softens whole image, complementary to Sharpen</li> | ||
<li>Median : computes the median of colors around each pixel, which softens corners</li> | ||
<li>Contour : draws contours on a white background (like a pencil drawing)</li> | ||
<li>Emboss : draws contours with shadow</li> | ||
<li>Sphere : spherical projection</li> | ||
<li>Cylinder : cylinder projection</li> | ||
<li>Clouds : add clouds of the current pen color</li> | ||
<li>Scripts: scripts are provided to do layer effects. You can as well write your own Python scripts. </li> | ||
</ul> | ||
</description> | ||
|
||
<launchable type="desktop-id">io.github.bgrabitmap.LazPaint.desktop</launchable> | ||
|
||
<branding> | ||
<color type="primary" scheme_preference="light">#dc8add</color> | ||
<color type="primary" scheme_preference="dark">#613583</color> | ||
</branding> | ||
|
||
<screenshots> | ||
<screenshot type="default"> | ||
<caption>Light theme</caption> | ||
<image>https://wiki.freepascal.org/images/a/a3/lazpaint_pallete.jpg</image> | ||
</screenshot> | ||
<screenshot> | ||
<caption>Dark theme</caption> | ||
<image>https://wiki.freepascal.org/images/1/17/lazpaint_pallete_dark.jpg</image> | ||
</screenshot> | ||
</screenshots> | ||
|
||
<releases> | ||
<release version="7.2.2" date="2022-08-23"> | ||
<url type="details">https://github.com/bgrabitmap/lazpaint/releases/tag/v7.2.2</url> | ||
<description> | ||
<ul> | ||
<li>Completed Czech translation</li> | ||
<li>Compilation fixes for Debian and legacy LCL</li> | ||
<li>Linux shortcut: specify file parameter</li> | ||
</ul> | ||
</description> | ||
</release> | ||
<release version="7.2.1" date="2022-08-21"> | ||
<url type="details">https://github.com/bgrabitmap/lazpaint/releases/tag/v7.2.1</url> | ||
<description> | ||
<ul> | ||
<li>adapt quick save shortcut on MacOS</li> | ||
<li>translations : German, Portuguese, Chinese, Dutch, Spanish</li> | ||
<li>added "screenshot" command line</li> | ||
<li>libavif dll</li> | ||
<li>multi click on text (#266)</li> | ||
<li>fix in Python scripting (dialog.py)</li> | ||
<li>added "-editor" parameter</li> | ||
</ul> | ||
</description> | ||
</release> | ||
<release version="7.2" date="2022-08-06"> | ||
<url type="details">https://github.com/bgrabitmap/lazpaint/releases/tag/v7.2</url> | ||
<description> | ||
<ul> | ||
<li>MacOS: handle right-click on layerstack</li> | ||
<li>MacOS: fixed light theme interface</li> | ||
<li>MacOS: avoid key binding conflict with CMD-H</li> | ||
<li>interface: handle cancel language or icon size change</li> | ||
<li>interface: restore main form after embedded editor</li> | ||
<li>interface: restore selection tool after delete</li> | ||
<li>interface: fix shift-arrows in file list</li> | ||
<li>interface: handle right click on switch color button</li> | ||
<li>interface: remember docked toolbox visibility</li> | ||
<li>interface: center on zoom fit</li> | ||
<li>interface: less margin to select outside of color circle</li> | ||
<li>interface: tooltip on arrow start/end</li> | ||
<li>interface: show hotkey in toolbar</li> | ||
<li>interface: update workspace when resizing/rotating</li> | ||
<li>interface: handle keys in embedded editors</li> | ||
<li>interface: prevent ALT key from opening menu</li> | ||
<li>interface: handle ALT-wheel only when applicable</li> | ||
<li>interface: keep fill options visible when changing opacity</li> | ||
<li>layer stack: tooltip for visible and opacity controls</li> | ||
<li>blend mode: removed horizontal scrollbar in blend mode lists</li> | ||
<li>language: tool shortcuts for Cyrillic keyboard</li> | ||
<li>language: translation of color description</li> | ||
<li>language: completed Russian translation</li> | ||
<li>file: prevent saving incorrect filename</li> | ||
<li>file: handle path in file textbox</li> | ||
<li>file: generate new filename with number</li> | ||
<li>file: added quick save action (Ctlr-Q shortcut)</li> | ||
<li>file: overwrite prompt when saving palette</li> | ||
<li>file: experimental support for AVIF format</li> | ||
<li>file: show save prompt when drag'n'drop image to the program</li> | ||
<li>file: save CUR and ICO with command line</li> | ||
<li>SVG: close path when export as SVG</li> | ||
<li>SVG: fixed RTL text export</li> | ||
<li>new file: better handling of ratios</li> | ||
<li>motion blur: fixed sticky mouse click</li> | ||
<li>canvas size: restrict percent to max accepted size</li> | ||
<li>tools: update shape when pressing/releasing SHIFT key</li> | ||
<li>tools: ignore 0 alpha with solid colors</li> | ||
<li>tools: improved hints timing</li> | ||
<li>tools: disambiguation of shortcut keys (Y, K, F and R)</li> | ||
<li>deformation grid tool: handle extreme deformation</li> | ||
<li>déformation grid tool: ESCAPE to exit tool</li> | ||
<li>layer perspective tool: change cursor when hovering points</li> | ||
<li>layer tools: delete current layer with DELETE key</li> | ||
<li>rectangle tool: fixed bug when changing join type</li> | ||
<li>text tool: update when change antialiasing</li> | ||
<li>text tool: provide text style, bidi mode, vertical alignment in toolbar</li> | ||
<li>text tool: allow travel mode with space</li> | ||
<li>text tool: display flipped text</li> | ||
<li>vector tools: avoid error after rasterizing</li> | ||
<li>polygon/closed curve tools: hide center point when ALT key pressed</li> | ||
<li>polyline/opened curve tool: don't reopen shape</li> | ||
<li>poly tools: added RIGHT-click hint</li> | ||
<li>selection tools: deselect when ESCAPE pressed and selection layer empty</li> | ||
<li>selection tools: keep selection mode after undo/redo</li> | ||
<li>rectangle selection tool: include ratio of current image</li> | ||
<li>selection pen: show circular cursor</li> | ||
<li>filter: added negative angle for twirl</li> | ||
<li>script: ignore some Python errors</li> | ||
</ul> | ||
</description> | ||
</release> | ||
</releases> | ||
|
||
<categories> | ||
<category>Graphics</category> | ||
</categories> | ||
|
||
<content_rating type="oars-1.1"/> | ||
</component> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.