FXGen failed to import SDK/libraries with System.ArgumentNullException

**Version:**Crossbox 9.1.100.2085
Target (If relevant): XCode 8.2.1 + Mono 4.6.2.7
Description:

I’ve built SQLCipher from source to an iOS fat static library, then I’m trying to use FXGen to generate .fx file for it.

It’s my first time to use FXGen, and here’s my config:


(The Base SDK FX Folder is not existed by default, so I create it manually and copy “iOS 10.2” fx folder into it to make FXGen detect the Platform Version, otherwise there’s a yellow warning icon beside it)

I click “Start Import” and it shows “Import script has failed, see log file for details”. I check the log file but have no clue:
505117219308.zip (1.8 KB)

I’m not quite sure if my libSQLCipherIOS.a is validated to be imported, so I just have a try to “Import SDK” to see what it looks like when FXGen works as expected.

But it’s failed again with the same error as “Import Library”:



505115886845.zip (1.7 KB)

I don’t know what I’m doing wrong…Is there any suggestion?

Curious. i have literally no idea what could be failing here. Something inside Train. is passing a nil string to Path.Combine when trying to run /usr/bin/xcode-select. very strange. If anything, it’s a Train bug, but i cannot see how…

can you send me the whole .train script?

Yes, but where can I find the .train file generated by FXGen?
For “Import SDK”, I just simply drag-and-drop the XCode application into it without any configuration.

the path is printed in the build log at the very top?

Sorry for my negligence…Here’s the train script for “Import SDK”:

include("$(GenerateTrainScript)");
var fxBaseFolder = “/Users/sgzxy/Library/Application Support/RemObjects Software/Elements/CrossBox/FX”;
var hi = “/Applications/CrossBox.app/Contents/Resources/FXGen.app/Contents/Resources/HeaderImporter.exe”;
var developerFolder = “/Applications/Xcode.app/Contents/Developer”;
processiOSSDK(“10.2”);

505229287924.zip (385 Bytes)

reproduced. can you change the scriopt to this:

var fxBaseFolder = "/Users/sgzxy/Library/Application Support/RemObjects Software/Elements/CrossBox/FX";
var hi = "/Applications/CrossBox.app/Contents/Resources/FXGen.app/Contents/Resources/HeaderImporter.exe";
var developerFolder = "/Applications/Xcode.app/Contents/Developer";
include("$(GenerateTrainScript)");
processiOSSDK("10.2");

as a workaround?

Great! I will try it later.

I’ve just compiled train from source and found this File.pas file is corrupted by some merge info:

i’ll check. is this my commit from today?

Hi Marc, here’s how I get on:

  1. I’ve compiled the Train.exe from the lateast source on Github under Windows by command line, and then copy the “Release” folder to my MacBook.

  2. I put the import.train file into the same folder, and ensure the script is changed as you suggested.

  3. Run following command in Terminal:
    mono Train.exe import.train

  4. It shows an error “Could not find file ‘/Users/sgzxy/Desktop/Release/$(GenerateTrainScript)’”. So it seems that environment variable is not defined.

you need to pass -vGenerateTrainScript=... where … iOS the path to the main generate.train script (which you can find inside FXGen)

After including “generate.train”, the script running is ok, so it’s indeed the position of include("$(GenerateTrainScript)"); cause the problem.