emanzione / PATCH

The PATCH repository for issues tracking, wiki and shared material.
https://assetstore.unity.com/packages/tools/utilities/p-a-t-c-h-ultimate-patching-system-41417
MIT License
47 stars 7 forks source link

Launcher not updating #49

Closed TrickShotMLG02 closed 2 years ago

TrickShotMLG02 commented 2 years ago

``before: image

while running the update: Inked161442695-32909434-88d5-4a58-b588-a8c5e037254b_LI

After the launcher closes itself image (these files are not getting replaced and the launcher wont start until i manually remove the original file and rename the new one

Log:

Launcher update started. The update contains 10 operations.
Updating process FAILED!
The URL https://XXX.net/XXX/patch/Updater/ForgottenBarrageLauncher.pdb generated an exception.
   at MHLab.Patch.Core.Client.IO.FileDownloader.Download(String url, String destFolder, Action`1 onChunkDownloaded)
   at MHLab.Patch.Core.Client.PatcherUpdater.HandleAddedFile(UpdaterDefinitionEntry entry)
   at MHLab.Patch.Core.Client.PatcherUpdater.HandleUpdate()
   at MHLab.Patch.Core.Client.PatcherUpdater.Update()
   at MHLab.Patch.Core.Client.Runners.UpdateRunner.Update()
   at MHLab.Patch.Core.Client.UpdatingContext.Update()
   at MHLab.Patch.Launcher.Wpf.MainWindow.CheckForUpdates()

Question: I dont event have the file mentioned in my log. How do i get that? https://XXX.net/XXX/patch/Updater/ForgottenBarrageLauncher.pdb

My Web directory: image

Contents of the zip file: image

emanzione commented 2 years ago

Your remote web directory has the wrong content. I can see you have a zip into the Updater folder, that's wrong: you need to copy the Updater folder in the same way PATCH generates it, with all the files. Refer to this section in the wiki: https://github.com/emanzione/PATCH/wiki/The-Launcher#uploading-the-first-update

TrickShotMLG02 commented 2 years ago

My updater folder only contains a jsonfile called updater_index.json There is nothing else. Is that correct?

emanzione commented 2 years ago

No, it's not correct. You need to process the Launcher update like explained here: https://github.com/emanzione/PATCH/wiki/The-Launcher#first-launcher-update

TrickShotMLG02 commented 2 years ago

Well, i am sorry if i messed some things up, but i created a release of the launcher using the wpf. In the build directory i now have some files. Do i need to copy them to the Updater directory and run the admin tool in unity?

Now i have the files from the launcher including the updater_index.json

If i upload these files to my server and open the launcher, every file gets downloaded and renamed like xxx.temp.delete_me and nothing changes

emanzione commented 2 years ago

This is how the remote Updater folder should look like: image

The updater_index.json file keeps track of the metadata for those specific files, so it's important you run the processing from the PATCH Admin tool (through Unity or through the CLI, it's the same).

The Launcher renames files to .delete_me when the files are locked and cannot be replaced. Instead they are renamed and new files with the updated content get created. They will be deleted the next time you open the Launcher.

TrickShotMLG02 commented 2 years ago

So i dont't need to upload the json file but all the other files in the updater directory. Right?

emanzione commented 2 years ago

You need to upload all the files, even the updater_index.json file. As I said, please refer to this section in the wiki: https://github.com/emanzione/PATCH/wiki/The-Launcher#first-launcher-update

TrickShotMLG02 commented 2 years ago

Nvm i didn't notice the json file at the bottom.

I will try it this afternoon Thanks

TrickShotMLG02 commented 2 years ago

I have done everything as you described and the update of the launcher works for now. But the .delete_me files wont get deleted after the update

emanzione commented 2 years ago

They normally get deleted on the next restart of the Launcher. Unless they get re-created for some reason.