fosspill / FFXIV_Modding_Tool

FFXIV Modding Tool is the Cross-platform Commandline interface alternative for TexTools
https://ffmt.pwd.cat/
GNU General Public License v3.0
47 stars 4 forks source link

[ISSUE] Bundled version broken on MacOS 10.14.6 #78

Closed hybridindie closed 5 years ago

hybridindie commented 5 years ago

Describe the bug When executing the runtime the following error occurs

Unhandled Exception:
System.TypeLoadException: Could not load type of field 'Salaros.Configuration.ConfigParser:YesNoBoolConverters' (4) due to: Could not load file or assembly 'System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' or one of its dependencies.
  at FFXIV_Modding_Tool.MainClass.Main (System.String[] args) [0x00030] in <1efd7f5278184069a7bb4e8f4d373139>:0
[ERROR] FATAL UNHANDLED EXCEPTION: System.TypeLoadException: Could not load type of field 'Salaros.Configuration.ConfigParser:YesNoBoolConverters' (4) due to: Could not load file or assembly 'System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' or one of its dependencies.
  at FFXIV_Modding_Tool.MainClass.Main (System.String[] args) [0x00030] in <1efd7f5278184069a7bb4e8f4d373139>:0

This is a clean install as I am unable to get through the first part of the focus recommend first run

To Reproduce Steps to reproduce the behavior:

  1. Download
  2. chmod +x the file
  3. ./FFXIV_Modding_Tool-Mac-Bundled

Expected behavior To print help and create config file.

Desktop (please complete the following information):

Additional context Had to download via wget as Safari adds a bad encoding and additional file extension

fosspill commented 5 years ago

Thank you for the bug report. It seems like one of our dependencies somehow isn't in the prebuilt binary.

You could, if you are inclined, try to run the Universal version through mono.

@shinnova Could you assist here? I assume that the mac bundle somehow works differently - or that the dependencies might not work as expected on mac.

hybridindie commented 5 years ago

Just did and the initial run works but it's not able to find the necessary file to actually run.

The first error I get is the following

System.IO.DirectoryNotFoundException: Could not find a part of the path "/Applications/FINAL FANTASY XIV ONLINE/game/XivMods.json".
  at System.IO.FileStream..ctor (System.String path, System.IO.FileMode mode, System.IO.FileAccess access, System.IO.FileShare share, System.Int32 bufferSize, System.Boolean anonymous, System.IO.FileOptions options) [0x00164] in <0523ad94f2e04325802cd231c518c8d9>:0
  at System.IO.FileStream..ctor (System.String path, System.IO.FileMode mode, System.IO.FileAccess access, System.IO.FileShare share, System.Int32 bufferSize, System.IO.FileOptions options) [0x00000] in <0523ad94f2e04325802cd231c518c8d9>:0
  at (wrapper remoting-invoke-with-check) System.IO.FileStream..ctor(string,System.IO.FileMode,System.IO.FileAccess,System.IO.FileShare,int,System.IO.FileOptions)
  at System.IO.StreamWriter..ctor (System.String path, System.Boolean append, System.Text.Encoding encoding, System.Int32 bufferSize) [0x00055] in <0523ad94f2e04325802cd231c518c8d9>:0
  at System.IO.StreamWriter..ctor (System.String path) [0x00008] in <0523ad94f2e04325802cd231c518c8d9>:0
  at (wrapper remoting-invoke-with-check) System.IO.StreamWriter..ctor(string)
  at System.IO.File.WriteAllText (System.String path, System.String contents) [0x00026] in <0523ad94f2e04325802cd231c518c8d9>:0
  at xivModdingFramework.Mods.Modding.CreateModlist () [0x00067] in <e7087d1cba03440a94b4ddd624a8bfd5>:0
  at xivModdingFramework.SqPack.FileTypes.Dat..ctor (System.IO.DirectoryInfo gameDirectory) [0x00019] in <e7087d1cba03440a94b4ddd624a8bfd5>:0
  at xivModdingFramework.Helpers.ProblemChecker..ctor (System.IO.DirectoryInfo gameDirectory) [0x0001e] in <e7087d1cba03440a94b4ddd624a8bfd5>:0
  at FFXIV_Modding_Tool.Commandline.Arguments.PreviouslyModifiedGame () [0x00029] in <1efd7f5278184069a7bb4e8f4d373139>:0
  at FFXIV_Modding_Tool.Commandline.Arguments.ArgumentHandler (System.String[] args) [0x0080b] in <1efd7f5278184069a7bb4e8f4d373139>:0
  at FFXIV_Modding_Tool.MainClass.Main (System.String[] args) [0x00036] in <1efd7f5278184069a7bb4e8f4d373139>:0
