2
0
Эх сурвалжийг харах

Merge pull request #1205 from PixiEditor/flatpak

Flatpak related things + simplified build process
Krzysztof Krysiński 3 долоо хоног өмнө
parent
commit
20b724293d

BIN
assets/flatpak/icon-512.png


+ 14 - 0
assets/flatpak/net.pixieditor.PixiEditor-mime.xml

@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+SPDX-License-Identifier: GPL-3.0-or-later
+-->
+<mime-info xmlns="http://www.freedesktop.org/standards/shared-mime-info">
+
+  <!-- Native Pixi format -->
+  <mime-type type="application/x-pixi">
+    <comment>Pixi Project File</comment>
+    <generic-icon name="application-x-pixi"/>
+    <glob pattern="*.pixi"/>
+  </mime-type>
+</mime-info>
+

+ 13 - 0
assets/flatpak/net.pixieditor.PixiEditor.desktop

@@ -0,0 +1,13 @@
+[Desktop Entry]
+Name=PixiEditor
+Comment=PixiEditor is all-in-one solution for 2D image editing.
+Icon=net.pixieditor.PixiEditor
+Exec=pixieditor.sh %u
+StartupWMClass=pixieditor
+Terminal=false
+Type=Application
+Categories=Graphics;2DGraphics;RasterGraphics;VectorGraphics
+MimeType=application/x-pixi;image/jpeg;image/png;image/gif;image/bmp;image/webp;image/svg+xml;font/otf;font/ttf;x-scheme-handler/lospec-palette;
+GenericName=2D Editor
+SingleMainWindow=true
+Keywords=editor;image;2d;graphics;design;vector;raster;

+ 81 - 0
assets/flatpak/net.pixieditor.PixiEditor.metainfo.xml

@@ -0,0 +1,81 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- Copyright 2025 Krzysztof Krysiński -->
+<component type="desktop-application">
+  <id>net.pixieditor.PixiEditor</id>
+  
+  <name>PixiEditor</name>
+  <summary>Universal node-based 2D editor</summary>
+  
+  <metadata_license>CC-BY-SA-4.0</metadata_license>
+  <project_license>LGPL-3.0-or-later</project_license>
+
+  <developer id="net.pixieditor">
+    <name>PixiEditor</name>
+  </developer>
+
+  <requires>
+    <control>keyboard</control>
+    <control>pointing</control>
+    <display_length compare="ge">768</display_length>
+  </requires>
+
+  <url type="homepage">https://pixieditor.net</url>
+  <url type="bugtracker">https://github.com/PixiEditor/PixiEditor/issues</url>
+  <url type="donation">https://pixieditor.net/download</url>
+  <url type="contact">https://pixieditor.net/help</url>
+  <url type="faq">https://pixieditor.net/docs/faq</url>
+  <url type="contribute">https://github.com/PixiEditor/PixiEditor</url>
+  <url type="vcs-browser">https://github.com/PixiEditor/PixiEditor</url>
+
+  <icon type="stock">net.pixieditor.PixiEditor</icon>
+
+  <branding>
+    <color type="primary" scheme_preference="light">#dedede</color>
+    <color type="primary" scheme_preference="dark">#1a1a1a</color>
+  </branding>
+
+  <content_rating type="oars-1.1" />
+
+  <releases>
+    <release version="2.0.1.4" date="2025-09-10">
+      <url type="details">https://forum.pixieditor.net/t/changelog-2-0-1-14/439/1</url>
+      <description>
+        <p>Fixed rectangle rendering issues</p>
+      </description>      
+    </release>
+  </releases>
+  
+  <description>
+    <p>
+	PixiEditor is a universal 2D editor designed for all kinds of creative work. Whether you want to make game sprites, paint illustrations, design logos, edit images, or create animations, PixiEditor gives you the tools to bring your ideas to life—all in a clean and familiar interface.
+    </p>
+    <p>
+	Powered by a Node Graph for advanced, non-destructive editing, PixiEditor comes with three unique toolsets that can be used together on the same canvas:
+    </p>
+    <p>
+	Pixel Art – pixel-perfect drawing tools for sprites and retro graphics
+	Painting – soft brushes, smooth lines, and anti-aliased shapes
+		    Vector – scalable paths and shapes for logos and clean designs
+    </p>
+  </description>
+  
+  <launchable type="desktop-id">net.pixieditor.PixiEditor.desktop</launchable>
+  <screenshots>
+    <screenshot type="default">
+	    <image>https://raw.githubusercontent.com/pixieditor/pixieditor/refs/heads/flatpak/assets/flatpak/screenshots/anim.png</image>
+	    <caption>Frame-by-frame animation with onion skinning</caption>
+    </screenshot>
+    <screenshot>
+	    <image>https://raw.githubusercontent.com/pixieditor/pixieditor/refs/heads/flatpak/assets/flatpak/screenshots/graph.png</image>
+	    <caption>Procedurally generated islands</caption>
+    </screenshot>
+    <screenshot>
+	    <image>https://raw.githubusercontent.com/pixieditor/pixieditor/refs/heads/flatpak/assets/flatpak/screenshots/palettes.png</image>
+	    <caption>Palette browser</caption>
+    </screenshot>
+    <screenshot>
+	    <image>https://raw.githubusercontent.com/pixieditor/pixieditor/refs/heads/flatpak/assets/flatpak/screenshots/vector.png</image>
+	    <caption>Vectors editing tools</caption>
+    </screenshot>
+  </screenshots>
+</component>

