Component Builder

Discussion in 'Component and Mod Packaging' started by Noel Hibbard, Mar 25, 2014.

  1. Noel Hibbard

    Noel Hibbard Registered

    Joined:
    Oct 5, 2010
    Messages:
    2,744
    Likes Received:
    40
    I made a new tool for building packages. It looks a lot like the MAS2 tool after clicking the package button and then the create single cmp button. My tool has a few advantages. One is it lets you setup some defaults like Author and URL so you don't have to type them every time. It also can save a .cmpinfo file with all the package details which you can open later to repackage another time without having to type all the info again. Once you save a .cmpinfo file you can just double click on it to open it in my tool. Or you can right click on it and select Package and it will package without even prompting for any info. The tool can also open .MFT files. MFT files can be found in your Installed folder. So for example you can install Sebring.. Then open explorer and go to:
    Code:
    <datapath>\Installed\Locations\Sebring_Virtua_LM\1.90
    In there you will see all the mas files and an MFT file. You can double click on the MFT file and it will come up in my tool and show all the details about the component. From there you can change the GetMod URL and then click package and it will spit out a new rfcmp file (in the same folder) with your changes.

    The tool also has some command line options which will help with batch rfcmp creation.

    Here are the options:
    Code:
    --file=<mft or cmpinfo file> [--version=<version>] [--package]
    
    --package tells the tool to open the cmpinfo file specified by with the --file option and then package it and close. --version=<version> tells the tool to update the version number when creating the new package and it also saves the new version number in the cmpinfo file.

    The tool probably has some bugs so maybe you guys could mess around with it and report any problems you find.

    This tool along with the new ModMgr command line options should allow modders to fully automate the packaging process. I was able to fully script the process on a 900MB mod and it takes about 1min to run through the whole process of updating the MAS files with the latest files and then building the individual rfcmp files and all I have to do is double click on a single batch file.

    Here is a download link:
    http://www.mediafire.com/download/o614b7rdl4zo7dn/cmppack.exe

    You must save this file into your Core folder right beside the other EXE files (rFactor2.exe, ModMgr.exe, ect). The first time you run the tool it pops up the setting dialog where you can type your default Author, URL, output path (where you want it to place the rfcmp files) and the path to the MAS2.exe file. You can leave all of these blank except for the path to the MAS2 Tool. On first run it will also build file associations and context menus for .cmpinfo and .mft files.

    Also check out my MAS extraction tool in this thread:
    http://isiforums.net/f/showthread.php/18947-MAS-file-extractor-rfcmp-Installer

    With the combination of these two tools and the new ModMgr.exe command line options you can script full builds with ease.


    Here is a screenshot of me going into the Installed folder for ISI's Camaro and then double clicking on the camaro_car.mft file. From here I could change details about the car and then click Package to create a new rfcmp file.:
    Image 2.png

    Change Log:
    1.0.0.0: First release
    1.0.0.1: Some error checking for stuff like missing mas files ect. Also added a "Save As" button so you can open a .cmpinfo file for one car, change the MAS list, name, ect and then save it with a new filename. The date field shows a real date now rather than an epoch date. When you create a new component it defaults to today's date. I also rearranged some buttons and changed some verbage a little.
    1.0.0.2: Switched output path and mas file paths to be relative to the working directory of cmppack.exe. This makes it easier to create a more portable built environment that can be shared with other team members.
    1.0.0.3: Added an option to the settings dialog to turn relative paths on or off. By default relative paths are disabled.
    1.0.0.4: Fixed bug which was causing the tool to not create correct relative paths.
    1.0.0.5: Fixed bug when saving cmpinfo files without having a catagory and/or origin set.


    Click here to donate
     
    Last edited by a moderator: Nov 14, 2014
  2. Backdraft26

    Backdraft26 Registered

    Joined:
    Dec 23, 2011
    Messages:
    144
    Likes Received:
    0
    Thanks again :) I will try it tomorrow... It's your job to make programs ?

    Envoyé de mon Nexus 7 en utilisant Tapatalk
     
  3. Noel Hibbard

    Noel Hibbard Registered

    Joined:
    Oct 5, 2010
    Messages:
    2,744
    Likes Received:
    40
    Are you asking if I write software as a profession? If so, yes but I write boring business software. Writing tools for my hobby is way more fun. :)
     
    Barnaudprod likes this.
  4. crz

    crz Registered

    Joined:
    Sep 22, 2012
    Messages:
    299
    Likes Received:
    0
    Thank you Noel, exactly what I needed!
     
  5. Juergen-BY

    Juergen-BY Registered

    Joined:
    Jun 16, 2012
    Messages:
    3,089
    Likes Received:
    440
    Thanks Noel, very usefull tool. Could you maybe integrate the option for updates?
     
  6. Noel Hibbard

    Noel Hibbard Registered

    Joined:
    Oct 5, 2010
    Messages:
    2,744
    Likes Received:
    40
    As with most of my tools I make them for my own use and then later make them more user friendly, add some configuration options and then release to the public. I personally don't use updates because they don't support GetMod so I never added support for them. But it shouldn't be that hard to add to the tool. I will work on that this week.
     
  7. Juergen-BY

    Juergen-BY Registered

    Joined:
    Jun 16, 2012
    Messages:
    3,089
    Likes Received:
    440
    Thanks!
     
  8. SPASKIS

    SPASKIS Registered

    Joined:
    Sep 7, 2011
    Messages:
    3,155
    Likes Received:
    1,426
    Thanks Noel. I havent tried it yet but I will use it for the next component I create. Thanks for working on updates. I still use them and hopefully ISI will solve the existing problems with them soon.

    For the get mod problem with updates. My suggestion for ISI would be the following:

    As I have stated before when a component is updated, both the original and updated versions should appear as installed in mod manager. One needs the other but both exist. Actually when creating a vmod, both can be seen and selected.
    When an updated component is selected, both components data should be included in the vmod manifest. With both URLs, of course.

    With that info getmod utility woukd know that one component requires another one to be installed as well and would have the sig and URL for download.

    enviado mediante tapatalk
     
  9. Noel Hibbard

    Noel Hibbard Registered

    Joined:
    Oct 5, 2010
    Messages:
    2,744
    Likes Received:
    40
    My thoughts exactly. It can't possibly be that hard to include them all in the vmod. The only tricky part would be that they would need to be installed in the correct order to avoid dependency problems. Right now it downloads a cmp and then installs it and then moves to the next download and then when all are done in installs the actual vmod. So it would need to be smart enough to order them correctly in the vmod so they are downloaded and installed in the correct order. Again, it couldn't possibly be that hard. I think this is just one of those things where they added the get missing components feature after they already designed the way they wanted vmods to work. They just need to go back and include all the dependencies in the vmod. I finally figured out how to build my own vmods. Maybe I could include dependencies and have it actually work. I will try this right now.

    Edit: My vmod creation tool lists all installed components, including MultiCmps and upgrade cmps. So I was able to select a car, sound and two track cmps, one track was the original and the second track was just the update. My tool then generates a pkginfo.dat that gets passed to the MAS2 tool to do the actual build. Unfortunately MAS2 complains about me having duplicate mas files. So it looks like we can't hack our way around this limitation. Darn.. I was getting excited.
     
    Last edited by a moderator: Jun 24, 2014
  10. Leonardo1962

    Leonardo1962 Registered

    Joined:
    Feb 12, 2012
    Messages:
    247
    Likes Received:
    69
    great tool,

    I will test it as soon as possible. (weekend)

    Thanks for it.

    Leonardo1962 ;)
     
  11. PlickBadger

    PlickBadger Registered

    Joined:
    Jan 12, 2012
    Messages:
    534
    Likes Received:
    8
    Just found this tool - it's greatness! thanks for sharing
     
  12. Noel Hibbard

    Noel Hibbard Registered

    Joined:
    Oct 5, 2010
    Messages:
    2,744
    Likes Received:
    40
    Glad you like it. It makes repetitive tasks a little more streamlined. Especially if you use the command line options for the tool along with the command line options on ModMgr for building mas files. You can take a car that you have in DevMode and fully automate the build process with a batch file. Double click the batch file and out comes a new rfcmp containing your latest changes from DevMode.
     
  13. Andy Bonar

    Andy Bonar Registered

    Joined:
    Mar 17, 2011
    Messages:
    639
    Likes Received:
    93
    I've just downloaded it hoping it can help me to create a new rfmod....basically a mod purely same as original but with new team skins in. Will try it out tonight
     
  14. Leonardo1962

    Leonardo1962 Registered

    Joined:
    Feb 12, 2012
    Messages:
    247
    Likes Received:
    69
    Works Fine .

    Good Job.


    Leonardo :)
     
  15. cubbi

    cubbi Registered

    Joined:
    Jul 8, 2013
    Messages:
    90
    Likes Received:
    1
    I just tried out the fully automated mode - awesome :D Just makes everything so easy

    A small bug I encountered:

    If the Mas2.exe window opens up outside of the visible screen, the program will crash (and not pack). I guess this is because the mouse arrow cannot reach the buttons.
    (Sometimes my Mas2.exe is outside the visible area when I switch between EyeFinity and native 3 screen mode).

    If you ever do an update, maybe you could center the Mas2.exe before applying any button clicks.

    Fix for endusers: Open Mas2.exe, Press ALT+Space, then click on "move" and move the window to the center of your screen.
     
  16. Noel Hibbard

    Noel Hibbard Registered

    Joined:
    Oct 5, 2010
    Messages:
    2,744
    Likes Received:
    40
    Microsoft's UI automation libraries have several limitations, this is one of them. I need to spend some time trying to improve on this, like centring the window for example. Microsoft's UI automation stuff doesn't actually emulate mouse clicks, but they have this attitude that they will only let you automate stuff that the end user is capable of seeing. I would love to run MAS2 fully hidden, but that would break the automation due to MS's limitations.

    What would really be nice is if ISI gave us some cmd line options for MAS2. Then I wouldn't have to automate the UI. UI automation is always buggy. I'm actually surprised with how reliable my code has been actually.
     
  17. SPASKIS

    SPASKIS Registered

    Joined:
    Sep 7, 2011
    Messages:
    3,155
    Likes Received:
    1,426
    I just tried your tool and it works great.
    One good thing that mas2.exe has and I miss in your tool is that it starts with the latest component you built.
    I think that one thing that all the people that we program or develop make mistakes and need to do things over and over.
    I usually pack several times the same version before I am happy with it.

    I am really worried you didn't notice this yourself... ;)

    Edit: BTW It will not save my deault output folder, author or URL in the settings :(
     
  18. Noel Hibbard

    Noel Hibbard Registered

    Joined:
    Oct 5, 2010
    Messages:
    2,744
    Likes Received:
    40
    My mommy taught me that typically when someone constantly tries to insult other people's intelligence or tell others how smart they are that they are actually insecure about their own intelligence. You seem to alway find a way to insult people in all of your posts.

    Anyways, the idea behind the tool is to save the profile so that rebuilding a component over and over is very simple. You can even build a component via command line. I'm actually worried you didn't notice that yourself. Oh wait I need to add a ;) so it's okay to be insulting.
     
  19. SPASKIS

    SPASKIS Registered

    Joined:
    Sep 7, 2011
    Messages:
    3,155
    Likes Received:
    1,426
    You misunderstood my post Noel. I consider all your tools very professional. I really didnt mean to insult you. You can believe me or not.

    I actually was surprised that you didnt consider that the tool opened with last component since mas2.exe does so.

    Sorry if offended you.
     
  20. rer8

    rer8 Registered

    Joined:
    Dec 19, 2010
    Messages:
    492
    Likes Received:
    23
    Hello Noel. First let me thank you for your response to the questions I asked in a private message. The version of the tool I am using is the one listed in your first post above.... cmppack.exe As stated in my note to you I have removed and reinstalled both the MAS2 and cmppack tools in the original / recommended folders. I made shortcuts to each and placed them on my desktop.I activated the cmppack tool and the the MAS2 tool was automatically activated. After waiting more than 10 minutes with no faults reported but no apparent activity I pressed the Done button on the MAS2 window, and all 3 windows greyed and I activated the task manager and closed both programs which were not responding. No other programs were active at the time of my attempt to compile my mod. Perhaps the attached image will help tell the story. Thanks for your kind consideration and help.
    Randy

    My computer information:
    Motherboard Manufacturer ASUSTeK COMPUTER INC.
    Product Name MAXIMUS VI HERO Version Rev 1.xx S/N 13....
    CPU Socket Designation SOCKET 1150
    Manufacturer Intel
    Version Intel(R) Core(TM) i5-4670K CPU @ 3.40GHz
    8 GB Ram
    Nvidia 770 2GB
    850 Watt PSU

    View attachment 13778

    View attachment 13780

    I looked at your image above and noticed the file name convention, and changed the file names, and updated the selected .mas files in the builder... my results were the same. I haven't given up. :)

    I am still having difficulty in getting it to work... When I determine the fix, I will edit this post with an answer.
     
    Last edited by a moderator: Aug 4, 2014

Share This Page