Tutorial: A simple Desktop loader that allows you to update your client without making the user redownload a 30mb client every time. It will also update the cache based on the checksums.
Difficulty: As difficult as you make it.
Step One:
Download this. It contains a DPrepare folder, and a DLoader folder.
Click Here
Step Two
Extract the zip file.
The DPrepare file prepares the client.jar and changes the name to the current checksum, while also taking any other file in the in directory and getting the checksum, then saving the checksum to a text file (main_file_cache.dat.txt is an example of this)."
- Place client.jar and cache files into /in/ directory
- Run
- Upload the contents of /out/
- Upload your cache files. They must not be zipped (You can upload it zipped and then extract it).
Step Three
Open up DLoader, and browse to src/Loader.java. You will see
Code:
private static final double VERSION = 2.0;
private static final String CACHE_LOCATION = System.getProperty("user.home") +"/.divinity_cache/";
private static final String CODE_BASE = "http://divinity317.info/game/";
private static final String[] CACHE_FILES = {"1362.dat", "main_file_cache.dat", "main_file_cache.idx0",
"main_file_cache.idx1", "main_file_cache.idx2", "main_file_cache.idx3",
"main_file_cache.idx4", "model_cache.dat", "model_cache.idx"};
Ignore the VERSION.
Change CACHE_LOCATION to the location of your cache
Change CODE_BASE to the location of all your files with the trailing '/'
Change CACHE_FILES to have all the data files of your cache.
Step Four
Find the launch method in Loader.java, and 'GUI' to your client class, or your wrapper class, which ever.
If you have problems please post them in this thread