Pinta icon indicating copy to clipboard operation
Pinta copied to clipboard

Build Pinta for Ubuntu using a Dockerfile

Open stdedos opened this issue 3 years ago • 2 comments

Signed-off-by: Stavros Ntentos [email protected]

stdedos avatar May 08 '22 13:05 stdedos

Hello @cameronwhite from the other side.

So, here's where I've gotten so far. Extracting /app/, and running app/Pinta "works like a charm". I am not sure, however, if the change I've done so far.

However however, I am not sure how to package it now. There might be "a way" to do it, using https://github.com/quamotion/dotnet-packaging and:

diff --git a/Dockerfile b/Dockerfile
index e27045ab..b543aab8 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -35,4 +35,4 @@ RUN make
 # -p:PublishReadyToRun=true
 # # Causes Unhandled exception. System.TypeLoadException: Could not load type 'System.Collections.ObjectModel.KeyedCollection`2' from assembly 'System.ObjectModel, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'.
 # -p:PublishTrimmed=true
-RUN dotnet publish -c release -o /app --no-restore --runtime linux-x64 --self-contained
+RUN dotnet publish -c release -o /app --no-restore --runtime linux-x64 --self-contained /t:CreateRpm /t:CreateDeb
diff --git a/Pinta/Pinta.csproj b/Pinta/Pinta.csproj
index 678b4ca7..e012540d 100644
--- a/Pinta/Pinta.csproj
+++ b/Pinta/Pinta.csproj
@@ -17,6 +17,9 @@
   <ItemGroup>
     <PackageReference Include="GtkSharp" Version="3.24.24.34" />
     <PackageReference Include="Tmds.DBus" Version="0.10.1" />
+    <PackageReference Include="Packaging.Targets" Version="0.1.1-*" />
+    <DotNetCliToolReference Include="dotnet-deb" Version="0.1.1-*" />
+    <DotNetCliToolReference Include="dotnet-rpm" Version="0.1.1-*" />
   </ItemGroup>
 
   <ItemGroup>

but I am not sure how to "make this work" yet. Any ideas?

stdedos avatar May 08 '22 13:05 stdedos

Thanks for looking at this!

I'm not sure if the dotnet-deb stuff will be sufficient - there are a lot of other things like icons, .desktop files etc that are separate from the dotnet publish step. So probably the better approach would be to add some sort of configure option to adjust the behaviour of https://github.com/PintaProject/Pinta/blob/e26e7272de4de6431abe6b3c70b93cb89428dd85/Makefile.am#L92 to produce a self-contained binary from the normal make install step, or instead require having the dotnet-runtime package installed Then I think the normal Debian build tools (https://www.debian.org/doc/manuals/maint-guide/build.en.html) might be able to work for building the .deb package.

cameronwhite avatar May 08 '22 16:05 cameronwhite

would have been cool if this PR was finished up -- would help folks to try pinta

yarikoptic avatar May 31 '23 16:05 yarikoptic

There was recently some third-party work on packaging Pinta for Ubuntu at https://xtradeb.net/apps/pinta/ , so you could give that a try

cameronwhite avatar May 31 '23 22:05 cameronwhite

Closing old pull requests - the previously-mentioned PPA should work for installing Pinta as a .deb package

cameronwhite avatar Feb 27 '24 03:02 cameronwhite