-
-
Notifications
You must be signed in to change notification settings - Fork 51
Providing Custom Download Links
There are two ways to create custom download links; this tutorial assumes that the patch files are stored in a directory called PatchFilesServer on your server:
You basically fetch the download link of each file manually and paste it to VersionInfo by hand. With this method, you must handle the escaped XML characters correctly (e.g. https://myserver.com/fileUrl&export=download
becomes https://myserver.com/fileUrl&export=download
).
Google Drive™
For each patch file, right click the file in Drive, select "Get shareable link" and paste the link to VersionInfo.
Dropbox™
For each patch file:
- select the file and click Share
- click the Create a link button and copy the share link
- replace the
?dl=0
part at the end of the share link with?dl=1
- paste the updated share link (with
?dl=1
) to VersionInfo
Custom Server
If BaseDownloadURL is not an option for your server, then for each patch file, make sure that the file is public and paste its download url to VersionInfo.
Basically, we fill a text file with the download links in the following format: {File relative path} {File download url}
(one file per line)("File relative path" needn't start with "RepairPatch/", "IncrementalPatch/" or "InstallerPatch/"). Then, this text file is used to update the download links in VersionInfo automatically.
First, create an empty text file called DownloadLinks.txt. Then, we'll fill it with download links as follows:
Google Drive™
- add Download Link Generator for Drive™ to your Drive (it is open source!)
- right click the PatchFilesServer directory on Drive and select Open with-Download Link Generator
- after it says "Status: finished", copy the output and paste it inside DownloadLinks.txt
Dropbox™
- authenticate Download Link Generator for Dropbox™
- enter the path of the PatchFilesServer directory to the "Path to file/folder:" field (e.g. if PatchFilesServer resides at the root of your Dropbox, simply enter PatchFilesServer/ )
- enable the "Automatically share unshared file(s) publicly" option and click Go!
- after it says "Status: finished", copy the output and paste it inside DownloadLinks.txt
Custom Server
You have to write a custom server script to help you fill DownloadLinks.txt with the download links in the specified format.
After filling DownloadLinks.txt, it is time to update the download links inside VersionInfo: