Is there a way to look inside .fx files and see what they contain? In particular I’m interested in the contents of rtl.fx in the OS X SDKs, but it would be very useful to be able do this for any .fx file.
I tried headerimporter which has an export option, but it crashes, possibly due to me using wrongly:
OS X 10.11 darko$ /Users/darko/bin/headerimport export rtl.fx rtl.h RemObjects Elements - Nougat Importer. Copyright (c) 2012-2015 RemObjects Software. All rights reserved An error occurred: Nullable object must have a value. at System.Nullable1[System.Int32].get_Value () [0x00000] in :0
at System.Nullable1[System.Int32].op_Explicit (Nullable1 value) [0x00000] in :0
at HeaderImporter.FxExport.EmitType (HeaderImporter.FxType aType, System.String aName) [0x00000] in :0
at HeaderImporter.FxExport.Generate (System.IO.Stream aTarget, FxCpuTarget aPlatform) [0x00000] in :0
at HeaderImporter.Export.IntMain (System.String[] Args) [0x00000] in :0
at HeaderImporter.ConsoleApp.Main (System.String[] args) [0x00000] in :0
`
Fixed; note that “export” doesn’t generate perfectly valid code for rtl.fx, it’s meant for generating .h files for Elements generated fx files, not imported fx files. We generally use the codegen option to get readable sources from fx files when testing it.
i think you want to run HeaderImporter.exe codegen rtl.fx rtl.cs hydrogene or HeaderImporter.exe codegen rtl.fx rtl.pas oxygene. those commands should give you proper code (for review purposes only) of the .fx, in C# or Oxygene, respectively. I know these work, because i run those myself as part of the import process of the SDKs.
Yeah, that also depends on us switching this over to CodeGen4. which we totally should do — it’s only a question of time and priorities, and this is n to a very user-facing feature, as we only use the codegen internally, and you’re the first external user who ever cared
I’m a trailblazer! The current functionality works fine for me and probably everyone else, so I would give it low priority, if any, but I think most people don’t know it exists. I only found it because I was playing around with the tool.
But please do keep exposing these tools because something as simple as being able to run headerimporter from the command line makes my life so much easier.
It’d be good to switch to CG4 if only so i can expose Silver code preview for references in Fire, as well, like i currently do Oxygene and C# (if the .fx files have shipped with source, which they currently don’t but will in the next build