Skip to content

Commit d33e830

Browse files
committed
Add in a few changes for the autoupdating
This will allow me to still have updates for the unpackaged releases (non single-file). It will just redirect the user to the releases page instead.
1 parent 4c6c9d0 commit d33e830

File tree

5 files changed

+12
-2
lines changed

5 files changed

+12
-2
lines changed

BL3SaveEditor/AutoUpdater.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
<?xml version="1.0" encoding="UTF-8"?>
2+
23
<item>
34
<version>1.0.0.0</version>
45
<url>https://github.com/FromDarkHell/BL3SaveEditor/releases/latest/download/BL3SaveEditor.exe</url>

BL3SaveEditor/BL3SaveEditor.csproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@
4141
</PropertyGroup>
4242
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Single File|AnyCPU'">
4343
<OutputPath>bin\Single File\</OutputPath>
44+
<DefineConstants>SINGLE_FILE</DefineConstants>
4445
</PropertyGroup>
4546
<ItemGroup>
4647
<Reference Include="System" />

BL3SaveEditor/MainWindow.xaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@
5959
<ToolBar x:Uid="ToolWindowToolbar" AllowDrop="False" Focusable="False" HorizontalAlignment="Left"
6060
VerticalAlignment="Top" Width="792"
6161
Background="{DynamicResource {x:Static adonisUi:Brushes.Layer0BackgroundBrush}}" Height="30">
62+
<!-- I'm hiding this button for now because I find it to be a pain to work on -->
6263
<Button Visibility="Collapsed" Name="NewSaveBtn" Click="NewSaveBtn_Click">
6364
<StackPanel Orientation="Horizontal">
6465
<Image Width="16" Height="16" Source="Icons\fugue\document-binary.png" Margin="0 0 5 0"

BL3SaveEditor/MainWindow.xaml.cs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -985,9 +985,16 @@ private void AutoUpdaterOnCheckForUpdateEvent(UpdateInfoEventArgs args) {
985985

986986
if (result.Equals(MessageBoxResult.Yes) || result.Equals(MessageBoxResult.OK)) {
987987
try {
988+
// Change what we're doing depending on whether or not we're built in single file or "release" (distributed as a zip).
989+
#if SINGLE_FILE
988990
if (AutoUpdater.DownloadUpdate(args)) {
989991
Application.Current.Shutdown();
990992
}
993+
#else
994+
// The non-single file releases can't really be updated the way I want them to.
995+
// For now we're gonna just send the user to the github page.
996+
System.Diagnostics.Process.Start(args.ChangelogURL);
997+
#endif
991998
}
992999
catch (Exception exception) {
9931000
MessageBox.Show(exception.Message, exception.GetType().ToString(), MessageBoxButton.OK, MessageBoxImage.Error);

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
-## Borderlands 3 Save Editor
1+
## Borderlands 3 Save Editor
22
A desktop based save *and* profile editor for [Borderlands 3](borderlands.com/).
33

44
### Installation / Usage
@@ -12,7 +12,7 @@ A desktop based save *and* profile editor for [Borderlands 3](borderlands.com/).
1212
### Credits
1313
* [gibbed](https://github.com/Gibbed) for their [Inventory Serial Number Database](https://github.com/gibbed/Borderlands3Dumps). It's what allows me to know what weapons you've got in your backpack! I also use their [Borderlands3Protos](https://github.com/gibbed/Borderlands3Protos) repository
1414
* [apocalyptech](https://github.com/apocalyptech/) for writing the incredibly helpful [guide](https://github.com/BLCM/BLCMods/wiki/Understanding-BL3-Item-Serial-Numbers) on parsing weapon serials.
15-
* [Benjamin Rühl](https://github.com/benruehl) for creating [AdonisUI](https://github.com/benruehl/adonis-ui), the WPF toolkit I used for most of my UI development/theming.
15+
* [Benjamin R�hl](https://github.com/benruehl) for creating [AdonisUI](https://github.com/benruehl/adonis-ui), the WPF toolkit I used for most of my UI development/theming.
1616
* [xceed software](https://github.com/xceedsoftware) for creating the [Extended WPF Toolkit](https://github.com/xceedsoftware/wpftoolkit), allowing me to have a `Raw` tab and number up/downs.
1717
* [Gearbox Software](https://www.gearboxsoftware.com/) of course for creating Borderlands 3.
1818
* Many others who helped test the editor as well as help me get my mind around some of the concepts.

0 commit comments

Comments
 (0)