[ERROR] FATAL UNHANDLED EXCEPTION: System.IO.DirectoryNotFoundException: Could not find a part of the path "/Applications/FINAL FANTASY XIV ONLINE/game/XivMods.json".
  at System.IO.FileStream..ctor (System.String path, System.IO.FileMode mode, System.IO.FileAccess access, System.IO.FileShare share, System.Int32 bufferSize, System.Boolean anonymous, System.IO.FileOptions options) [0x00164] in <0523ad94f2e04325802cd231c518c8d9>:0
  at System.IO.FileStream..ctor (System.String path, System.IO.FileMode mode, System.IO.FileAccess access, System.IO.FileShare share, System.Int32 bufferSize, System.IO.FileOptions options) [0x00000] in <0523ad94f2e04325802cd231c518c8d9>:0
  at (wrapper remoting-invoke-with-check) System.IO.FileStream..ctor(string,System.IO.FileMode,System.IO.FileAccess,System.IO.FileShare,int,System.IO.FileOptions)
  at System.IO.StreamWriter..ctor (System.String path, System.Boolean append, System.Text.Encoding encoding, System.Int32 bufferSize) [0x00055] in <0523ad94f2e04325802cd231c518c8d9>:0
  at System.IO.StreamWriter..ctor (System.String path) [0x00008] in <0523ad94f2e04325802cd231c518c8d9>:0
  at (wrapper remoting-invoke-with-check) System.IO.StreamWriter..ctor(string)
  at System.IO.File.WriteAllText (System.String path, System.String contents) [0x00026] in <0523ad94f2e04325802cd231c518c8d9>:0
  at xivModdingFramework.Mods.Modding.CreateModlist () [0x00067] in <e7087d1cba03440a94b4ddd624a8bfd5>:0
  at xivModdingFramework.SqPack.FileTypes.Dat..ctor (System.IO.DirectoryInfo gameDirectory) [0x00019] in <e7087d1cba03440a94b4ddd624a8bfd5>:0
  at xivModdingFramework.Helpers.ProblemChecker..ctor (System.IO.DirectoryInfo gameDirectory) [0x0001e] in <e7087d1cba03440a94b4ddd624a8bfd5>:0
  at FFXIV_Modding_Tool.Commandline.Arguments.PreviouslyModifiedGame () [0x00029] in <1efd7f5278184069a7bb4e8f4d373139>:0
  at FFXIV_Modding_Tool.Commandline.Arguments.ArgumentHandler (System.String[] args) [0x0080b] in <1efd7f5278184069a7bb4e8f4d373139>:0
  at FFXIV_Modding_Tool.MainClass.Main (System.String[] args) [0x00036] in <1efd7f5278184069a7bb4e8f4d373139>:0

You may want to up the Docs to say the GameDirectory config value or -g option needs to look within the .app file. The full path is similar to: /Applications/FINAL FANTASY XIV ONLINE.app/Contents/SharedSupport/finalfantasyxiv/support/published_Final_Fantasy/drive_c/Program Files (x86)/SquareEnix/FINAL FANTASY XIV - A Realm Reborn

The program reports missing files and will not import mods due to it thinking that application is running (It is not and confirmed such)

When importing

