-
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
8 changed files
with
123 additions
and
19 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
using FFXIV_TexTools.Helpers; | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Diagnostics; | ||
using System.IO; | ||
using System.Linq; | ||
using System.Runtime.InteropServices; | ||
using System.Text; | ||
using System.Threading.Tasks; | ||
using System.Windows; | ||
using xivModdingFramework.Cache; | ||
using xivModdingFramework.General.Enums; | ||
|
||
namespace FFXIV_TexTools.Console | ||
{ | ||
|
||
internal static class ConsoleManager | ||
{ | ||
|
||
public static async Task<bool> HandleConsoleArgs(string[] args) | ||
{ | ||
if(args == null || args.Length < 1 || args[0] != "/c") | ||
{ | ||
return false; | ||
} | ||
|
||
var gameDir = new DirectoryInfo(Properties.Settings.Default.FFXIV_Directory); | ||
var lang = XivLanguages.GetXivLanguage(Properties.Settings.Default.Application_Language); | ||
await XivCache.SetGameInfo(gameDir, lang, false); | ||
|
||
var cmd = args[1]; | ||
|
||
var code = -1; | ||
if(cmd == "/u") | ||
{ | ||
code = await HandleUpgrade(args); | ||
} | ||
|
||
Application.Current.Shutdown(code); | ||
return true; | ||
} | ||
|
||
public static async Task<int> HandleUpgrade(string[] args) | ||
{ | ||
if(args.Length < 4) | ||
{ | ||
return -1; | ||
} | ||
|
||
var src = args[2]; | ||
var dest = args[3]; | ||
|
||
try | ||
{ | ||
await ModpackUpgrader.UpgradeModpack(src, dest); | ||
} catch (Exception ex) | ||
{ | ||
Trace.WriteLine(ex); | ||
return -1; | ||
} | ||
return 0; | ||
} | ||
|
||
} | ||
} |
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
Submodule xivModdingFramework
updated
4 files
+9 −0 | xivModdingFramework/Helpers/EndwalkerUpgrade.cs | |
+77 −63 | xivModdingFramework/Helpers/ProblemChecker.cs | |
+1 −1 | xivModdingFramework/Mods/ModTransaction.cs | |
+6 −0 | xivModdingFramework/Mods/Modding.cs |