I've used multithreading technique, so graphic interface, actions, and each script are on separate threads. Because of that, there should be no lags, and launcher should not crash(unless there're some problems in configuration)
Standart looks(yes i know, i'm not very good designer ):
Background image, font color, button color, button coordinates, window size, center html frame can be anything you want (note: HTML frame is kinda basic. It don't know any CSS and javascript)
For updater to work, you need to create separate folder in your web hosting and create new index.php, then add this php code:
*See 'update.php' file from 'php examples' download*
Last two lines are folders in which newest files are added. It may be not just system directory, I added it for an example.
This page will print files with their sizes, launcher will scan through them, then check your game files and determine which files should be downloaded. Then if you agree, it will download them.
Build-in functions:(for scripting)
z.getIP() - returns IP
z.getDir() - returns game dir
z.web(url) - opens webpage in default browser
z.launch(dir) - launches application
z.download(url,destination) - downloads and saves file
z.check() - checks for updates
z.sendPacket(packetString, IP, Port, Timeout) - sends a custom packet to server. packetString, IP goes in string format, Port and Timeout in integer format
Updates:
v1.1
- Custom packet sending function added. What for? For example you can make launcher start somekind of protection in background(to kill all hack processes, auto ban or something more), and force players to use it. If protection is off - player gets kicked from server. Well it needs some further modifications at server core and little bit advanced script, but atleast I've made it possible for now
- All script files were moved from Data folder to web page. This way server admins have full control of scripts
*See 'scripts.php' file from 'php examples' download*
Basicly you only need to 'echo' each line of script, don't forget to use '<br>' at end of lines. Scripting language remains the same (Jython)
Known bugs:
- If base game directory has spaces, it may throw error "directory not found bla bla bla". I've did some fixes in script, but not sure if they helped
- Downloading huge files may crash program (the biggest file i've tryed was 300mb, and it worked fine, but not sure about 1gb+)
Download: Version 1.0 beta
Download: Example php files