Results 1 to 9 of 9

Automated HW2 WinRar Setup script with correct shortcut -mod syntax

  1. Child's Play Donor General Discussions Senior Member Homeworld Senior Member The Workshop Senior Member  #1
    Ignorans, te absolvo Homdax's Avatar
    Join Date
    Sep 2003
    Location
    <!--- SWEDEN>

    Automated HW2 WinRar Setup script with correct shortcut -mod syntax

    For Mod Packagers:

    I have tested out a script that will work with WinRar in order to AUTOMATE the setup process of ANY HW2 Mod (.big-file) and automatically create a relevant shortcut on desktop with correct command line shortcut syntax for the Mod in question.

    How to use it with WinRar 3.xx and above:
    Move Your .big-file to any folder. Have if You want, a .txt-file with Credits and information.

    In any folder select Your folder Data that shall contain .big-file and Your .txt-file that should have been named according to your Mod.
    Right-click> Add to Archive (assuming WinRar is installed )



    Select the following Parameters, "Archive Name" anything you want:



    I suggest You set a decent Recovery Record size which would allow for repair of a damaged archive, if necessary. Hit the SFX Options:



    Set the path, (default Homeworld 2) and to "Run after extraction" any one .txt-file of your choice. Correct name is important and the file should be located in the root of the folder from which you create this archive, otherwise you will have to set the correct path. I use this txt.-file to show information about the Mod after it is installed, it may be skipped.



    After hit the ADVANCED tab and the Add Shortcut button to type in the shortcut path with -mod syntax. The first field is important! Get it right as it is and alter only the part with correct .big-file name, which is the one You made for your Mod! Adjust the Shortcut Description (mouse over pop-up) and Name and to suit your Mod name. Hit OK when ready:



    That was the important part...phew...

    There are more tabs in Winrar, "License" gives You the option to specify an ACCEPT OR DECLINE Dialogue and "Text and Icon" allows You to enter text that could display Credits, setup or gameplay instructions. Even adding a nifty custom HW Icon from a .ico file You might have.

    I suggest You save all this by clicking "Profiles" up in the first screenie above and add You HW2 Mod packaging as a profile to be selected when needed.

    I hope this will work for everyone. It does for me.

    RESULT:
    When using this, any player will be able to "Install" the Mod in to hes/hers Game Directory and a relevant correct shortcut will be created on hes desktop, provided he selected the correct folder.
    Adopting a relevant naming convention for .txt and .big-files, should give any user the possibility to have UNLIMITED number of Mods installed, all with their relevant shortcut on desktop.

    This would resolve all shortcut command line issues and make the Mod installation very user-friendly. At least for Homeword 2 Mods.

    Thank You
    Homy
    Last edited by Homdax; 20th Apr 05 at 1:25 AM.
    HWSHOTS | JST-ONLINE | HOMEWORLD ARCHIVES | CROSSFIRE
    TEH ALL POWAFUL "PLEASE MAKE HOMEWORLD 3" PETITION
    NEWS! "hwaccess.net" and related sites have a new home at
    www.homeworldaccess.net. Still WIP.

  2. #2
    wuyanxu
    Guest
    nice, thanx

    though it took me some time to be able to read your Windows interface

  3. Child's Play Donor General Discussions Senior Member Homeworld Senior Member The Workshop Senior Member  #3
    Ignorans, te absolvo Homdax's Avatar
    Join Date
    Sep 2003
    Location
    <!--- SWEDEN>
    Lol, I know, I rushed it up late last night and did not think of that readability....
    I might replace those screenies, but expanding this issue on another place.
    Last edited by Homdax; 20th Apr 05 at 4:16 AM.

  4. #4
    Banned Jaen-ni-rin's Avatar
    Join Date
    Mar 2004
    Location
    Poland
    Works.

  5. #5
    jodonnell
    Guest
    Very interesting

    Is it possible to get the script to dynamically fetch the user's install pathfrom the Registry? Or will this only work if the user has installed the app to C:\Program Files\Homeworld2?

  6. Child's Play Donor General Discussions Senior Member Homeworld Senior Member The Workshop Senior Member  #6
    Ignorans, te absolvo Homdax's Avatar
    Join Date
    Sep 2003
    Location
    <!--- SWEDEN>
    I will put up a test for all to see its functionality user-side, and I will expand on and retake those screenies above.

    I think You are overcomplicating it, Jo.
    This is not an installer. Its basically an unpacker, that support some scripting stuff. Like WinZip Selfextractor, but without the extra licensing cost. The scripting abilities are available in WinRar from start, at no extra cost or plugins requirements.
    If one would take a look at the resulting script, by opening a packed file in WinRar, it would look something like this:

    SAMPLE SCRIPT - DO NOT USE
    Code:
    ;The comment below contains SFX script commands
    Path=Homeworld 2
    SavePath
    Setup=modrelated.txt
    Title=This is a very nifty mod Window TITLE
    Text
    {
    This is a very nifty mod Window TEXT
    }
    License=This mod is subject to the following license Window TITLE
    {
    This mod is subject to the following license Window TEXT 
    }
    Shortcut=D, "Bin\Release\Homeworld2.exe -mod mod.big", "", "Mod related mouseover shortcut text", "Name of shortcut"
    The ONE BIG ISSUE this solve is the automated shortcut generation.
    User will be asked where to unpack files, and shortcut will be created in relation to that. And unpack will of course have to be to the \Homeworld 2\ root. Where ever it may be.

    If a user altered the original Installation Path, it makes no difference. [ D:\Games\Sierra\HW2\ ] will work as well as the default.

    User can still do wrong, but its harder. And it will not be because of the shortcut command syntax.

    This requires no special software and really no skills whatsover to do right, and then I am thinking of the Mod Packager as well as on the user. It takes less than a minute to pack a 51 Mb .big file on a decent PC. And saves You 9 MB download, plus adds the shortcut functionality and works almost as an installer.

    Homy
    Last edited by Homdax; 21st Apr 05 at 1:36 AM.

  7. #7
    Banned Jaen-ni-rin's Avatar
    Join Date
    Mar 2004
    Location
    Poland
    Jodonnell, if you want such functionality you need to use Inno Setup. That will be ok for you.
    Homy is just presenting easiest way to do this if you want to have more possibilites, then use mentioned program.

  8. Child's Play Donor General Discussions Senior Member Homeworld Senior Member The Workshop Senior Member  #8
    Ignorans, te absolvo Homdax's Avatar
    Join Date
    Sep 2003
    Location
    <!--- SWEDEN>
    A test file. 1.4 MB.
    You will not be able to start a game with it, unless You rename a .big-file to "mod.big".

    http://www.hwaccess.net/PUBIMG/MODPACKTEST.EXE

  9. #9
    jodonnell
    Guest
    Quote Originally Posted by HomeAgain!
    The ONE BIG ISSUE this solve is the automated shortcut generation.
    User will be asked where to unpack files, and shortcut will be created in relation to that. And unpack will of course have to be to the \Homeworld 2\ root. Where ever it may be.
    Ah OK, so it is a relative file path. Excellent, that helps a lot. Thanks again, I'll look into adding this functionality to PDS!

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

     

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •