Skip to content

Commit

Permalink
1.0.7 Change project structure and check for updates (#11)
Browse files Browse the repository at this point in the history
* Version 1.0.6, improve patching experience

* Publish windows as single application (only works on windows host)

* Add update checking and cleanup imports, resetting settings to default won't overwrite saved settings automatically

* Change project structure

* Version 1.0.7, add minimum window sizes to dialogs
  • Loading branch information
dan0v authored Feb 26, 2021
1 parent 66a4c2a commit d65c37a
Show file tree
Hide file tree
Showing 20 changed files with 1,410 additions and 1,299 deletions.
520 changes: 258 additions & 262 deletions Options.cs → Helpers/Options.cs

Large diffs are not rendered by default.

668 changes: 334 additions & 334 deletions PatchCreator.cs → Helpers/PatchCreator.cs

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion Publish/Linux/Appimage.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ limitations under the License.

ORIGIN="$(pwd)"
cd "../.."
dotnet publish --configuration Release --framework netcoreapp3.1 -r linux-x64 /p:PublishTrimmed=true -o bin/Release/netcoreapp3.1/publishLinux
dotnet publish --configuration Release --framework netcoreapp3.1 -r linux-x64 --self-contained true /p:PublishTrimmed=true -o bin/Release/netcoreapp3.1/publishLinux
cd "$ORIGIN"

APP_NAME="xDelta3 Cross GUI"
Expand Down
2 changes: 1 addition & 1 deletion Publish/Linux/LooseLinux.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ limitations under the License.

ORIGIN="$(pwd)"
cd "../.."
dotnet publish --configuration Release --framework netcoreapp3.1 -r linux-x64 /p:PublishTrimmed=true -o bin/Release/netcoreapp3.1/publishLinux
dotnet publish --configuration Release --framework netcoreapp3.1 -r linux-x64 --self-contained true /p:PublishTrimmed=true -o bin/Release/netcoreapp3.1/publishLinux
cd "$ORIGIN"

APP_NAME="xDelta3 Cross GUI"
Expand Down
2 changes: 1 addition & 1 deletion Publish/MacOS/MacOS.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ limitations under the License.

ORIGIN="$(pwd)"
cd "../.."
dotnet publish --configuration Release --framework netcoreapp3.1 -r osx-x64 /p:PublishTrimmed=true -o bin/Release/netcoreapp3.1/publishMac
dotnet publish --configuration Release --framework netcoreapp3.1 -r osx-x64 --self-contained true /p:PublishTrimmed=true -o bin/Release/netcoreapp3.1/publishMac
cd "$ORIGIN"

APP_NAME="xDelta3 Cross GUI.app"
Expand Down
2 changes: 1 addition & 1 deletion Publish/Windows/Windows.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ limitations under the License.

ORIGIN="$(pwd)"
cd "../.."
dotnet publish --configuration Release --framework netcoreapp3.1 -r win-x86 /p:PublishTrimmed=true -o bin/Release/netcoreapp3.1/publishWin
dotnet publish --configuration Release --framework netcoreapp3.1 -r win-x86 --self-contained true /p:CopyOutputSymbolsToPublishDirectory=false /p:PublishTrimmed=true -p:PublishSingleFile=true -o bin/Release/netcoreapp3.1/publishWin
cd "$ORIGIN"

APP_NAME="xDelta3 Cross GUI"
Expand Down
15 changes: 1 addition & 14 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,28 +21,15 @@ A cross-platform GUI for creating xDelta3 patches, inspired by [Moodkiller/xdelt
2. Run executable (`xdelta3_cross_gui.exe`)

### Linux *(x86_64)*
#### Use AppImage for a packaged, native experience
1. *Optionally install [AppImageLauncher](https://github.com/TheAssassin/AppImageLauncher) to integrate xDelta3 Cross Gui into your desktop environment*
1. *Optionally install [AppImageLauncher](https://github.com/TheAssassin/AppImageLauncher) to integrate xDelta3 Cross GUI into your desktop environment*
2. Download and unzip [latest Linux AppImage build](https://github.com/dan0v/xdelta3-cross-gui/releases/latest/) from the Releases page
3. Mark `xDelta3_Cross_Gui-x86_64.AppImage` as executable (`chmod 755 xDelta3_Cross_Gui-x86_64.AppImage`)
4. Run executable (`xDelta3_Cross_Gui-x86_64.AppImage`)

#### Or use the unpackaged version
1. Download and unzip [latest Linux build](https://github.com/dan0v/xdelta3-cross-gui/releases/latest/) from the Releases page
2. Run executable (`xdelta3_cross_gui`)

### Mac *(x86_64)*
1. Download and unzip [latest MacOS build](https://github.com/dan0v/xdelta3-cross-gui/releases/latest/) from the Releases page
2. Run (`xDelta3 Cross GUI.app`)

#### Optionally use your own builds of xDelta3
You may provide your own builds of xDelta3, instead of using the included versions, by replacing the binaries in the locations shown below with files with the same names, or including your own build in your System Path, with the name `xdelta3`.

- *Windows -* unavailable
- *Linux AppImage -* unavailable
- *Linux unpackaged -* `Assets/exec`
- *Mac -* `Contents/MacOS/Assets/exec`

## Screenshots
![GitHub Logo](Extra%20Resources/Progress-demo.png)

Expand Down
Original file line number Diff line number Diff line change
@@ -1,32 +1,32 @@
<!--Copyright 2020-2021 dan0v
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.-->

<UserControl xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
x:Class="xdelta3_cross_gui.PathFileComponent"
DataContext="{Binding RelativeSource={RelativeSource Self}}">

<Grid ColumnDefinitions="30,25,*" Height="26">
<Border Grid.Column="0" BorderBrush="Black" BorderThickness="0.5,0,0.5,0.5">
<CheckBox x:Name="chk_IsChecked" Margin="5,0,5,0" IsChecked="{Binding IsSelected, Mode=TwoWay}"></CheckBox>
</Border>
<Border Grid.Column="1" BorderBrush="Black" BorderThickness="0,0.5,0.5,0.5">
<TextBlock x:Name="txt_blk_Index" Text="{Binding Index}" HorizontalAlignment="Center" VerticalAlignment="Center">0</TextBlock>
</Border>
<TextBox x:Name="txt_bx_Path" Grid.Column="2" IsReadOnly="True" MinWidth="0"></TextBox>
</Grid>
</UserControl>
<!--Copyright 2020-2021 dan0v
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.-->

<UserControl xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
x:Class="xdelta3_cross_gui.PathFileComponent"
DataContext="{Binding RelativeSource={RelativeSource Self}}">

<Grid ColumnDefinitions="30,25,*" Height="26">
<Border Grid.Column="0" BorderBrush="Black" BorderThickness="0.5,0,0.5,0.5">
<CheckBox x:Name="chk_IsChecked" Margin="5,0,5,0" IsChecked="{Binding IsSelected, Mode=TwoWay}"></CheckBox>
</Border>
<Border Grid.Column="1" BorderBrush="Black" BorderThickness="0,0.5,0.5,0.5">
<TextBlock x:Name="txt_blk_Index" Text="{Binding Index}" HorizontalAlignment="Center" VerticalAlignment="Center">0</TextBlock>
</Border>
<TextBox x:Name="txt_bx_Path" Grid.Column="2" IsReadOnly="True" MinWidth="0"></TextBox>
</Grid>
</UserControl>
Original file line number Diff line number Diff line change
@@ -1,107 +1,104 @@
/*Copyright 2020-2021 dan0v
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.*/

using Avalonia;
using Avalonia.Controls;
using Avalonia.Interactivity;
using Avalonia.Markup.Xaml;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Diagnostics;
using System.IO;
using System.Runtime.CompilerServices;

namespace xdelta3_cross_gui
{
public class PathFileComponent : UserControl
{
private MainWindow MainParent { get; set; }
public string FullPath { get; set; }
public string ShortName { get; set; }
public int Index { get; set; }

public bool _Shifted = false;

private MainWindow.FileCategory _FileCategory;

private bool _IsSelected = false;
public bool IsSelected {
get => _IsSelected;
set
{
if (value != _IsSelected)
{
_IsSelected = value;
OnPropertyChanged();
}
}
}

TextBlock txt_blk_Index;
TextBox txt_bx_Path;
CheckBox chk_IsChecked;

public PathFileComponent()
{
this.InitializeComponent();
}
public PathFileComponent(MainWindow parent, string url, int index, MainWindow.FileCategory fileCategory)
{
this.InitializeComponent();


this.txt_blk_Index = this.FindControl<TextBlock>("txt_blk_Index");
this.txt_bx_Path = this.FindControl<TextBox>("txt_bx_Path");
this.chk_IsChecked = this.FindControl<CheckBox>("chk_IsChecked");

this.MainParent = parent;
this.FullPath = "";
this.ShortName = "";
this.Index = index;
this._FileCategory = fileCategory;


try
{
this.FullPath = Path.GetFullPath(url);
this.ShortName = Path.GetFileName(url);
}
catch (Exception e) { Debug.WriteLine(e); }

this.UpdateValues();
}

public void UpdateValues()
{
txt_blk_Index.Text = this.Index + "";

txt_bx_Path.Text = this.MainParent.Options.ShowFullPaths ? this.FullPath : this.ShortName;

chk_IsChecked.IsChecked = this.IsSelected;
}

private void InitializeComponent()
{
AvaloniaXamlLoader.Load(this);
}

public event PropertyChangedEventHandler PropertyChanged;
protected virtual void OnPropertyChanged([CallerMemberName] string propertyName = null)
{
PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName));
}
}

}
/*Copyright 2020-2021 dan0v
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.*/

using Avalonia.Controls;
using Avalonia.Markup.Xaml;
using System;
using System.ComponentModel;
using System.Diagnostics;
using System.IO;
using System.Runtime.CompilerServices;

namespace xdelta3_cross_gui
{
public class PathFileComponent : UserControl
{
private MainWindow MainParent { get; set; }
public string FullPath { get; set; }
public string ShortName { get; set; }
public int Index { get; set; }

public bool _Shifted = false;

private MainWindow.FileCategory _FileCategory;

private bool _IsSelected = false;
public bool IsSelected {
get => _IsSelected;
set
{
if (value != _IsSelected)
{
_IsSelected = value;
OnPropertyChanged();
}
}
}

TextBlock txt_blk_Index;
TextBox txt_bx_Path;
CheckBox chk_IsChecked;

public PathFileComponent()
{
this.InitializeComponent();
}
public PathFileComponent(MainWindow parent, string url, int index, MainWindow.FileCategory fileCategory)
{
this.InitializeComponent();


this.txt_blk_Index = this.FindControl<TextBlock>("txt_blk_Index");
this.txt_bx_Path = this.FindControl<TextBox>("txt_bx_Path");
this.chk_IsChecked = this.FindControl<CheckBox>("chk_IsChecked");

this.MainParent = parent;
this.FullPath = "";
this.ShortName = "";
this.Index = index;
this._FileCategory = fileCategory;


try
{
this.FullPath = Path.GetFullPath(url);
this.ShortName = Path.GetFileName(url);
}
catch (Exception e) { Debug.WriteLine(e); }

this.UpdateValues();
}

public void UpdateValues()
{
txt_blk_Index.Text = this.Index + "";

txt_bx_Path.Text = this.MainParent.Options.ShowFullPaths ? this.FullPath : this.ShortName;

chk_IsChecked.IsChecked = this.IsSelected;
}

private void InitializeComponent()
{
AvaloniaXamlLoader.Load(this);
}

public event PropertyChangedEventHandler PropertyChanged;
protected virtual void OnPropertyChanged([CallerMemberName] string propertyName = null)
{
PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName));
}
}

}
Loading

0 comments on commit d65c37a

Please sign in to comment.