1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
  2. GTA Network forum is now in archive mode.

Automatic meta.xml generator.

Discussion in 'Tools' started by Eraknelo, Jan 3, 2017.

  1. Eraknelo

    Eraknelo Active Member

    Messages:
    64
    Likes Received:
    61
    Joined:
    Dec 26, 2016
    Have you ever wanted to use .cs files instead of .dll, so you can easily reload the resource during development, but editing the meta.xml file constantly drives you insane?

    Well, now there's a solution!

    Introducing the all-new GTA Network meta.xml generator!

    That's right! In just 4 simple steps, you can be on your way to making (online) $$$ in no time!

    1. Download MetaGenerator.exe (may or may not be a trojan)
    2. Launch MetaGenerator.exe
      [​IMG]
    3. As this may or may not be a trojan, Windows (10, at least) will warn you that this application is not signed, and can't be trusted. Run it anyways, what could possibly go wrong?
      [​IMG]
      [​IMG]
    4. Pick a resource folder to monitor, and click OK.
      [​IMG]
    5. ???
    6. $$$!
      [​IMG]
    Every time a file changes in the chosen directory, the meta.xml is regenerated.
    Other XML elements like
    Code:
    <settings>
    and
    Code:
    <info>
    are preserved. Only file/script elements are refreshed.

    I also suggest backing up your current meta.xml, just in case.

    If you don't trust the .exe, download the source code instead, and compile it yourself ;-)

    Warning, use of this application may or may not result in certain death.
    Download

    Find any bugs? Create an issue on the GitHub issues page, or if you're a rockstar programmer, fix it yourself, and submit a pull request!
     
    Last edited: Jan 4, 2017
    Waisll, orenii, Lowi and 5 others like this.
  2. nvr

    nvr Member

    Messages:
    10
    Likes Received:
    2
    Joined:
    Dec 29, 2016
    Really good.

    Thanks
     
  3. andreasb

    andreasb Well-Known Member

    Messages:
    128
    Likes Received:
    61
    Joined:
    Aug 4, 2016
    This is great! Saves me a lot of time.
    However, I find myself forgetting to change certain elements in the generated meta.xml. For example third-party JavaScript libraries are inserted as <script src="..." type="client" lang="javascript" /> while they should be <file src=".." />. Can't say that I can think of a quickfix at the moment without enforcing a folder structure or similar...
     
  4. Eraknelo

    Eraknelo Active Member

    Messages:
    64
    Likes Received:
    61
    Joined:
    Dec 26, 2016
    Yeah, it's an issue I've been dealing with myself. And as you correctly noted, not real "easy" fix.
    It's going to need a new UI with some sort of properties per-file, or a folder exclusion/inclusion option.

    Lacking a bit of free time atm, but might look into it.
     
    andreasb likes this.
  5. Theory

    Theory aka Austin Global Moderator Wiki Moderator Developer

    Messages:
    59
    Likes Received:
    25
    Joined:
    Aug 6, 2016
    You could scan the file for very specific usage cases of the API (like onresourcestart). Though, this could add a bit of time to the generation.
     
  6. Eraknelo

    Eraknelo Active Member

    Messages:
    64
    Likes Received:
    61
    Joined:
    Dec 26, 2016
    I've personally fully switched to precompiled. My TypeScript compiles to a single .js file, and my C# code to a single .dll.
    much easier, but can't reload server code without restarting server.
    Oh well.
     

Share This Page