No announcement yet.

Creating a compiled Lua file out of the installer?

  • Filter
  • Time
  • Show
Clear All
new posts

  • Creating a compiled Lua file out of the installer?

    Hi there

    Just a 'simple' question to have a idea if it works or not. Couldn't find anything about that within the docs or the forums.

    What i want to do:
    - put in some Lua code into the installer
    - while running the installer i want to change some parts of that code
    - then i need to write the changed Lua code as a compliled Lua file to the disc
    - i do not want to deliver the file as payload or primer file because they are readable while the installer is running

    Since SF is using Lua for internal scripts, there may be a solution to get this to work?

    Thanks for help.

  • #2
    You can run any executable as part of your installer. If you want to run something, most likely you would add this as a Primer file to your installer, and then execute it with the required command line arguments. It does not matter if this is a utility to perform a query on a database, some program to create a license ... or a compiler to create some file. If you know how to run the program on the command line, nothing stops you from running it as part of your installation procedure.



    • #3
      Thanks for your answer, but that wasn't the question. I know that i can run external or primer files, i do this already. But i won't have that one Lua file in the payload or as primer file, what is readable while the installation runs. I thought that i can put in, edit and compile the Lua code from within the installer itself to a final, not readable file on disk, because SF runs Lua for its scripts. Seems that will not work i guess. As i can see it is not possible to put in Lua code (call it a template) and compile it out on the client side. :(