-
Notifications
You must be signed in to change notification settings - Fork 64
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
23 changed files
with
830 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
using Newtonsoft.Json.Converters; | ||
using Newtonsoft.Json; | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Text; | ||
using System.Threading.Tasks; | ||
using System.IO; | ||
using xivModdingFramework.Helpers; | ||
using FFXIV_TexTools.Helpers; | ||
using System.Diagnostics; | ||
|
||
namespace FFXIV_TexTools.Models | ||
{ | ||
public class PenumbraUpgradeStatus | ||
{ | ||
[JsonConverter(typeof(StringEnumConverter))] | ||
public enum EUpgradeResult | ||
{ | ||
NotStarted, | ||
InProgress, | ||
Failure, | ||
Success, | ||
} | ||
|
||
public Dictionary<string, EUpgradeResult> Upgrades = new Dictionary<string, EUpgradeResult>(); | ||
|
||
public async Task<EUpgradeResult> ProcessMod(string baseDir, string targetDir, string mod) | ||
{ | ||
var source = Path.GetFullPath(Path.Combine(baseDir, mod)); | ||
var target = Path.GetFullPath(Path.Combine(targetDir, mod)); | ||
|
||
if (source != target) { | ||
IOUtil.RecursiveDeleteDirectory(target); | ||
} | ||
|
||
Directory.CreateDirectory(target); | ||
|
||
var res = EUpgradeResult.Failure; | ||
try | ||
{ | ||
await ModpackUpgrader.UpgradeModpack(source, target); | ||
res = EUpgradeResult.Success; | ||
} catch (Exception ex) | ||
{ | ||
if (source != target) | ||
{ | ||
IOUtil.RecursiveDeleteDirectory(target); | ||
IOUtil.CopyFolder(source, target); | ||
} | ||
|
||
res = EUpgradeResult.Failure; | ||
Trace.WriteLine("Modpack Upgrade Failure for Penumbra Mod: " + mod); | ||
Trace.WriteLine(ex); | ||
} | ||
|
||
await IOUtil.CompressWindowsDirectory(target); | ||
|
||
if (Upgrades.ContainsKey(mod)) | ||
{ | ||
Upgrades[mod] = res; | ||
} | ||
return res; | ||
} | ||
} | ||
} |
154 changes: 154 additions & 0 deletions
154
FFXIV_TexTools/Views/Controls/DawntTrailUpgradeDisclaimer.xaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,154 @@ | ||
<UserControl x:Class="FFXIV_TexTools.Views.Controls.DawntTrailUpgradeDisclaimer" | ||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" | ||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" | ||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" | ||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" | ||
xmlns:local="clr-namespace:FFXIV_TexTools.Views.Controls" | ||
mc:Ignorable="d" | ||
d:DesignHeight="450" d:DesignWidth="800"> | ||
<Border BorderBrush="Gray" BorderThickness="1" Margin="2" Padding="2"> | ||
<Grid> | ||
<Grid.ColumnDefinitions> | ||
|
||
</Grid.ColumnDefinitions> | ||
<Grid.RowDefinitions> | ||
<RowDefinition Height="40"/> | ||
<RowDefinition Height="80"/> | ||
<RowDefinition/> | ||
</Grid.RowDefinitions> | ||
|
||
<Label HorizontalAlignment="Center" VerticalAlignment="Center" FontSize="14" FontWeight="Bold" FontStyle="Italic"> | ||
Dawntrail Upgrade Disclaimer | ||
</Label> | ||
|
||
<TextBlock Grid.Row="1" HorizontalAlignment="Center" VerticalAlignment="Center" FontStyle="Italic" TextAlignment="Center"> | ||
Dawntrail upgrades are not perfect 1:1 translations, and do not affect all mod types. | ||
<LineBreak/>The following is a list of different mod types, and how they will be affected. | ||
</TextBlock> | ||
|
||
<Grid x:Name="TypesGrid" Grid.Row="2"> | ||
<Grid.RowDefinitions> | ||
<RowDefinition Height="35"/> | ||
<RowDefinition Height="35"/> | ||
<RowDefinition Height="35"/> | ||
<RowDefinition Height="35"/> | ||
<RowDefinition Height="35"/> | ||
<RowDefinition Height="35"/> | ||
<RowDefinition Height="35"/> | ||
<RowDefinition Height="35"/> | ||
</Grid.RowDefinitions> | ||
|
||
<Border BorderBrush="Gray" BorderThickness="1" Margin="2" Padding="2"> | ||
<Grid> | ||
<Grid.ColumnDefinitions> | ||
<ColumnDefinition Width="150"/> | ||
<ColumnDefinition Width="150"/> | ||
<ColumnDefinition /> | ||
</Grid.ColumnDefinitions> | ||
<Label Grid.Column="0" Grid.Row="0" HorizontalAlignment="Center" FontWeight="Bold">Mod Type</Label> | ||
<Label Grid.Column="1" Grid.Row="0" HorizontalAlignment="Center" FontWeight="Bold">Estimated Success</Label> | ||
<Label Grid.Column="2" Grid.Row="0" HorizontalAlignment="Center" FontWeight="Bold">Notes</Label> | ||
</Grid> | ||
</Border> | ||
|
||
<Border BorderBrush="Gray" BorderThickness="1" Margin="2" Padding="2" Grid.Row="1"> | ||
<Grid> | ||
<Grid.ColumnDefinitions> | ||
<ColumnDefinition Width="150"/> | ||
<ColumnDefinition Width="150"/> | ||
<ColumnDefinition /> | ||
</Grid.ColumnDefinitions> | ||
<Label Grid.Column="0" Grid.Row="1" HorizontalAlignment="Right">Monster/Minion/Mount:</Label> | ||
<Label Grid.Column="1" Grid.Row="1" HorizontalAlignment="Left" Foreground="Green">~99%+</Label> | ||
<Label Grid.Column="2" Grid.Row="1" HorizontalAlignment="Left" Foreground="Gray" FontStyle="Italic"></Label> | ||
</Grid> | ||
</Border> | ||
|
||
<Border BorderBrush="Gray" BorderThickness="1" Margin="2" Padding="2" Grid.Row="2"> | ||
<Grid> | ||
<Grid.ColumnDefinitions> | ||
<ColumnDefinition Width="150"/> | ||
<ColumnDefinition Width="150"/> | ||
<ColumnDefinition /> | ||
</Grid.ColumnDefinitions> | ||
<Label Grid.Column="0" Grid.Row="1" HorizontalAlignment="Right">Equipment:</Label> | ||
<Label Grid.Column="1" Grid.Row="1" HorizontalAlignment="Left" Foreground="Green">~90-95%</Label> | ||
<Label Grid.Column="2" Grid.Row="1" HorizontalAlignment="Left" Foreground="Gray" FontStyle="Italic">Texture-only mods are not upgraded, but may still work in some cases.</Label> | ||
</Grid> | ||
</Border> | ||
|
||
<Border BorderBrush="Gray" BorderThickness="1" Margin="2" Padding="2" Grid.Row="3"> | ||
<Grid> | ||
<Grid.ColumnDefinitions> | ||
<ColumnDefinition Width="150"/> | ||
<ColumnDefinition Width="150"/> | ||
<ColumnDefinition /> | ||
</Grid.ColumnDefinitions> | ||
<Label Grid.Column="0" Grid.Row="2" HorizontalAlignment="Right">Hair:</Label> | ||
<Label Grid.Column="1" Grid.Row="2" HorizontalAlignment="Left" Foreground="Green">~90%+</Label> | ||
<Label Grid.Column="2" Grid.Row="2" HorizontalAlignment="Left" Foreground="Gray" FontStyle="Italic">Single-texture mods are not upgraded.</Label> | ||
|
||
</Grid> | ||
</Border> | ||
|
||
<Border BorderBrush="Gray" BorderThickness="1" Margin="2" Padding="2" Grid.Row="4"> | ||
<Grid> | ||
<Grid.ColumnDefinitions> | ||
<ColumnDefinition Width="150"/> | ||
<ColumnDefinition Width="150"/> | ||
<ColumnDefinition /> | ||
</Grid.ColumnDefinitions> | ||
<Label Grid.Column="0" Grid.Row="3" HorizontalAlignment="Right">Iris/Eyes:</Label> | ||
<Label Grid.Column="1" Grid.Row="3" HorizontalAlignment="Left" Foreground="DarkOrange">~60-75%</Label> | ||
<Label Grid.Column="2" Grid.Row="3" HorizontalAlignment="Left" Foreground="DarkOrange" FontStyle="Italic">ALUM and Catchlight Mods cannot be upgraded.</Label> | ||
|
||
</Grid> | ||
</Border> | ||
|
||
<Border BorderBrush="Gray" BorderThickness="1" Margin="2" Padding="2" Grid.Row="5"> | ||
<Grid> | ||
<Grid.ColumnDefinitions> | ||
<ColumnDefinition Width="150"/> | ||
<ColumnDefinition Width="150"/> | ||
<ColumnDefinition /> | ||
</Grid.ColumnDefinitions> | ||
<Label Grid.Column="0" Grid.Row="4" HorizontalAlignment="Right">Faces:</Label> | ||
<Label Grid.Column="1" Grid.Row="4" HorizontalAlignment="Left" Foreground="Red">0%</Label> | ||
<Label Grid.Column="2" Grid.Row="4" HorizontalAlignment="Left" Foreground="Red" FontStyle="Italic">Must be manually updated.</Label> | ||
|
||
</Grid> | ||
</Border> | ||
|
||
<Border BorderBrush="Gray" BorderThickness="1" Margin="2" Padding="2" Grid.Row="6"> | ||
<Grid> | ||
<Grid.ColumnDefinitions> | ||
<ColumnDefinition Width="150"/> | ||
<ColumnDefinition Width="150"/> | ||
<ColumnDefinition /> | ||
</Grid.ColumnDefinitions> | ||
<Label Grid.Column="0" Grid.Row="5" HorizontalAlignment="Right">Body Textures:</Label> | ||
<Label Grid.Column="1" Grid.Row="5" HorizontalAlignment="Left" Foreground="Red">0%</Label> | ||
<Label Grid.Column="2" Grid.Row="5" HorizontalAlignment="Left" Foreground="Red" FontStyle="Italic">Must be manually updated. *Tattoo mods may be OK in some cases.</Label> | ||
|
||
</Grid> | ||
</Border> | ||
|
||
<Border BorderBrush="Gray" BorderThickness="1" Margin="2" Padding="2" Grid.Row="7"> | ||
<Grid> | ||
<Grid.ColumnDefinitions> | ||
<ColumnDefinition Width="150"/> | ||
<ColumnDefinition Width="150"/> | ||
<ColumnDefinition /> | ||
</Grid.ColumnDefinitions> | ||
<Label Grid.Column="0" Grid.Row="6" HorizontalAlignment="Right">Other Mods:</Label> | ||
<Label Grid.Column="1" Grid.Row="6" HorizontalAlignment="Left" Foreground="Gray">N/A</Label> | ||
<Label Grid.Column="2" Grid.Row="6" HorizontalAlignment="Left" Foreground="Gray" FontStyle="Italic">Other mods do not need to use this tool.</Label> | ||
|
||
</Grid> | ||
</Border> | ||
</Grid> | ||
|
||
|
||
</Grid> | ||
</Border> | ||
</UserControl> |
28 changes: 28 additions & 0 deletions
28
FFXIV_TexTools/Views/Controls/DawntTrailUpgradeDisclaimer.xaml.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Text; | ||
using System.Threading.Tasks; | ||
using System.Windows; | ||
using System.Windows.Controls; | ||
using System.Windows.Data; | ||
using System.Windows.Documents; | ||
using System.Windows.Input; | ||
using System.Windows.Media; | ||
using System.Windows.Media.Imaging; | ||
using System.Windows.Navigation; | ||
using System.Windows.Shapes; | ||
|
||
namespace FFXIV_TexTools.Views.Controls | ||
{ | ||
/// <summary> | ||
/// Interaction logic for DawntTrailUpgradeDisclaimer.xaml | ||
/// </summary> | ||
public partial class DawntTrailUpgradeDisclaimer : UserControl | ||
{ | ||
public DawntTrailUpgradeDisclaimer() | ||
{ | ||
InitializeComponent(); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.