This commit is contained in:
Timothy Baldridge 2019-09-17 20:17:12 -06:00
parent 021fc58052
commit 4e95e78a69
5 changed files with 28 additions and 26 deletions

View File

@ -19,6 +19,7 @@
* Include WABBAJACK_INCLUDE files before including patches
* Ignore .bin and .refcache files (DynDOLOD temp files)
* Shell out to cmd.exe for VFS cleaning should fix "ReadOnlyFile" errors once and for all
* Switch out folder selection routines for Win32 APIs, should fix issue #27
#### Version 0.9.1 - 9/5/2019
* Fixed a bug where having only one profile selected would result in no profiles being selected

View File

@ -9,7 +9,6 @@ using System.Threading;
using System.Windows;
using System.Windows.Input;
using System.Windows.Threading;
using Ookii.Dialogs.Wpf;
using Wabbajack.Common;
namespace Wabbajack
@ -280,24 +279,27 @@ namespace Wabbajack
{
if (Mode == "Installing")
{
var ofd = new VistaFolderBrowserDialog();
ofd.Description = "Select Installation Directory";
ofd.UseDescriptionForTitle = true;
if (ofd.ShowDialog() == true)
var folder = UIUtils.ShowFolderSelectionDialoag("Select Installation directory");
if (folder != null)
{
Location = ofd.SelectedPath;
Location = folder;
if (_downloadLocation == null)
DownloadLocation = Path.Combine(Location, "downloads");
}
}
else
{
var fsd = new VistaOpenFileDialog();
fsd.Title = "Select a ModOrganizer modlist.txt file";
fsd.Filter = "modlist.txt|modlist.txt";
if (fsd.ShowDialog() == true)
var folder = UIUtils.ShowFolderSelectionDialoag("Select Your MO2 profile directory");
if (folder != null)
{
Location = fsd.FileName;
var file = Path.Combine(folder, "modlist.txt");
if (!File.Exists(file))
{
Utils.Log($"No modlist.txt found at {file}");
}
Location = file;
ConfigureForBuild();
}
}
@ -305,10 +307,8 @@ namespace Wabbajack
private void ExecuteChangeDownloadPath()
{
var ofd = new VistaFolderBrowserDialog();
ofd.Description = "Select a location for MO2 downloads";
ofd.UseDescriptionForTitle = true;
if (ofd.ShowDialog() == true) DownloadLocation = ofd.SelectedPath;
var folder = UIUtils.ShowFolderSelectionDialoag("Select a location for MO2 downloads");
if (folder != null) DownloadLocation = folder;
}
private void ConfigureForBuild()

View File

@ -12,7 +12,6 @@ using System.Windows;
using CG.Web.MegaApiClient;
using Compression.BSA;
using K4os.Compression.LZ4.Streams;
using Ookii.Dialogs.Wpf;
using VFS;
using Wabbajack.Common;
@ -173,12 +172,10 @@ namespace Wabbajack
private bool LocateGameFolder()
{
var vf = new VistaFolderBrowserDialog();
vf.Description = "Please Locate Your Game Installation Path";
vf.UseDescriptionForTitle = true;
if (vf.ShowDialog() == true)
var fs = UIUtils.ShowFolderSelectionDialoag("Please locate your game installation path");
if (fs != null)
{
GameFolder = vf.SelectedPath;
GameFolder = fs;
return true;
}

View File

@ -117,15 +117,18 @@
<Reference Include="MegaApiClient, Version=1.7.1.495, Culture=neutral, PublicKeyToken=0480d311efbeb4e2, processorArchitecture=MSIL">
<HintPath>..\packages\MegaApiClient.1.7.1\lib\net46\MegaApiClient.dll</HintPath>
</Reference>
<Reference Include="Microsoft.WindowsAPICodePack, Version=1.1.3.3, Culture=neutral, PublicKeyToken=8985beaab7ea3f04, processorArchitecture=MSIL">
<HintPath>..\packages\Microsoft-WindowsAPICodePack-Core.1.1.3.3\lib\net452\Microsoft.WindowsAPICodePack.dll</HintPath>
</Reference>
<Reference Include="Microsoft.WindowsAPICodePack.Shell, Version=1.1.3.3, Culture=neutral, PublicKeyToken=8985beaab7ea3f04, processorArchitecture=MSIL">
<HintPath>..\packages\Microsoft-WindowsAPICodePack-Shell.1.1.3.3\lib\net452\Microsoft.WindowsAPICodePack.Shell.dll</HintPath>
</Reference>
<Reference Include="Newtonsoft.Json, Version=12.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
<HintPath>..\packages\Newtonsoft.Json.12.0.2\lib\net45\Newtonsoft.Json.dll</HintPath>
</Reference>
<Reference Include="Newtonsoft.Json.Bson, Version=1.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
<HintPath>..\packages\Newtonsoft.Json.Bson.1.0.2\lib\net45\Newtonsoft.Json.Bson.dll</HintPath>
</Reference>
<Reference Include="Ookii.Dialogs.Wpf, Version=1.0.0.0, Culture=neutral, PublicKeyToken=66aa232afad40158, processorArchitecture=MSIL">
<HintPath>..\packages\Ookii.Dialogs.Wpf.1.1.0\lib\net45\Ookii.Dialogs.Wpf.dll</HintPath>
</Reference>
<Reference Include="SharpCompress, Version=0.23.0.0, Culture=neutral, PublicKeyToken=afb0a02973931d96, processorArchitecture=MSIL">
<HintPath>..\packages\SharpCompress.0.23.0\lib\net45\SharpCompress.dll</HintPath>
</Reference>
@ -178,6 +181,7 @@
<Compile Include="ReportBuilder.cs" />
<Compile Include="Themes\LeftMarginMultiplierConverter.cs" />
<Compile Include="Themes\TreeViewItemExtensions.cs" />
<Compile Include="UIUtils.cs" />
<Page Include="MainWindow.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>

View File

@ -1,5 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="CommonMark.NET" version="0.15.1" targetFramework="net472" />
<package id="Costura.Fody" version="4.0.0" targetFramework="net472" />
@ -9,9 +8,10 @@
<package id="K4os.Compression.LZ4.Streams" version="1.1.11" targetFramework="net472" />
<package id="K4os.Hash.xxHash" version="1.0.6" targetFramework="net472" />
<package id="MegaApiClient" version="1.7.1" targetFramework="net472" />
<package id="Microsoft-WindowsAPICodePack-Core" version="1.1.3.3" targetFramework="net472" />
<package id="Microsoft-WindowsAPICodePack-Shell" version="1.1.3.3" targetFramework="net472" />
<package id="Newtonsoft.Json" version="12.0.2" targetFramework="net472" />
<package id="Newtonsoft.Json.Bson" version="1.0.2" targetFramework="net472" />
<package id="Ookii.Dialogs.Wpf" version="1.1.0" targetFramework="net472" />
<package id="protobuf-net" version="2.4.0" targetFramework="net472" />
<package id="SharpCompress" version="0.23.0" targetFramework="net472" />
<package id="SharpZipLib" version="1.2.0" targetFramework="net472" />