Jibble

Author Topic: LÖVE Setup v0.1 BETA -- Custom winsetup launcher  (Read 4649 times)

Daniel Eakins

  • Posts: 86
  • Time Traveller
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).
    • Make sure your file is SomeGame.love, not SomeGame.zip and not SomeGame.love.zip.
  • 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 := )
« Last Edit: 16 Dec 2017, 21:25 by Daniel Eakins »
We all have our time machines, don't we?

dbuske

  • Posts: 408
Re: LÖVE Setup v0.1 BETA -- Custom winsetup launcher
« Reply #1 on: 09 Nov 2013, 11:42 »
Cool, downloading now.
What if your blessings come through raindrops
What if your healing comes through tears...

Ghost

  • AGS Baker
  • Posts: 1,726
  • Nerf on!
    • Ghost worked on a game that was nominated for an AGS Award!
      Ghost worked on a game that won an AGS Award!
Re: LÖVE Setup v0.1 BETA -- Custom winsetup launcher
« Reply #2 on: 09 Nov 2013, 13:31 »
Suuuu-weet! Looks good and may actually make me learn a little LUA.

Calin Leafshade

  • Posts: 3,514
  • Long live King Cat!
    • I can help with making music
    • I can help with voice acting
    • Calin Leafshade worked on a game that was nominated for an AGS Award!
      Calin Leafshade worked on a game that won an AGS Award!
Re: LÖVE Setup v0.1 BETA -- Custom winsetup launcher
« Reply #3 on: 09 Nov 2013, 13:56 »
Seems a bit overkill to use love for just the set up program.

Daniel Eakins

  • Posts: 86
  • Time Traveller
Re: LÖVE Setup v0.1 BETA -- Custom winsetup launcher
« Reply #4 on: 09 Nov 2013, 14:01 »
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

  • Posts: 140
Re: LÖVE Setup v0.1 BETA -- Custom winsetup launcher
« Reply #5 on: 09 Nov 2013, 14:07 »
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

  • Posts: 86
  • Time Traveller
Re: LÖVE Setup v0.1 BETA -- Custom winsetup launcher
« Reply #6 on: 09 Nov 2013, 14:24 »
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

  • Posts: 8,732
    • Best Innovation Award Winner 2013, for spearheading the AGS 3.3.0 project
    • Lifetime Achievement Award Winner
    • Crimson Wizard worked on a game that was nominated for an AGS Award!
      Crimson Wizard worked on a game that won an AGS Award!
Re: LÖVE Setup v0.1 BETA -- Custom winsetup launcher
« Reply #7 on: 09 Nov 2013, 14:37 »
Finally! Now we can remove winsetup code from the engine :tongue:.

Also, this is a portable program, right?

Daniel Eakins

  • Posts: 86
  • Time Traveller
Re: LÖVE Setup v0.1 BETA -- Custom winsetup launcher
« Reply #8 on: 09 Nov 2013, 15:44 »
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

  • Posts: 8,732
    • Best Innovation Award Winner 2013, for spearheading the AGS 3.3.0 project
    • Lifetime Achievement Award Winner
    • Crimson Wizard worked on a game that was nominated for an AGS Award!
      Crimson Wizard worked on a game that won an AGS Award!
Re: LÖVE Setup v0.1 BETA -- Custom winsetup launcher
« Reply #9 on: 09 Nov 2013, 15:47 »
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

  • Local Moderator
  • Posts: 8,853
  • * KILL* * KILL * * KILL *
    • Lifetime Achievement Award Winner
Re: LÖVE Setup v0.1 BETA -- Custom winsetup launcher
« Reply #10 on: 09 Nov 2013, 16:01 »
I mean, will it work on other platforms (like Linux)? :)

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

  • Posts: 86
  • Time Traveller
Re: LÖVE Setup v0.1 BETA -- Custom winsetup launcher
« Reply #11 on: 16 Dec 2017, 21:25 »
The broken link has been corrected.
We all have our time machines, don't we?