How to make "Get Missing Components" actually work

Discussion in 'Component and Mod Packaging' started by Noel Hibbard, Sep 9, 2013.

  1. Noel Hibbard

    Noel Hibbard Registered

    Joined:
    Oct 5, 2010
    Messages:
    2,744
    Likes Received:
    40
    That is great. Thanks for your efforts!
     
  2. Noel Hibbard

    Noel Hibbard Registered

    Joined:
    Oct 5, 2010
    Messages:
    2,744
    Likes Received:
    40
    I used AutoHotkey to automate the process of repacking components. To use it, place Repack.exe in the Core folder (in the same folder that ModMgr.exe is in) and then double click on it. It will first prompt for you GetMod URL (You can optionally create a shortcut to Repack.exe and supply your GetMod URL on the command line). Paste your URL there. Then click okay. It will then run the ModMgr. You now have to select the component you want to repack. Make sure the component is installed. Once the component highlighted you then hit Ctrl+Alt+R on the keyboard and then let it do it's thing. It first renames the original package to <OrigionalPackageFileName>.rfcmp.back as a backup and then builds a new identical rfcmp file with the original file name in the original location but using your own GetMod URL. When it is done it will close MAS2 and then return to the ModMgr and uninstall the original rfcmp. If you want to then install your new one you will have to do that yourself. If you want to repack another component, just highlight it and then hit Ctrl+Alt+R again. When you are all done just close the ModMgr and Repack.exe will close.

    Automating stuff like this is never very reliable so it may fail to run on some systems. I tested it on a machine running Win8.1x64. It should work on any OS though.

    Here is a link to a compiled version of the script:
    https://www.dropbox.com/s/bf9mu94p2frk3j0/Repack.exe

    And here is the current source code for those that have experience with AutoHotkey and want to know exactly what the script does:
    https://www.dropbox.com/s/zih8ayr9i0ryooi/Repack.ahk

    This makes repacking a 3 second fully automated process.

    Now please, ISI, give us some APIs so we don't have to make hacky scripts to automate this stuff. :)
     
    Last edited by a moderator: Mar 5, 2014
  3. DJCruicky

    DJCruicky Registered

    Joined:
    Jan 25, 2012
    Messages:
    1,595
    Likes Received:
    1,156
    Sounds good.
    I tried it on my Windows XP 32 bit,
    got...
    D:\rfactor2\Core\Repack.exe is not a valid Win32 application

    DJC
     
  4. Noel Hibbard

    Noel Hibbard Registered

    Joined:
    Oct 5, 2010
    Messages:
    2,744
    Likes Received:
    40
    Interesting. Maybe I have a 64bit version of AutoHotkey. I will look into it in the morning.
     
  5. DJCruicky

    DJCruicky Registered

    Joined:
    Jan 25, 2012
    Messages:
    1,595
    Likes Received:
    1,156
    Hi Noel, I've been having no problems with your Get Missing Components PHP system with my track updates (big thanks again). But after this new build I've had a few reports of people not being able to download them no more. Do you know if something is now broke with the new build and your PHP system?
    I am well aware of all the other multiplayer problems this new build has brought.

    Cheers

    DJC
     
  6. Backdraft26

    Backdraft26 Registered

    Joined:
    Dec 23, 2011
    Messages:
    144
    Likes Received:
    0
    Thanks Noel, I'm going to test :)
     
  7. Backdraft26

    Backdraft26 Registered

    Joined:
    Dec 23, 2011
    Messages:
    144
    Likes Received:
    0
    I tried it, I must launch repack.exe in administrator, and well done! Great Job, thank you. I'm going to diffuse it on french forum :)
     
  8. Woodee

    Woodee Registered

    Joined:
    Oct 4, 2010
    Messages:
    4,010
    Likes Received:
    1,071
    I got my vmod to work on my league server today with dropbox as a download location.... many thanks Noel!
     
  9. Noel Hibbard

    Noel Hibbard Registered

    Joined:
    Oct 5, 2010
    Messages:
    2,744
    Likes Received:
    40
    I updated this tool and this time I made it 32bit so it should now work for everyone. I also slowed it down a bit and added the ability to change the version number while repacking. So now you can install a track or car... Extract the mas files... make some changes, then repack the mas files and then come back to my tool to repack the track and while you're at it, increment the version number. I also found a bug which I fixed at the same time.

    Oh and the output file works like this now, <mod_name>_<version_number>.rfcmp. If the mod name has spaces in it, they will be replaced with "_" in the output file name. This will keep the original rfcmp in tact. If the output file happens to be identical to the original filename, the original will be backed up first.
     
  10. Juergen-BY

    Juergen-BY Registered

    Joined:
    Jun 16, 2012
    Messages:
    3,089
    Likes Received:
    440
    Just a noob question again: is there a limitation to the mod-id length?
     
  11. Noel Hibbard

    Noel Hibbard Registered

    Joined:
    Oct 5, 2010
    Messages:
    2,744
    Likes Received:
    40
    Mod is? As in the six character id in the rfcmp files that is actually not even used anymore?
     
  12. Juergen-BY

    Juergen-BY Registered

    Joined:
    Jun 16, 2012
    Messages:
    3,089
    Likes Received:
    440
    Good to know...yes, i did this meant. By the way, a proper documentation for server admins would be nice. ISI maybe don`t realised, that they do the more business the more server are hosted...Behind each dedicated server or maybe behind the most of them, there is a simracing community, where are driver. Each driver need rF2 to join the server ;-)
     
  13. endonesia

    endonesia Registered

    Joined:
    Oct 5, 2010
    Messages:
    79
    Likes Received:
    0
    Hi Noel, thanks for doing this.

    I have the error -

    Failed. This SubmitID may already be in use.

    70'sGlen.rfcmp, what can I do to fix this?
     
  14. Noel Hibbard

    Noel Hibbard Registered

    Joined:
    Oct 5, 2010
    Messages:
    2,744
    Likes Received:
    40
    What is the sig and what is your username? I will look into it.

    Edit: I am guessing your username is endonesia. I notice you already have a component named "watkins glen" with this sig: a2ab266c4d39074b493e625d977b9796fb0ad969a0c7471dfa8c8b9d490c8f05
    You aren't trying to add the same component again are you? You can't register the same sig more than one time. If you want to add more URLs to the same sig then just click edit on the one you already registered and add more URLs to it. BTW, sig is the same thing as Submit ID.
     
    Last edited by a moderator: Mar 27, 2014
  15. endonesia

    endonesia Registered

    Joined:
    Oct 5, 2010
    Messages:
    79
    Likes Received:
    0
    No, the Submit ID is different from any I already have uploaded.

    I'm guessing it conflicts with others ID's using your service.

    Submit ID - ee61e89552d6cbadb54e6cd25e51a2b0adf89429a4dd86c42b28879d27ec7799
     
  16. Noel Hibbard

    Noel Hibbard Registered

    Joined:
    Oct 5, 2010
    Messages:
    2,744
    Likes Received:
    40
    It stores sigs by user so they don't conflict. You must have come across a bug. What is the sig you were trying to register?
     
  17. endonesia

    endonesia Registered

    Joined:
    Oct 5, 2010
    Messages:
    79
    Likes Received:
    0
    This one^^
     
  18. Noel Hibbard

    Noel Hibbard Registered

    Joined:
    Oct 5, 2010
    Messages:
    2,744
    Likes Received:
    40
    Strange, I cant see that from my phone using TapaTalk but I do in the web browser. I will take a look at this sig and let you know what I find.
     
  19. Woodee

    Woodee Registered

    Joined:
    Oct 4, 2010
    Messages:
    4,010
    Likes Received:
    1,071
    Is Google drive not suitable for GetMod?

    This thread SHOULD be a sticky ;)
     
  20. Noel Hibbard

    Noel Hibbard Registered

    Joined:
    Oct 5, 2010
    Messages:
    2,744
    Likes Received:
    40
    I am not sure. I haven't tried it in a long time. The requirements are that you need a direct link that doesn't require HTTPS. Some links seem direct but there is actually some cookie exchanging and a bunch of redirects behind the scene. The HTTP client in rF2 only supports one redirect, it doesn't support HTTPS and it doesn't handle cookies so it severely limits the options. I will take a look at Google Drive this weekend and see if I can get anywhere with it.
     

Share This Page