Author Topic: AGI/SCI Installer Generator  (Read 6395 times)

0 Members and 1 Guest are viewing this topic.

Offline Collector

AGI/SCI Installer Generator
« on: November 08, 2015, 11:48:02 PM »
In the other thread we were discussing publishing games. I mentioned that I had developed such a feature in our AGI-SCI Developer project. I said that I would look into extracting it from that project for use with Companion. It took me some time to get around to it, but I have started. It was a little more involved than I was anticipating as it is very dependent on a lot of the variables being populated from several different parts of the IDE as a game project is created and developed.

Anyway, to populate those variables I Created a form with fields to input that information and added the script editor from Developer. The information can be manually entered, but upon browsing to the path of the target project, the utility will try to determine the template or engine of the game. This allows it to set the proper configuration for DOSBox and use the right run and configuration tool. It will use the name of the game's folder for the game name. This can be changed in the name field. Once all of the fields have been set all that is needed is to click the Publish button. This generate an NSIS script. It will create an 'Include' folder that anything you to add. It will copy a run utility (renamed to the game's name), an empty license and readme files into this Include folder. The publish function will scan the includes folder and add all files to the installer.

It will then open the new script in the editor for examination and editing. When you click the compile button it looks for your installation of NSIS and pass the script to the compiler. It displays the output from the compiler and any error/warnings and usually IDs the line where the error occurred. A copy of DOSBox and a configuration tool will be added to the installer.

I am considering additional features such as being able to specify icons.


KQII Remake Pic

Offline troflip

Re: AGI/SCI Installer Generator
« Reply #1 on: November 09, 2015, 02:18:46 AM »
Excellent, this looks like it will be really useful!
Check out my website: http://icefallgames.com
Groundhog Day Competition

Offline Collector

Re: AGI/SCI Installer Generator
« Reply #2 on: November 17, 2015, 12:14:58 AM »
Well I have this ready for testing if anyone is interested.
KQII Remake Pic

Offline Collector

Re: AGI/SCI Installer Generator
« Reply #3 on: November 17, 2015, 06:52:30 PM »
No interest? I had intended this to add a publish function for Companion, but if no  one wants it I see no point in posting it.
KQII Remake Pic

Offline MusicallyInspired

Re: AGI/SCI Installer Generator
« Reply #4 on: November 17, 2015, 07:02:39 PM »
I was at work. Like others probably were as well. I'm interested.
Brass Lantern Prop Competition

Offline troflip

Re: AGI/SCI Installer Generator
« Reply #5 on: November 17, 2015, 09:27:13 PM »
It might be nice to support a "plugins" folder in Companion, so someone could drop your installer into the folder, and it would then be easily accessible from a menu in Companion.

Is there a way to invoke your exe with a game folder as a parameter?

I'm trying to think of how there could be a common way for plugins to be initialized with the game folder. I could set the current directory when I start the .exe, but some plugins might not work if the current directory isn't their directory... or maybe that's not an issue?

If that doesn't work, there could be some kind of cmdline.ini included with the plugin or something, and it would have the cmd line to pass to the exe, with a special token (e.g. %0) where the game folder should be.
Check out my website: http://icefallgames.com
Groundhog Day Competition

Offline Collector

Re: AGI/SCI Installer Generator
« Reply #6 on: November 18, 2015, 02:26:26 AM »
I had posted about it Monday night. The reason that I am a bit reluctant to post it if there was no interest is that some of the AVs only look at small parts of a file and if it matches something that has been ID as malware it will flag it. Some flag NSIS installers based on the stub files that are in all NSIS installers because some have used NSIS to deliver malware. The script that this tool will generate borrows from a number of characteristics of my installers and I didn't want someone using it for nefarious purposes that could cause more false positives for my new installers.

Anyway, I have been thinking about how it could be used seamlessly with Companion. Within Developer it was just a couple of classes that drew variables from the current project loaded into the IDE. One thought that I had was if Companion had a drag and drop launchbar a shortcut to my tool could be dropped on it.

I could add a parameter to load the project's folder. It will already populate most of the fields just with specifying path. Of the few remaining fields defaults can be set in the options to automatically populate those fields. I could disable launching the form without a parameter so it would be limited to working from within Companion. That would make it less likely to be abused. I'll attach a zip in the SHP developer's forum so I won't have to publicly post it until it can be packaged with Companion. MI already has access to that forum and I'll add you to the group that has access.
« Last Edit: November 18, 2015, 02:57:53 AM by Collector »
KQII Remake Pic

Offline troflip

Re: AGI/SCI Installer Generator
« Reply #7 on: November 18, 2015, 03:01:16 AM »
The script that this tool will generate borrows from a number of characteristics of my installers and I didn't want someone using it for nefarious purposes that could cause more false positives for my new installers.

But wouldn't that be an issue if it shipped with Companion anyway?

Anyway, I have been thinking about how it could be used seamlessly with Companion. Within Developer it was just a couple of classes that drew variables from the current project loaded into the IDE. On thought that I had was if Companion had a drag and drop launchbar a shortcut to my tool could be dropped on it.

Ideally I'd like minimal implementation work :-). Plus a drag/drop launcher bar sort of conflicts with your stated goal of it not operating outside Companion. It sounds like you want it packaged with Companion? My impression is that you don't want the source code to be public (and checked into github along with Companion), is that right? Be aware that Companion is licensed under GPL 2 or higher, I'm not sure what implications that has with packaging a closed-source binary with it (I think it's ok, but not sure).

I could add a parameter to load the project's folder. It will already populate most of the fields just with specifying path. Of the few remaining fields defaults can be set in the options to automatically populate those fields. I could disable launching the form without a parameter so it would be limited to working from within Companion. That would make it less likely to be abused.

I think the ideal situation is that it just takes a single unnamed parameter which is the folder. That seems like a simple "contract" that any plugins can adhere to. Of course, it can pull more info out of game.ini (game name, etc..) if necessary.
Check out my website: http://icefallgames.com
Groundhog Day Competition

Offline Collector

Re: AGI/SCI Installer Generator
« Reply #8 on: November 18, 2015, 03:46:12 AM »
I just didn't want to publicly post it if there was no interest. I think I can minimize the risk of abuse by having it require a parameter passed to start. That would not prevent someone from finding workarounds, but might be inconvenient enough to discourage use out side of companion. I haven't set a license for it yet. If there is a conflict I'll deal with it then. One solution would be to not bundle it with Companion. Whatever control you have to invoke the tool could issue a message if it is not found, much like Soundbox for SCI Studio and the old Companion. It could be on the Wiki as well as hosted here.

Anyway, give it a try and then we can work out how to integrate it.
KQII Remake Pic


SMF 2.0.19 | SMF © 2021, Simple Machines
Simple Audio Video Embedder

Page created in 0.046 seconds with 23 queries.