This repository has been archived by the owner on Jul 1, 2020. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 44
Launcher Tutorial
Süleyman Yasir KULA edited this page May 15, 2020
·
3 revisions
The LauncherDemo example scene allows you to quickly create a launcher that can update itself with self patching, in addition to patching and launching a separate main app. Launcher first checks if it is up-to-date (if not, updates itself with a self patcher) and then checks if the main app is up-to-date (if not, updates it directly, i.e. without using a self patcher). If you don't provide a VersionInfo url for one of these patches, that patch will be skipped.
It is recommended that you complete the Self Patching App Tutorial before starting this tutorial.
- see the recommended project structure for launchers
- open LauncherDemo scene
- generate versionInfoURLs for the launcher and the main app and paste them to the Launcher Version Info URL and Main App Version Info URL variables of LauncherUI in the Inspector
- decide a Main App Subdirectory (let's say MainApp) and Main App Executable (let's say MainApp.exe)
- create a SimplePatchTool-project for the launcher
- add
MainApp/
to the IgnoredPaths of the SimplePatchTool-project's Settings.xml (also give it a meaningful<Name>
like Launcher) - as the launcher uses self patching, we need a self patcher: create a self patcher and put it inside the SelfPatcher directory of the SimplePatchTool-project
- enter the name of the self patcher's executable to the Self Patcher Executable variable of LauncherUI in the Inspector
- create a subdirectory called
1.0
inside the Versions folder of the SimplePatchTool-project - insert LauncherDemo scene to the top of Scenes In Build list in Build Settings and then build the project. Afterwards, move the generated files into the
1.0
subdirectory - follow these steps to create a patch (you can skip the Prerequisites)
- you've created your launcher's first patch, awesome! Now let's generate a patch for the main app, as well
- create another SimplePatchTool-project, this time for the main app
- create a subdirectory called
0.1
inside the Versions folder of the SimplePatchTool-project - build another one of your projects, name the executable as MainApp.exe and move the generated files into the
0.1
subdirectory - follow the same steps to create a patch for the main app (keep the launcher's and the main app's patch files in separate directories on the server)
- if you launch your launcher now, launcher should be able to detect the absence of the main app and prompt you to download/patch it (don't run the launcher inside the
1.0
subdirectory, that subdirectory will be used to create incremental patches later on, so we don't want its contents to be modified. Instead, create a copy of that subdirectory at some other location and run the launcher inside that directory) - after letting the launcher download the main app, try deleting a file from MainApp and hit the Repair Game button in the launcher to test repairing the main app
- make some changes to the launcher's user interface, build the project again and move its files to another subdirectory called
1.1
inside the Versions folder of the launcher's SimplePatchTool-project - create another patch for the launcher
- if you launch the version 1.0 of the launcher now, you'll see that it detects the 1.1 update and prompts you to update itself to that version, well done!
- feel free to create a new version of the main app, as well