LÖVE Setup v0.1 BETA -- Custom winsetup launcher

Started by Daniel Eakins, Sat 09/11/2013 02:43:07

Previous topic - Next topic

Daniel Eakins

LÖVE Setup for Adventure Game Studio is a setup launcher that I wrote as an alternative to AGS's default winsetup.exe. It is written in Lua, using the LÖVE framework.

This is its default appearance:


This launcher relies primarily on a LÖVE library, Löve Frames, written by Kenny Shields. This library features a skinning system that you can use to easily change the appearance of this default GUI even you have little knowledge of Lua:



If you do know Lua, of course, you can modify everything in the script to further customize your GUI. I tried to keep the code as organized and as easy as possible to understand. Here is an example of a different GUI with non relevant options removed and French text:


Main benefits over the default winsetup:

  • 100% customizable.
  • Many improvements possible: For example, graying out incompatible resolutions instead of letting you selecting them is possible with coding, but I haven't implemented that yet.
  • Potentially cross-platform: Since this script is written using LÖVE (i.e. Lua), it should in theory work on Mac OS X and Linux. That said, I can only test it on Windows.
  • Easy to use for the player: The final launcher is a simple EXE file. The player doesn't need to install an interpreter or anything like that.

Minor drawbacks:

  • May not detect some translation files: There is no way in native Lua to automatically list the full content of a directory to detect the .tra files. However, the existence of specific file names can be checked, so I have pre-defined a list of over one hundred language names for the script to check. As long as the name of your translation file matches the English name of one of those one hundred languages, it will be detected. If it isn't, simply add its name to the script.
  • When actually launching the game, a terminal black window will flash up on the screen for a fraction of a second before disappearing. This is the only way to launch a program from a Lua script in Windows.

How to edit as a developer:

  • Download my LÖVE Setup script and decompress it in an individual folder.
  • Download the official LÖVE 0.9 client and decompress it in another folder.
    • Make sure it's the 32-bit version, even if you have a 64-bit Windows.
  • In a text editor, edit the script files however you want (the LÖVE wiki is helpful).
    • In main.lua, make sure you replace "Demo Game" with the name of your game executable (without the ".exe" part).
    • Also in main.lua, replace the default values in the acsetup_template string with your game's default settings (monkey_05_06's list will help).
    • In conf.lua, you can define an icon for the future launcher.
  • To launch the script for testing purposes, drag the script folder onto love.exe (or a file shortcut of it).

How to turn the script folder into an executable:

  • Compress LoveFrames, conf.lua and main.lua into a zip archive named SomeGame.love (where "SomeGame" is the name of your future launcher).
  • Put SomeGame.love and create_gamesetup_exe.bat in the same folder as the love.exe client.
  • Drag SomeGame.love onto create_gamesetup_exe.bat.
    • You now have a working EXE file, but it still requires all eight DLL files of the LÖVE client to run. You can either distribute all that with your game... or use a wrapper program to merge the setup executable and the DLL files into a single EXE file. Enigma Virtual Box (freeware) will do the job fine.

Download link:

LÖVE Setup v0.1 BETA

Have fun! (I hope := )
We all have our time machines, don't we?

dbuske

What if your blessings come through raindrops
What if your healing comes through tears...

Ghost

Suuuu-weet! Looks good and may actually make me learn a little LUA.

Calin Leafshade

Seems a bit overkill to use love for just the set up program.

Daniel Eakins

Quote from: Calin Leafshade on Sat 09/11/2013 13:56:23
Seems a bit overkill to use love for just the set up program.
I know but it's the only non-AGS language I know :grin: I don't even know native Lua, only the LÖVE version of it.
We all have our time machines, don't we?

EliasFrost

This made me wonder.. I've been thinking about doing my own setup for the game I'm making, though that's a bit far into the future. What I'm wondering is: are all the configuration options from the winsetup inside the .cfg file or are there under-the-hood stuff that I can't access through the .cfg?

Daniel Eakins

Quote from: Frostfalk on Sat 09/11/2013 14:07:29
This made me wonder.. I've been thinking about doing my own setup for the game I'm making, though that's a bit far into the future. What I'm wondering is: are all the configuration options from the winsetup inside the .cfg file or are there under-the-hood stuff that I can't access through the .cfg?
I think the only factors that affect winsetup but are not contained in the .cfg file are the existence of a speech pack (winsetup checks for a file named "speech.vox" to make the corresponding checkbox activable) and that of the translations (winsetup checks for *.tra files to fill the corresponding droplist).

The actual configuration options for these, however, are still in the actual .cfg file, as "usespeech" and "translation" (these keys only appear in the file only if they are set up with non-default values).
We all have our time machines, don't we?

Crimson Wizard

Finally! Now we can remove winsetup code from the engine :tongue:.

Also, this is a portable program, right?

Daniel Eakins

Quote from: Crimson Wizard on Sat 09/11/2013 14:37:41
Finally! Now we can remove winsetup code from the engine :tongue:.

Also, this is a portable program, right?
Yeah, the only thing trace it leaves on a computer is the acsetup.cfg file generated.
We all have our time machines, don't we?

Crimson Wizard

Quote from: Daniel Eakins on Sat 09/11/2013 15:44:29
Quote
Also, this is a portable program, right?
Yeah, the only thing trace it leaves on a computer is the acsetup.cfg file generated.
I mean, will it work on other platforms (like Linux)? :)

Gilbert

Quote from: Crimson Wizard on Sat 09/11/2013 15:47:16
I mean, will it work on other platforms (like Linux)? :)

Quote from: Daniel Eakins on Sat 09/11/2013 02:43:07
Main benefits over the default winsetup:

    ...
    • Potentially cross-platform: Since this script is written using LÖVE (i.e. Lua), it should in theory work on Mac OS X and Linux. That said, I can only test it on Windows.
All we need is someone who can try it.

Daniel Eakins

We all have our time machines, don't we?

SMF spam blocked by CleanTalk