-
-
Notifications
You must be signed in to change notification settings - Fork 437
Configuring Self Update
The bootstrap program:
- Downloads the launcher from your website.
- Chooses a standard folder to store the launcher's files (in My Documents or the home folder).
- Updates the launcher automatically.
One of the sample files is latest.json. In it, it contains a link to a pack-compressed version of the launcher for download, as well as the latest launcher version.
The file looks like:
{
"version": "4.0.1",
"url": "http://example.com/versions/4.0.1.jar.pack"
}The version should correspond to the version in build.gradle (in the source code). Change "4.0.1" to whatever version is in build.gradle at the moment.
Take the launcher file and run it through the pack200 tool that comes with the JDK. Upload this to the website and also change the URL in latest.json (also on your site).
pack200 --no-gzip launcher.jar.pack launcher-X.Y.Z-all.jar
(That command makes launcher.jar.pack from launcher-X.Y.Z-all.jar in the same folder.)
Inside the folder launcher-bootstrap/src/main/resources/com/skcraft/launcher/ will be:
-
lang/, which contains language files you should change -
bootstrap.properties, which contain important settings you must change -
bootstrapper_icon.png, which is the bootstrapper icon
The properties file is one of the most important. It looks like:
homeFolderWindows=Example Launcher
homeFolder=.examplelauncher
launcherClass=com.skcraft.launcher.Launcher
latestUrl=http://example.com/latest.json- "homeFolderWindows" is the folder in "My Documents" (i.e.
C:\Users\Name\Documents\Example Launcher) - "homeFolder" is the folder in the user's home folder (i.e.
/home/.examplelauncher) - "launcherClass" does not need to be changed unless you are using the Fancy Launcher
- "latestUrl" should point to
latest.jsonon your website
- Recompile the entire launcher again (using
gradlew clean build). - Double click the
-all.jarfile inlauncher-bootstrap/build/libsto make sure it works. - Check your home folder (BSD/Linux/Mac OS X users) or
My Documents(Windows users) to see the folder name that you used.
If everything works, you are done! Give players a copy of the bootstrapper -all.jar file.
Tip: Use something like launch4j to make an .exe file for Windows users.
Whenever you want to push an update:
- Update the version in
build.gradle(NOTE: Unlike the versions for modpacks, this version should actually be a proper version like #.#.# or #.#, or #). - Recompile the launcher.
- Upload the pack-compressed version of your .jar.
- Update the version number and URL in
latest.json.
You never should need to update the bootstrapper.
Need help? See Getting Help.
Tutorial
Launcher Features:
- Fancy Launcher
- Portable Mode
- Hidden Modpacks
- Deploying Server Modpacks
- Launcher Arguments
- Custom JAR (.jar mods)
- Custom Version Manifest
Customization:
- Localization
- News Page Guide
- Custom Microsoft OAuth application
- Using an IDE (Eclipse, IntelliJ)
Additional Reading:
Find the launcher useful?
Donate to obw, the current maintainer:
Donate to sk89q, the original maintainer:


