Skip to content

Commit

Permalink
Add logo + bump version. Fixes #1
Browse files Browse the repository at this point in the history
  • Loading branch information
MikeMoolenaar committed Jan 9, 2024
1 parent 4f898ac commit a801252
Show file tree
Hide file tree
Showing 6 changed files with 33 additions and 25 deletions.
7 changes: 3 additions & 4 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on:
workflow_dispatch:
inputs:
version:
description: 'Version'
description: 'Version (example: "1.1")'
required: true
default: ''
env:
Expand All @@ -26,9 +26,9 @@ jobs:
- name: Build Windows
run: dotnet publish MkvDefaultTrackChanger/MkvDefaultTrackChanger.WinForms/MkvDefaultTrackChanger.WinForms.csproj --configuration Release -r win-x64 --self-contained true -p:PublishTrimmed=True -p:IncludeNativeLibrariesForSelfExtract=true -p:Version=${{ github.event.inputs.version }}
- name: Build Linux
run: dotnet publish MkvDefaultTrackChanger/MkvDefaultTrackChanger.Gtk/MkvDefaultTrackChanger.Gtk.csproj --configuration Release -r linux-x64 --self-contained true -p:PublishTrimmed=True -p:TrimMode=CopyUsed -p:Version=${{ github.event.inputs.version }}
run: dotnet publish MkvDefaultTrackChanger/MkvDefaultTrackChanger.Gtk/MkvDefaultTrackChanger.Gtk.csproj --configuration Release -r linux-x64 --self-contained true -p:PublishTrimmed=True -p:Version=${{ github.event.inputs.version }}
- name: Build Mac
run: dotnet publish MkvDefaultTrackChanger/MkvDefaultTrackChanger.Mac/MkvDefaultTrackChanger.Mac.csproj --configuration Release -r osx-x64 --self-contained true -p:Version=${{ github.event.inputs.version }}
run: dotnet publish MkvDefaultTrackChanger/MkvDefaultTrackChanger.Mac/MkvDefaultTrackChanger.Mac.csproj --configuration Release -r osx-x64 --self-contained true -p:PublishTrimmed=True -p:Version=${{ github.event.inputs.version }}
- name: Zip releases
run: |
powershell Rename-Item $env:PUBLISH_WIN_PATH/MkvDefaultTrackChanger.WinForms.exe MkvDefaultTrackChanger-V${{ github.event.inputs.version }}.exe
Expand All @@ -37,7 +37,6 @@ jobs:
powershell Compress-Archive $env:PUBLISH_LINUX_PATH/MkvDefaultTrackChanger-V${{ github.event.inputs.version }}.Gtk ./MkvDefaultTrackChanger-Linux-V${{ github.event.inputs.version }}.zip
powershell Rename-Item $env:PUBLISH_MAC_PATH/MkvDefaultTrackChanger.Mac.app ./MkvDefaultTrackChanger-V${{ github.event.inputs.version }}.Mac.app
powershell Compress-Archive $env:PUBLISH_MAC_PATH/MkvDefaultTrackChanger-V${{ github.event.inputs.version }}.Mac.app ./MkvDefaultTrackChanger-MacOS-V${{ github.event.inputs.version }}.zip
# TODO: Fix MacOS archive not working (it extracts to a folder instead of a .app file)
- name: Create Draft Release
id: create_release
uses: actions/create-release@v1
Expand Down
32 changes: 16 additions & 16 deletions MkvDefaultTrackChanger/MkvDefaultTrackChanger.Mac/Info.plist
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleName</key>
<string>MkvDefaultTrackChanger</string>
<key>CFBundleIdentifier</key>
<string>com.mikemoolenaar.MkvDefaultTrackChanger</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<key>LSMinimumSystemVersion</key>
<string>10.12</string>
<key>CFBundleDevelopmentRegion</key>
<string>en</string>
<key>NSHumanReadableCopyright</key>
<string></string>
<key>CFBundleIconFile</key>
<string>Icon.icns</string>
</dict>
<dict>
<key>CFBundleName</key>
<string>MkvDefaultTrackChanger</string>
<key>CFBundleIdentifier</key>
<string>com.mikemoolenaar.MkvDefaultTrackChanger</string>
<key>CFBundleShortVersionString</key>
<string>1.1</string>
<key>LSMinimumSystemVersion</key>
<string>10.12</string>
<key>CFBundleDevelopmentRegion</key>
<string>en</string>
<key>NSHumanReadableCopyright</key>
<string></string>
<key>CFBundleIconFile</key>
<string>Icon.icns</string>
</dict>
</plist>
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,9 @@ public class ErrorForm : Form
TextArea txaExceptionMessage;
private Label lblTitle;

public ErrorForm(Exception ex, string? mkvFileInfo)
public ErrorForm(Exception ex, string? mkvFileInfo, Icon icon)
{
Icon = icon;
XamlReader.Load(this);
txaExceptionMessage!.Text = new StringBuilder()
.Append(GetPlatformInfo())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
using System.Collections.Generic;
using System.IO;
using System.Linq;
using Eto.Drawing;
using Eto.Forms;
using Eto.Serialization.Xaml;
using MatroskaLib;
Expand All @@ -23,6 +24,7 @@ public class MainForm : Form

public MainForm()
{
Icon = Icon.FromResource("MkvDefaultTrackChanger.logo.ico");
XamlReader.Load(this);

fileDialog = new OpenFileDialog();
Expand Down Expand Up @@ -128,21 +130,20 @@ protected void HandleAbout(object sender, EventArgs e)
{
var aboutDialog = new AboutDialog
{
// TODO logo
// Logo =
Logo = Icon,
Website = new Uri("https://github.com/MikeMoolenaar/MkvDefaultTrackChanger"),
WebsiteLabel = "Github",
ProgramDescription =
"MkvDefaultTrackChanger is a small application to change the default subtitle and audio tracks in MKV video files. ",
License = @"Copyright (C) 2021 Mike Moolenaar
MkvDefaultTrackChanger is licensed under the terms of the GNU General Public License version 3. A copy of this license can be obtained from <https://www.gnu.org/licenses/gpl-3.0.html>.",
Developers = new[] { "Mike Moolenaar" }
Developers = ["Mike Moolenaar"]
};
aboutDialog.ShowDialog(this);
}

private void HandleException(Exception ex)
{
new ErrorForm(ex, mkvContainer?.ToString()).Show();
new ErrorForm(ex, mkvContainer?.ToString(), Icon).Show();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
<NoWarn>CS8618;CS0649</NoWarn>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<Nullable>enable</Nullable>
<Version>1.1.0</Version>
</PropertyGroup>

<ItemGroup>
Expand All @@ -16,4 +17,10 @@
<ProjectReference Include="../../MatroskaLib\MatroskaLib\MatroskaLib.csproj" />
</ItemGroup>

<ItemGroup>
<EmbeddedResource Include="logo.ico">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</EmbeddedResource>
</ItemGroup>

</Project>
Binary file not shown.

0 comments on commit a801252

Please sign in to comment.