Compare commits

..

3 Commits
v0.0.1 ... main

Author SHA1 Message Date
66a92e6838 Update dependency GitInfo to v3.5.0 (#7)
This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [GitInfo](https://clarius.org/GitInfo) ([source](https://github.com/devlooped/GitInfo)) | nuget | minor | `3.3.5` -> `3.5.0` |

---

### Release Notes

<details>
<summary>devlooped/GitInfo (GitInfo)</summary>

### [`v3.5.0`](https://github.com/devlooped/GitInfo/blob/HEAD/changelog.md#v350-2024-11-02)

[Full Changelog](https://github.com/devlooped/GitInfo/compare/v3.3.5...v3.5.0)

 Implemented enhancements:

-   Question: Why we use git log with format to get the Current commit? [#&#8203;355](https://github.com/devlooped/GitInfo/issues/355)
-   SetGitExe doesn't recognize VS Git locations [#&#8203;324](https://github.com/devlooped/GitInfo/issues/324)
-   Projects don't rebuild after committing [#&#8203;322](https://github.com/devlooped/GitInfo/issues/322)
-   New tag without version drop semver to zeros [#&#8203;319](https://github.com/devlooped/GitInfo/issues/319)
-   Add vswhere fallback to locate git provided by VS [#&#8203;372](https://github.com/devlooped/GitInfo/pull/372) ([@&#8203;kzu](https://github.com/kzu))
-   Simplify IsDirty with newer typed constants in ThisAssembly [#&#8203;368](https://github.com/devlooped/GitInfo/pull/368) ([@&#8203;kzu](https://github.com/kzu))
-   Allow opting-out of GitBranch default in CI [#&#8203;366](https://github.com/devlooped/GitInfo/pull/366) ([@&#8203;kzu](https://github.com/kzu))
-   Set default GitBranch from CI env variables [#&#8203;365](https://github.com/devlooped/GitInfo/pull/365) ([@&#8203;kzu](https://github.com/kzu))
-   Using simpler git command to get current commit [#&#8203;356](https://github.com/devlooped/GitInfo/pull/356) ([@&#8203;kzu](https://github.com/kzu))

🔨 Other:

-   Using GitInfo with Ncrunch [#&#8203;345](https://github.com/devlooped/GitInfo/issues/345)

🔀 Merged:

-   Adopt SL v2 via ThisAssembly.Constants and document in readme(s) [#&#8203;370](https://github.com/devlooped/GitInfo/pull/370) ([@&#8203;kzu](https://github.com/kzu))
-   \+Mᐁ includes [#&#8203;367](https://github.com/devlooped/GitInfo/pull/367) ([@&#8203;devlooped-bot](https://github.com/devlooped-bot))
-   \+Mᐁ includes [#&#8203;357](https://github.com/devlooped/GitInfo/pull/357) ([@&#8203;devlooped-bot](https://github.com/devlooped-bot))
-   Clean code [#&#8203;352](https://github.com/devlooped/GitInfo/pull/352) ([@&#8203;gitfool](https://github.com/gitfool))
-   Remove redundant depends on targets [#&#8203;346](https://github.com/devlooped/GitInfo/pull/346) ([@&#8203;gitfool](https://github.com/gitfool))
-   Fix fast up-to-date-check [#&#8203;343](https://github.com/devlooped/GitInfo/pull/343) ([@&#8203;gitfool](https://github.com/gitfool))
-   Disable rogue command echo [#&#8203;342](https://github.com/devlooped/GitInfo/pull/342) ([@&#8203;gitfool](https://github.com/gitfool))

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 **Automerge**: Enabled.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box

---

This PR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy40MjAuMSIsInVwZGF0ZWRJblZlciI6IjM3LjQyMC4xIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6W119-->

Reviewed-on: #7
Co-authored-by: Renovate Bot <renovate-bot@git.cantorgymnasium.de>
Co-committed-by: Renovate Bot <renovate-bot@git.cantorgymnasium.de>
2024-11-03 07:54:06 +01:00
088637ff5d
fix Linux build 2024-09-15 15:18:12 +02:00
23dc2d75e0 add Windows build readme 2024-09-15 15:03:19 +02:00
4 changed files with 33 additions and 22 deletions

@ -1,25 +1,10 @@
using SixLabors.ImageSharp;
using SixLabors.ImageSharp.Formats.Webp;
using SixLabors.ImageSharp.Processing;
using System.Runtime.InteropServices;
namespace Photomator;
public static class Lib {
const int SW_HIDE = 0;
const int SW_SHOW = 5;
readonly static IntPtr handle = GetConsoleWindow();
[DllImport("kernel32.dll")] static extern IntPtr GetConsoleWindow();
[DllImport("user32.dll")] static extern bool ShowWindow(IntPtr hWnd,int nCmdShow);
public static void HideConsole() {
ShowWindow(handle,SW_HIDE);
}
public static void ShowConsole() {
ShowWindow(handle,SW_SHOW);
}
public static async Task Convert(string src, string dest, ConvertOptions options) {
Image img = await Image.LoadAsync(src);
img.Mutate(i => {

@ -11,7 +11,7 @@
<ItemGroup>
<PackageReference Include="GirCore.Adw-1" Version="0.5.0" />
<PackageReference Include="GitInfo" Version="3.3.5">
<PackageReference Include="GitInfo" Version="3.5.0">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
@ -19,20 +19,27 @@
</ItemGroup>
<Target Name="PreBuild" BeforeTargets="PreBuildEvent">
<Message Text="=== Building Photomator $(GitTag)... ===" Importance="high" />
<RemoveDir Directories="$(PublishDir)" />
<Message Text="=== Compiling extra resources... ===" Importance="high" />
<Exec Command="glib-compile-resources --sourcedir ./Resources ./Resources/de.cantorgymnasium.Photomator.gresource.xml --target=$(OutDir)/de.cantorgymnasium.Photomator.gresource" />
</Target>
<Target Name="CopyFiles" AfterTargets="Publish" Condition="'$(RuntimeIdentifier)' == 'win-x64'">
<Message Text="=== Copying Gtk files for win-x64 runtime ... ===" Importance="high"/>
<Target Name="CopyFiles" AfterTargets="Publish">
<ItemGroup>
<SourceFiles Include="$(PublishDir)\**\*.*" />
<GtkDlls Include="libgtk-4-1.dll;libadwaita-1-0.dll;libappstream-5.dll;libbrotlicommon.dll;libbrotlidec.dll;libbz2-1.dll;libcairo-2.dll;libcairo-gobject-2.dll;libcairo-script-interpreter-2.dll;libcrypto-3-x64.dll;libcurl-4.dll;libdatrie-1.dll;libdeflate.dll;libepoxy-0.dll;libexpat-1.dll;libffi-8.dll;libfontconfig-1.dll;libfreetype-6.dll;libfribidi-0.dll;libgcc_s_seh-1.dll;libgdk_pixbuf-2.0-0.dll;libgio-2.0-0.dll;libglib-2.0-0.dll;libgmodule-2.0-0.dll;libgobject-2.0-0.dll;libgraphene-1.0-0.dll;libgraphite2.dll;libharfbuzz-0.dll;libharfbuzz-gobject-0.dll;libiconv-2.dll;libidn2-0.dll;libintl-8.dll;libjbig-0.dll;libjpeg-8.dll;libLerc.dll;liblzma-5.dll;liblzo2-2.dll;libnghttp2-14.dll;libnghttp3-9.dll;libpango-1.0-0.dll;libpangocairo-1.0-0.dll;libpangoft2-1.0-0.dll;libpangowin32-1.0-0.dll;libpcre2-8-0.dll;libpixman-1-0.dll;libpng16-16.dll;libpsl-5.dll;librsvg-2-2.dll;libsharpyuv-0.dll;libssh2-1.dll;libssl-3-x64.dll;libstdc++-6.dll;libthai-0.dll;libtiff-6.dll;libunistring-5.dll;libwebp-7.dll;libwinpthread-1.dll;libxml2-2.dll;libxmlb-2.dll;libyaml-0-2.dll;libzstd.dll;zlib1.dll;gdbus.exe"/>
<Icons Include="C:\msys64\mingw64\share\icons\**\*.*" />
</ItemGroup>
<Move SourceFiles="@(SourceFiles)" DestinationFolder="$(PublishDir)\bin" />
<Copy SourceFiles="$(OutDir)/de.cantorgymnasium.Photomator.gresource" DestinationFolder="$(PublishDir)\share\de.cantorgymnasium.Photomator" />
</Target>
<Target Name="CopyFilesWindows" AfterTargets="Publish" Condition="'$(RuntimeIdentifier)' == 'win-x64'">
<Message Text="=== Copying Gtk files for win-x64 runtime ... ===" Importance="high"/>
<ItemGroup>
<GtkDlls Include="libgtk-4-1.dll;libadwaita-1-0.dll;libappstream-5.dll;libbrotlicommon.dll;libbrotlidec.dll;libbz2-1.dll;libcairo-2.dll;libcairo-gobject-2.dll;libcairo-script-interpreter-2.dll;libcrypto-3-x64.dll;libcurl-4.dll;libdatrie-1.dll;libdeflate.dll;libepoxy-0.dll;libexpat-1.dll;libffi-8.dll;libfontconfig-1.dll;libfreetype-6.dll;libfribidi-0.dll;libgcc_s_seh-1.dll;libgdk_pixbuf-2.0-0.dll;libgio-2.0-0.dll;libglib-2.0-0.dll;libgmodule-2.0-0.dll;libgobject-2.0-0.dll;libgraphene-1.0-0.dll;libgraphite2.dll;libharfbuzz-0.dll;libharfbuzz-gobject-0.dll;libiconv-2.dll;libidn2-0.dll;libintl-8.dll;libjbig-0.dll;libjpeg-8.dll;libLerc.dll;liblzma-5.dll;liblzo2-2.dll;libnghttp2-14.dll;libnghttp3-9.dll;libpango-1.0-0.dll;libpangocairo-1.0-0.dll;libpangoft2-1.0-0.dll;libpangowin32-1.0-0.dll;libpcre2-8-0.dll;libpixman-1-0.dll;libpng16-16.dll;libpsl-5.dll;librsvg-2-2.dll;libsharpyuv-0.dll;libssh2-1.dll;libssl-3-x64.dll;libstdc++-6.dll;libthai-0.dll;libtiff-6.dll;libunistring-5.dll;libwebp-7.dll;libwinpthread-1.dll;libxml2-2.dll;libxmlb-2.dll;libyaml-0-2.dll;libzstd.dll;zlib1.dll;gdbus.exe"/>
<Icons Include="C:\msys64\mingw64\share\icons\**\*.*" />
</ItemGroup>
<Copy SourceFiles="@(GtkDlls->'C:\msys64\mingw64\bin\%(Filename)%(Extension)')" DestinationFolder="$(PublishDir)\bin" />
<Copy SourceFiles="C:\msys64\mingw64\lib\gdk-pixbuf-2.0\2.10.0\loaders\libpixbufloader-svg.dll" DestinationFolder="$(PublishDir)\lib\gdk-pixbuf-2.0\2.10.0\loaders" />
<Copy SourceFiles=".\Resources\loaders.cache" DestinationFolder="$(PublishDir)\lib\gdk-pixbuf-2.0\2.10.0" />

@ -11,7 +11,6 @@ public partial class Program {
public static int Main() => new Program().Run();
public Program() {
Lib.HideConsole();
_application = Adw.Application.New("de.cantorgymnasium.Photomator", Gio.ApplicationFlags.FlagsNone);
Gtk.Window.SetDefaultIconName("de.cantorgymnasium.Photomator");
string localPath = Path.GetFullPath(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location)!) + "/de.cantorgymnasium.Photomator.gresource";

@ -1,3 +1,23 @@
# Photomator
Desktop-Anwendung zum Konvertieren und Schrumpfen von Bildern für die Verwendung im Web.
## Build
### Windows
- install msys2 (mingw-w64) -> libadwaita, gtk4, libwebp
- install .NET 8.0
- install Git for Windows
- add .NET 8.0 and mingw-w64 to PATH
```powershell
git clone https://git.cantorgymnasium.de/gcg/photomator
cd photomator/Photomator
dotnet restore
dotnet publish -r win-x64
```
The installer will be located under `Photomator\bin\Release\net8.0\win-x64\publish`.