BIN
assets/flatpak/screenshots/anim.png


BIN
assets/flatpak/screenshots/graph.png


BIN
assets/flatpak/screenshots/palettes.png


BIN
assets/flatpak/screenshots/vector.png


+ 8 - 14
src/PixiEditor.AnimationRenderer.FFmpeg/FFMpegRenderer.cs

@@ -33,7 +33,10 @@ public class FFMpegRenderer : IAnimationRenderer
             MakeExecutableIfNeeded(binaryPath);
         }
 
-        string paletteTempPath = Path.Combine(Path.GetDirectoryName(outputPath), "RenderTemp", "palette.png");
+        string tempPath = Path.Combine(Path.GetTempPath(), "PixiEditor", "Rendering");
+        Directory.CreateDirectory(tempPath);
+
+        string paletteTempPath = Path.Combine(tempPath, "palette.png");
 
         try
         {
@@ -46,12 +49,6 @@ public class FFMpegRenderer : IAnimationRenderer
 
             RawVideoPipeSource streamPipeSource = new(frames) { FrameRate = FrameRate, };
 
-
-            if (!Directory.Exists(Path.GetDirectoryName(paletteTempPath)))
-            {
-                Directory.CreateDirectory(Path.GetDirectoryName(paletteTempPath));
-            }
-
             if (RequiresPaletteGeneration())
             {
                 GeneratePalette(streamPipeSource, paletteTempPath);
@@ -98,7 +95,10 @@ public class FFMpegRenderer : IAnimationRenderer
             MakeExecutableIfNeeded(binaryPath);
         }
 
-        string paletteTempPath = Path.Combine(Path.GetDirectoryName(outputPath), "RenderTemp", "palette.png");
+        string tempPath = Path.Combine(Path.GetTempPath(), "PixiEditor", "Rendering");
+        Directory.CreateDirectory(tempPath);
+
+        string paletteTempPath = Path.Combine(tempPath, "palette.png");
 
         try
         {
@@ -111,12 +111,6 @@ public class FFMpegRenderer : IAnimationRenderer
 
             RawVideoPipeSource streamPipeSource = new(frames) { FrameRate = FrameRate, };
 
-
-            if (!Directory.Exists(Path.GetDirectoryName(paletteTempPath)))
-            {
-                Directory.CreateDirectory(Path.GetDirectoryName(paletteTempPath));
-            }
-
             if (RequiresPaletteGeneration())
             {
                 GeneratePalette(streamPipeSource, paletteTempPath);

+ 6 - 12
src/PixiEditor.Extensions.CommonApi/PixiEditor.Extensions.CommonApi.csproj

@@ -24,7 +24,7 @@
     <PropertyGroup>
       <ProtogenExists>false</ProtogenExists>
     </PropertyGroup>
-    <Exec Command="dotnet tool run protogen --version" IgnoreExitCode="true">
+    <Exec ContinueOnError="true" Command="dotnet tool run protogen --version" IgnoreExitCode="true">
       <Output TaskParameter="ExitCode" PropertyName="ProtogenExitCode"/>
     </Exec>
     <PropertyGroup>
@@ -32,21 +32,15 @@
     </PropertyGroup>
   </Target>
 
-  <Target Name="InstallProtogen" BeforeTargets="GenerateProtoContracts"
+  <Target Name="WarnProtogen" BeforeTargets="GenerateProtoContracts"
           Condition="'$(ProtogenExists)' != 'true'">
-    <Message Text="Downloading protogen v$(ProtogenVersion)..." Importance="high"/>
-    <Exec Command="dotnet tool install --local protobuf-net.Protogen --version $(ProtogenVersion)"/>
-    <PropertyGroup>
-      <ProtogenExists>true</ProtogenExists>
-    </PropertyGroup>
-
-    <Message Text="protogen installed successfully." Importance="high"/>
+    <Message Text="protogen is not installed. Skipping generating contracts" Importance="high"/>
   </Target>
 
-
   <Target Name="GenerateProtoContracts" BeforeTargets="BeforeCompile"
-          Inputs="$(MSBuildProjectDirectory)\DataContracts\*.proto"
-          Outputs="$(MSBuildProjectDirectory)\ProtoAutogen\*.cs">
+          Condition="'$(ProtogenExists)' == 'true'"
+    Inputs="$(MSBuildProjectDirectory)\DataContracts\*.proto"
+    Outputs="$(MSBuildProjectDirectory)\ProtoAutogen\*.cs">
     <Exec Command="dotnet tool run protogen --csharp_out=ProtoAutogen --proto_path=DataContracts +listset=yes *.proto"/>
 
     <ItemGroup>