mono FFXIV_Modding_Tool.exe mpi -t mod_file.ttmp
Checking backups before proceeding...
ERROR: One or more index files could not be found in /Users/johnd/.config/FFXIV_Modding_Tool/backups. Creating new ones or downloading them from the TexTools discord is recommended
Continue anyway? y/N
y
ERROR: Unable to import while the game is running.

Running a problem check

mono FFXIV_Modding_Tool.exe pc
Initializing problem check
Checking index dat values...
25%ERROR: There was an issue checking index dat counts
One or more errors occurred. (Could not find a part of the path "/Applications/FINAL FANTASY XIV ONLINE.app/Contents/SharedSupport/finalfantasyxiv/support/published_Final_Fantasy/drive_c/Program Files (x86)/SquareEnix/FINAL FANTASY XIV - A Realm Reborn/game/sqpack/ffxiv/0a0000.win32.index".)
Checking index backups...
100%
Checking dat file...
100%
Checking modlist...
WARNING: No entries found in the modlist, skipping
Checking LoD settings...
100%

The following problems were found and resolved:
LoD turned off, as some mods have issues with it turned on

ERROR: The following problems could not be resolved:
Index backups for 010000 not found
Index backups for 040000 not found
Index backups for 060000 not found
Game directory is missing 060000.win32.dat1

Should I make this another ticket or follow here due to being both Mac related?

fosspill commented 5 years ago

I've split this up into 3 issues now: #78 is yours and renamed to match the problem.

79 is to ensure proper support for the .app folder and/or documenting better.

80 is to fix the issues reported with the problem checking functions.

79 and #80 will be prioritized and both seem rather easy to fix - or at least work around.

I would also like to add: The Mac version of the game should be near identical to the Windows version since it runs in a wine wrapper. So I'm positive!

It's likely we'll have a test version for you in a few hours. @shinnova, are you in agreement here?

shinnova commented 5 years ago

Yes, I'll prioritize these issues and I'll hopefully have a test version ready in a couple hours.

fosspill commented 5 years ago

We'll get access to a Mac and find what is causing the issue with the bundle, for now I've removed the bundled mac release.

hybridindie commented 5 years ago

It might be worth adding information about downloading and installing Mono then

fosspill commented 5 years ago

Good point, adding that to the installation doc

https://ffmt.pwd.cat/docs/installation/

fosspill commented 5 years ago

@hybridindie, some good news, and some bad news! We finally got access to a mac installation and have released a pre-release with a mac version that should work. The slightly bad news is that it still seems to require having mono installed, however, mono is loaded automatically so mono ffmt.exe is no longer needed.

Could you test and confirm that the bundled mac version of v0.6 actually works? https://github.com/fosspill/FFXIV_Modding_Tool/releases/tag/v0.6

hybridindie commented 5 years ago

Works perfectly with one exception - The Y/N responses are case-sensitive which causes the wizard to ask the same thing again or outright exit if you get the Found a mod applied by an unknown application, game stability cannot be guaranteed warning. Respond with an uppercase Y and it bails out without doing anything

fosspill commented 5 years ago

Thank you for confirming that the bundled mac version works better!

Case-Sensitivity: Ops, that's easy enough to fix. We'll add that fix very soon.

Regarding the "Found a mod applied by an unknown application" warning, not really sure why this happens sometimes. Still researching that. Likely a bug with reading the mods, we'll add some extra output to track the culprit.

fosspill commented 5 years ago

The bundled mac version still seems to be having some strange issues, we'll dig into this later. It's honestly a bit over our heads.

Might need to just consider dropping the bundled version and rather provide proper makefiles and such.

Someone with mkbundle experience would be handy :)

fosspill commented 5 years ago

@hybridindie - Could you try to run the v0.6 pre-release version with the problemchecker action? (ffmt pc) If it works for you then we can keep the bundle for now

hybridindie commented 5 years ago

Everything is all good when except disable, you can't disable and backup without resetting but all other commands work as expected

fosspill commented 5 years ago

That's very interesting and it makes me wonder why I have issues on my mac install. Might be something to do with trying to access game data over nfs.

We'll keep releasing the mac bundle the way we made the v0.6 prerelase.