Search Unity

SimplePatchTool - open source patching solution for standalone platforms

Discussion in 'Assets and Asset Store' started by yasirkula, Jul 26, 2018.

  1. Smashingtonn

    Smashingtonn

    Joined:
    Feb 3, 2017
    Posts:
    2
    I'm trying to get the patcher self patching on Mac.

    It's working on Windows just fine and the self patching works as expected and runs correctly upon start.

    On mac howerver, the self patcher never quite works. It downloads the files correctly and gets to a point where it says
    ...Waiting for the self patcher to complete the update...

    When I look through the player.log it all seems fine until it gets to the hang line which is:

    The file /Users/{user}/.local/share/SimplePatchToolDls/NewProject/psp.in1 does not exist.

    After having a look I can see that psp.in0 is there, but psp.in1 doesn't exist. As the error says..

    After watching the exact same steps on windows the psp.in1 definitely exists during this update period.

    I'm wondering if you have any thoughts on the issue? I've read through your source code to the point where it creates the psp.in0 but right before it creates it it deletes psp.in1, but I can't find the place that psp.in1 is created, or why this isn't being created.
     
  2. yasirkula

    yasirkula

    Joined:
    Aug 1, 2011
    Posts:
    2,879
    psp.in1 is created by the self patcher at this line and at line 150: https://github.com/yasirkula/Simple...3cc737689/SelfPatcherCore/SelfPatcher.cs#L138

    The log you are seeing might be a warning instead of an error because the only place that psp.in1 gets deleted is inside the SimplePatchTool.Patch function and we know for sure that no exceptions are thrown in this function since patcher logs "...Waiting for the self patcher to complete the update...", it is logged only when SimplePatchTool.Patch finishes successfully. Probably File.Delete is outputting this message if the file is not there but it doesn't throw an exception since that is how File.Delete behaves. You can try it yourself by calling File.Delete for a non-existent file and logging some dummy string immediately afterwards.

    So, why does the patch stop then? My guess is that something goes wrong inside the SimplePatchTool.ApplySelfPatch function. Luckily, SimplePatchTool logs all error messages to a spt_logs.txt file located at the patched app's directory. Please see if there are any error messages logged there. In the past, another user had reported that they had to launch the self patcher like this on Mac:

    Code (CSharp):
    1. startInfo = new ProcessStartInfo("/Library/Frameworks/Mono.framework/Versions/Current/Commands/mono")
    2. {
    3. UseShellExecute = false,
    4. Arguments = selfPatcher.FullName + " " + args,
    5. WorkingDirectory = selfPatcher.DirectoryName
    6. };
    Also, please check out this topic for some more discussion about using this plugin on Mac/Linux: https://github.com/yasirkula/SimplePatchTool/issues/4
     
  3. Spartikus3

    Spartikus3

    Joined:
    Dec 27, 2013
    Posts:
    108
    Yasir I think this must be an excellent application but after trying to wrap my head around it for a week I am at a loss.

    Using the launcher demo I have filled out all of the variables:
    I have tried this connecting to a local LAN webserver and I have tried it on my main web host on the Internet. Both ways I get a cryptic "ERROR: version info is invalid"

    specifically here is my SPT_log:

    Code (CSharp):
    1. ...Checking for updates...
    2. System.InvalidOperationException: There is an error in XML document (1, 55). ---> System.Xml.XmlException: '>' is an unexpected token. The expected token is '"' or '''. Line 1, position 55.
    3.  at System.Xml.XmlTextReaderImpl.Throw (System.Exception e) [0x00027] in <b92efb6eef6e41b5abd458f107e6d92e>:0
    4.  at System.Xml.XmlTextReaderImpl.DtdParserProxy_Throw (System.Exception e) [0x00000] in <b92efb6eef6e41b5abd458f107e6d92e>:0
    5.  at System.Xml.XmlTextReaderImpl+DtdParserProxy.System.Xml.IDtdParserAdapter.Throw (System.Exception e) [0x00000] in <b92efb6eef6e41b5abd458f107e6d92e>:0
    6.  at System.Xml.DtdParser.Throw (System.Int32 curPos, System.String res, System.String[] args) [0x0003e] in <b92efb6eef6e41b5abd458f107e6d92e>:0
    7.  at System.Xml.DtdParser.ThrowUnexpectedToken (System.Int32 pos, System.String expectedToken1, System.String expectedToken2) [0x0000b] in <b92efb6eef6e41b5abd458f107e6d92e>:0
    8.  at System.Xml.DtdParser.ParseExternalId (System.Xml.DtdParser+Token idTokenType, System.Xml.DtdParser+Token declType, System.String& publicId, System.String& systemId) [0x001ac] in <b92efb6eef6e41b5abd458f107e6d92e>:0
    9.  at System.Xml.DtdParser.ParseInDocumentDtd (System.Boolean saveInternalSubset) [0x00049] in <b92efb6eef6e41b5abd458f107e6d92e>:0
    10.  at System.Xml.DtdParser.Parse (System.Boolean saveInternalSubset) [0x00010] in <b92efb6eef6e41b5abd458f107e6d92e>:0
    11.  at System.Xml.DtdParser.System.Xml.IDtdParser.ParseInternalDtd (System.Xml.IDtdParserAdapter adapter, System.Boolean saveInternalSubset) [0x00007] in <b92efb6eef6e41b5abd458f107e6d92e>:0
    12.  at System.Xml.XmlTextReaderImpl.ParseDtd () [0x0000e] in <b92efb6eef6e41b5abd458f107e6d92e>:0
    13.  at System.Xml.XmlTextReaderImpl.ParseDoctypeDecl () [0x00156] in <b92efb6eef6e41b5abd458f107e6d92e>:0
    14.  at System.Xml.XmlTextReaderImpl.ParseDocumentContent () [0x0017a] in <b92efb6eef6e41b5abd458f107e6d92e>:0
    15.  at System.Xml.XmlTextReaderImpl.Read () [0x0008c] in <b92efb6eef6e41b5abd458f107e6d92e>:0
    16.  at System.Xml.XmlTextReader.Read () [0x00000] in <b92efb6eef6e41b5abd458f107e6d92e>:0
    17.  at System.Xml.XmlReader.MoveToContent () [0x0003a] in <b92efb6eef6e41b5abd458f107e6d92e>:0
    18.  at Microsoft.Xml.Serialization.GeneratedAssembly.XmlSerializationReaderVersionInfo.Read7_VersionInfo () [0x00008] in <0600b86d6cf0450f957a6941675911d2>:0
    19.  at (wrapper managed-to-native) System.Reflection.MonoMethod.InternalInvoke(System.Reflection.MonoMethod,object,object[],System.Exception&)
    20.  at System.Reflection.MonoMethod.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00032] in <e1319b7195c343e79b385cd3aa43f5dc>:0
    21.   --- End of inner exception stack trace ---
    22.  at System.Xml.Serialization.XmlSerializer.Deserialize (System.Xml.XmlReader xmlReader, System.String encodingStyle, System.Xml.Serialization.XmlDeserializationEvents events) [0x0011b] in <b92efb6eef6e41b5abd458f107e6d92e>:0
    23.  at System.Xml.Serialization.XmlSerializer.Deserialize (System.Xml.XmlReader xmlReader, System.String encodingStyle) [0x00000] in <b92efb6eef6e41b5abd458f107e6d92e>:0
    24.  at System.Xml.Serialization.XmlSerializer.Deserialize (System.IO.TextReader textReader) [0x0001c] in <b92efb6eef6e41b5abd458f107e6d92e>:0
    25.  at SimplePatchToolCore.PatchUtils.DeserializeXMLToVersionInfo (System.String xmlContent) [0x00017] in <d68e525fd4df44baa2dff0c30ea1a517>:0
    26.  at SimplePatchToolCore.SimplePatchTool.FetchVersionInfo () [0x00065] in <d68e525fd4df44baa2dff0c30ea1a517>:0
    27. ERROR: version info is invalid
    Any suggestions here?

    Here is a portion of my VersionInfo:
    Code (CSharp):
    1. <?xml version="1.0" encoding="UTF-8"?>
    2. <VersionInfo xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
    3.   <BaseDownloadURL>http://aakrana.com/notes/research/</BaseDownloadURL>
    4.   <MaintenanceCheckURL />
    5.   <Version>0.0</Version>
    6.   <Patches />
    7.   <InstallerPatch CompressionFormat="LZMA" PatchSize="522081409" PatchMd5Hash="260ec8a6faff1e35b69843753070af2f" DownloadURL="" />
    8.   <IgnoredPaths>
    9.     <string>*spt_logs.txt</string>
    10.     <string>*output_log.txt</string>
    11.   </IgnoredPaths>
    12.   <CompressionFormat>LZMA</CompressionFormat>
    13.   <Files>
    14.     <VersionItem Path="ForgottenLands.exe" FileSize="650752" Md5Hash="85c9de85edb79e56a36d6e15584024a3" CompressedFileSize="80579" CompressedMd5Hash="d8c02eec9ecba7f1421de306d6f3e21b" DownloadURL="" />
    15.     <VersionItem Path="UnityCrashHandler64.exe" FileSize="1460680" Md5Hash="df7582e4956afd8d72bfc3bf48a76313" CompressedFileSize="293192" CompressedMd5Hash="38252a6e4f30812df0e9d70d126cbbd1" DownloadURL="" />
    On another note, for the launcher VersionInfo should it be PathInfo.info or VersionInfo.info. The wiki seems to indicate both depending on what you read.
     
  4. yasirkula

    yasirkula

    Joined:
    Aug 1, 2011
    Posts:
    2,879
    VersionInfo is always VersionInfo.info, PatchInfo.info just holds detailed information about a single incremental patch.

    I'm guessing that the downloaded VersionInfo.info is actually an HTML page rather than the VersionInfo itself. This can happen when the versionInfoURL is not accessible (in which case, usually a 403 HTML page is returned) or simply when versionInfoURL is not correct. Try pasting the versionInfoURL to an incognito tab in your web browser. If it returns an error page, then the file is not accessible.

    In the worst case, you can use the following function to access the contents of the VersionInfo; this way you can see what SimplePatchTool downloads from versionInfoURL:
    Code (CSharp):
    1. patcher.UseVersionInfoVerifier( ( ref string xml ) =>
    2. {
    3.     Debug.Log( xml );
    4.     return true;
    5. } );
    6.  
     
  5. Spartikus3

    Spartikus3

    Joined:
    Dec 27, 2013
    Posts:
    108
    No it is not that. When I paste the URL it opens up the folder that VersionInfo.info is in. So basically, as an example: http://mysite/folder/folder/

    VersionInfo.info is inside the second folder.

    So with some testing it looks like I need to include the filename "VersionInfo.info" in the URL. That is not what I read in the documentation or examples. I'll attempt a little more work here and see if that is the issue.

    It appears to work now with the filename included in the URL location. Sorry if I misunderstood the documentation.
     
    Last edited: Mar 29, 2020
  6. Spartikus3

    Spartikus3

    Joined:
    Dec 27, 2013
    Posts:
    108
    Would it be possible to get an example of a version info file. A working one please. I want to see the exact format of the download link. I am not sure why it has to be done manually if we know the root URL, we know the names of the folders "InstallerPatch" and "RepairPatch" and the patcher knows the directory structure of the files. Seems like that could be automated. Maybe it is and I am missing it. Either way at this point I just want to get a test patch working so I know I have it configured correctly. A working VersionInfo file with DL links would be amazing.
     
  7. yasirkula

    yasirkula

    Joined:
    Aug 1, 2011
    Posts:
    2,879
    versionInfoURL should point to the VersionInfo.info file, yes. Which part of the documentation was confusing? I can make that part clearer.

    In VersionInfo.info, if you set BaseDownloadURL to
    http://my.server.com/files/
    , then the repair patch files will automatically be downloaded from
    http://my.server.com/files/RepairPatch/filename.lzdat
    , same goes for incremental patches and installer patch. But if a file's DownloadURL is not blank in the
    <Files>
    list, then that download URL will be used for that particular file.

    Please let me know if that doesn't help.
     
  8. Spartikus3

    Spartikus3

    Joined:
    Dec 27, 2013
    Posts:
    108
    That does help Yasir! Thank you!

    I have it working and downloading. I am not sure if I screwed something up but the installer.patch downloaded but it didnt install. It just downloaded and then went onto the repair patch and redownloaded all the files. The repair patch is still in progress but looks like the files are showing up in the right directory.

    Any idea what I might have missed to stop the installer patch from putting the files in place?

    My apologies it was in the log: Installer.patch is corrupt. It's 500 MB and I suspect I may not have forced binary transfer. I'll re-up. There are a couple more corrupt files may be the same issue. I'll continue working through this. Thank you for your helpful responses!!
     
    Last edited: Mar 29, 2020
  9. Spartikus3

    Spartikus3

    Joined:
    Dec 27, 2013
    Posts:
    108
    I am having difficulty getting the patch files to upload to my host without getting corrupted. I assume the byte counts should be identical or it wont be abl eot diff properly.

    I was using Filezilla on my windows box to upload. Is there another way to upload that is recommended?
    I did confirm that filezilla was forced to binary transfer.
     
  10. yasirkula

    yasirkula

    Joined:
    Aug 1, 2011
    Posts:
    2,879
    SimplePatchTool checks filesizes and MD5 hashes of the downloaded files to verify them. I use FileZilla and transfer my files in binary mode; I haven't encountered any issues with it myself. You can also upload your files to your server via your host's cPanel but it can be slower than FileZilla.

    P.S. Here are my settings:

    ss.png
     
  11. Fashtas

    Fashtas

    Joined:
    Jun 29, 2018
    Posts:
    11
    Is there any way to stop the launcher from deleting all files in the root launcher folder if they aren't one of it's "known" files?
    I've added a few <IgnoredPaths> items (uninstaller for example) but if the user puts the launcher in some other folder containing other stuff then runs it, it will trash their system. Makes my skin crawl thinking of an automated process deleting things it didn't put there in the first place.

    EDIT: As a trial I put <string>*.*</string> in the IgnorePaths of the versioninfo file and the launcher doesn't trash the living daylights out of everything it didn't understand.
    May have bad repercussions but I'd rather the patcher didn't work than the patcher deleting someones program files folder
     
    Last edited: Apr 8, 2020
  12. yasirkula

    yasirkula

    Joined:
    Aug 1, 2011
    Posts:
    2,879
    I'm sorry to hear this. Unless user puts the launcher to e.g. C:\Launcher.exe or C:\Program Files\Launcher.exe, launcher won't touch those directories since it only has access to the folder containing it.

    If you install the launcher to a specific directory with Inno Setup, then it shouldn't be an issue since users are unlikely to move the launcher from its installed directory to C:\Launcher.exe. But if the user can put the launcher to C:\Launcher.exe, then it is safest to put
    <string>*</string>
    to IgnoredPaths.

    I believe most launchers work similar to SimplePatchTool, deleting files that are not in their Files list after a successful patch. I can't think of any other way for the launcher to clear the old files.
     
  13. Fashtas

    Fashtas

    Joined:
    Jun 29, 2018
    Posts:
    11
    Thanks for the reply! I'll change the *.* to *

    This is just an abundance of caution on my behalf. I've since coded an installer which does "force" the user to install the launcher into a unique folder, but during testing people were downloading the launcher ZIP, then wanting to extract them the same download folder and risking deleting all other other downloaded files (Before I pointed out not to)

    Don't think there is a perfect answer except keeping an growing, endless list of files that once were part of the install but may no longer be and should be deleted.

    Anyway thanks for a WONDERFUL tool, it's a great piece of work!
     
    yasirkula likes this.
  14. chencunrui

    chencunrui

    Joined:
    Mar 7, 2019
    Posts:
    5
    Hey, I'm just following the guide and everytime I test the launcher it happen this, any help?
    upload_2020-4-16_9-54-31.png
    spt_logs.txt

    === 04/16/2020 08:43:29 ===
    ...Retrieving version info...
    ...Checking if files are up-to-date...
    Preferred patch method IncrementalPatch: 0.00MB
    Preferred patch method RepairPatch: 0.05MB
    Preferred patch method InstallerPatch: 13.72MB
    Applying incremental patch
    DownloadError: ERROR: could not download patch info for 1.0_1.1
    Applying repair patch
    ...Calculating new or changed files...
    ...Calculating files to download...
    ...Downloading 3 new or updated file(s)...
    ...Updating 3 file(s)...
    1/3 Downloading: SimplePatchToolTest_Data\globalgamemanagers (0.01MB)
    CorruptDownloadError: ERROR: downloaded file SimplePatchToolTest_Data\globalgamemanagers is corrupt
    Applying installer patch
    ...Calculating new or changed files...
    ...Downloading patch: Installer.patch...
    CorruptDownloadError: ERROR: downloaded file Installer.patch is corrupt
    ERROR: downloaded file Installer.patch is corrupt
     

    Attached Files:

  15. yasirkula

    yasirkula

    Joined:
    Aug 1, 2011
    Posts:
    2,879
    I'm guessing that the files on the server are not public and hence, SimplePatchTool can't download them. Try opening one of the download links in an incognito tab in your web browser and see if it triggers the download. Even if the file is public, navigating to the download url should trigger the download directly, so there shouldn't be an additional step like clicking a Download button at the web page.
     
  16. chencunrui

    chencunrui

    Joined:
    Mar 7, 2019
    Posts:
    5
    upload_2020-4-16_16-19-44.png

    The file can be downloaded directly
     
  17. yasirkula

    yasirkula

    Joined:
    Aug 1, 2011
    Posts:
    2,879
    If you haven't preceded localhost with
    http://
    in your VersionInfo.info, try doing so. To see if SimplePatchTool somehow created a corrupt patch file, you can test the patch as follows:

    - change your BaseDownloadURL like this:
    <BaseDownloadURL>file://C:\PATH_TO_PATCH_FILES_DIRECTORY\</BaseDownloadURL>
    (notice how the path ends with a path separator char)
    - open SimplePatchTool's PatcherControlPanelDemo scene in the Editor, enter Play mode, point Root path to an empty directory and set VersionInfo URL to
    file://C:\PATH_TO\VersionInfo.info

    - hit PATCH!

    If it succeeds, then it means that your files are not corrupt but SimplePatchTool somehow can't download the files from localhost.
     
  18. chencunrui

    chencunrui

    Joined:
    Mar 7, 2019
    Posts:
    5
    • This is my versioninfo.info file


      upload_2020-4-16_16-58-5.png
    • Can I use DownloadURL without typing
      upload_2020-4-16_17-3-13.png
     
  19. chencunrui

    chencunrui

    Joined:
    Mar 7, 2019
    Posts:
    5
    Please specify which path PATH_TO_PATCH_FILES_DIRECTORY refers to, or just copy directly
     
  20. yasirkula

    yasirkula

    Joined:
    Aug 1, 2011
    Posts:
    2,879
    The directory on your HDD that contains the RepairPatch and InstallerPatch folders.
     
  21. chencunrui

    chencunrui

    Joined:
    Mar 7, 2019
    Posts:
    5
    Success, failure is because I ignored the (PatchFIlesServe) path in BaseDownloadURL
     
  22. cidolfas2015

    cidolfas2015

    Joined:
    Sep 27, 2015
    Posts:
    87
    I tried to build the simple patcher scene and the patcher says "error: could not download version info from server". I have mas3d.website/launcher/VersionInfo.info what am I doing wrong. any pointers would help.
     
  23. crackoder

    crackoder

    Joined:
    Jun 11, 2017
    Posts:
    7
    Hey, I've been integrating your patcher to the game I'm working on right now, I've been able to make it work well for most cases, but on a friend's computer (Using Windows 10) he is getting a weird error and I wanted to check if you have seen it before and can lead me in the right direction.

    The game is using a Self Patcher, he basically opens the game and gets the message that there is a new update (so it was able to check the version) but then after he clicks on update (that triggers the downloading of the files) he gets a "ERROR: could not download version info from server", and that is making me go crazy, since in order to know that there was an update, didn't it had to download the VersionInfo? :S

    All the files are hosted in Google Drive.

    here is the error log he sent me from the Unity player.log file

    Code (CSharp):
    1. <RI> Initializing input.
    2.  
    3. <RI> Input initialized.
    4.  
    5. <RI> Initialized touch support.
    6.  
    7. UnloadTime: 1.457600 ms
    8. ...Checking for updates...
    9. (Filename: C:\buildslave\unity\build\Runtime/Export/Debug/Debug.bindings.h Line: 35)
    10.  
    11. ...New version available...
    12. (Filename: C:\buildslave\unity\build\Runtime/Export/Debug/Debug.bindings.h Line: 35)
    13.  
    14. ...Retrieving version info...
    15. (Filename: C:\buildslave\unity\build\Runtime/Export/Debug/Debug.bindings.h Line: 35)
    16.  
    17. ERROR: could not download version info from server
    18. (Filename: C:\buildslave\unity\build\Runtime/Export/Debug/Debug.bindings.h Line: 35)
    19.  
    20. Setting up 4 worker threads for Enlighten.
    21.   Thread -> id: ed4 -> priority: 1
    22.   Thread -> id: 3818 -> priority: 1
    23.   Thread -> id: 2bd8 -> priority: 1
    24.   Thread -> id: 54 -> priority: 1
    25.  
    Thanks!
     
  24. yasirkula

    yasirkula

    Joined:
    Aug 1, 2011
    Posts:
    2,879
    In this case, FetchVersionInfo() is called 2 times: once inside CheckForUpdatesInternal() and once inside Patch(). But it shouldn't be an issue. Google Drive may have a bandwidth limit for shared files and perhaps your friend accidentally hit that limit when downloading VersionInfo the second time? Could I also see the spt_logs.txt file inside the patched game's directory?

    P.S. Does this issue occur all the time for your friend or did it happen only once (if once, it is more likely a bandwidth issue)?
     
  25. yasirkula

    yasirkula

    Joined:
    Aug 1, 2011
    Posts:
    2,879
    If your VersionInfo URL doesn't start with http:// or https://, could you try adding one of these to your link?
     
  26. crackoder

    crackoder

    Joined:
    Jun 11, 2017
    Posts:
    7
    Thanks for the quick answer!

    It happened multiple times and every time it was the same error after clicking update, we haven't been able to make it work on his computer yet, and about the spt_logs, the file was is not even generated on his computer first, then I added the logToFile flag to true and added a bit more logs to try and debug the issue, this is the log I got from it

    Code (CSharp):
    1. ...Retrieving version info...
    2. IsGoogleDriveURL = true
    3. FailedDownloadsRetryLimit = 3
    4. downloadStringResult == null (retrying)
    5. downloadStringResult == null (retrying)
    6. downloadStringResult == null (retrying)
    7. ERROR: could not download version info from server
    It tries 3 times and then errors out, but the weird thing that this is after he clicked on update because the game found that there was an update available.
     
  27. yasirkula

    yasirkula

    Joined:
    Aug 1, 2011
    Posts:
    2,879
    The fact that the same patcher runs smoothly on other devices makes it harder to pinpoint the issue, SimplePatchTool's behaviour shouldn't really change between devices with the same OS. At this point, I'd recommend you to try uploading your VersionInfo.info to another server (e.g. Dropbox or a free host) and see if it changes anything.
     
  28. crackoder

    crackoder

    Joined:
    Jun 11, 2017
    Posts:
    7
    Yeah I get it, I've successfully made the patcher work on Windows/Linux/Mac very smoothly with little to no work required from me now to upload new patches, but this is the first computer that gave me issues, it may be something like antivirus or IDK, I will try hosting it somewhere else and let you know if it works :D

    Thanks again for your help and for creating this great asset :)
     
    yasirkula likes this.
  29. cidolfas2015

    cidolfas2015

    Joined:
    Sep 27, 2015
    Posts:
    87
    I don't have https on my server(yet) but I tried http:// and that didn't work either. sad face
     
  30. yasirkula

    yasirkula

    Joined:
    Aug 1, 2011
    Posts:
    2,879
    Does spt_logs.txt file in the patched game's directory contain any useful information?
     
  31. cidolfas2015

    cidolfas2015

    Joined:
    Sep 27, 2015
    Posts:
    87
    === 04/26/2020 17:53:31 ===
    ...Checking for updates...

    === 04/26/2020 18:00:06 ===
    ...Checking for updates...
    ERROR: could not download version info from server
     
  32. yasirkula

    yasirkula

    Joined:
    Aug 1, 2011
    Posts:
    2,879
  33. cidolfas2015

    cidolfas2015

    Joined:
    Sep 27, 2015
    Posts:
    87
    oh it should say dummy or something? I wasn't sure. yea i filled in the version url and it still says it can't find it. I'll put some words in the version info and try again.
     
  34. cidolfas2015

    cidolfas2015

    Joined:
    Sep 27, 2015
    Posts:
    87
    ok now it says version info is invalid. plz help I want this to work.
     
  35. yasirkula

    yasirkula

    Joined:
    Aug 1, 2011
    Posts:
    2,879
    Guessing that you are testing the SelfPatchingAppDemo scene, the 8th step in the tutorial states: "follow these steps to create a patch (you can skip the Prerequisites)". Following that link, whether you choose to use ProjectManager or legacy method, the last step is "Update the VersionInfo.info at versionInfoURL". With what? With the contents of the auto-generated VersionInfo.info that is generated in step "2. Generate the patch" and that you update in step "4. Update the download links in VersionInfo". When you complete these steps, you should replace the contents of VersionInfo.info at http://mas3d.website/launcher/VersionInfo.info with that auto-generated VersionInfo.info.
     
  36. cidolfas2015

    cidolfas2015

    Joined:
    Sep 27, 2015
    Posts:
    87
    I'm trying to get the launcher to work. I don't want to code to much with this project, just load patches in and let the client download them. I think I got confused watching your videos. those are outdated right? So I'm gonna start the launcher tutorial and do it again.
     
  37. yasirkula

    yasirkula

    Joined:
    Aug 1, 2011
    Posts:
    2,879
    Yes, please ignore the video tutorials. Hope you find the written tutorials much more useful.
     
  38. Kriszo91

    Kriszo91

    Joined:
    Mar 26, 2015
    Posts:
    181
    ****FOUND**** The legacy window has some compression settings! :)

    Hello!

    Is there a way to speed up patch creation? seems like 6gb+ builds takes "...Patch created in 10485.336 seconds..." to create the patch than compressing seems takes ages.

    Thanks!
     
    Last edited: May 23, 2020
  39. yasirkula

    yasirkula

    Joined:
    Aug 1, 2011
    Posts:
    2,879
    You don't need to use the Legacy window. SimplePatchTool-projects have a Settings.xml file with a number of settings. You'd want to modify the CompressionFormat, BinaryDiffQuality and DontCreatePatchFilesForUnchangedFiles settings.
     
  40. Kriszo91

    Kriszo91

    Joined:
    Mar 26, 2015
    Posts:
    181
  41. yasirkula

    yasirkula

    Joined:
    Aug 1, 2011
    Posts:
    2,879
    It is located at the SimplePatchTool-project's directory that you create using Window-Simple Patch Tool-Create Project.
     
  42. ScottAdams

    ScottAdams

    Joined:
    Nov 23, 2016
    Posts:
    72
    Wonderful app and I am very grateful for all the work that went into it and making it available.

    I asked the following questions in the wrong place and got an excellent reply. I am adding them to this forum in case someone else ever needs the information!

    Questions:
    1. Does the generate patch need the baseline and all previous versions of the builds in the Versions directory to work? If not what is the minimum it needs?

    2. Can new versions be labeled differently than 1.1? I.e. first version is 1.0 next version is 50.1g Would that work?

      Yasirkula replied:
      1. Only the newest version is sufficient. However, if you are planning to create incremental patches, then the previous version is also needed.

      2. Letters aren't supported and the version number must be greater than the previous version number. So, 1.0->50.1 is fine but 1.0->50.1g or 1.0->0.50.1 isn't.
     
    yasirkula likes this.
  43. EricWilliams

    EricWilliams

    Joined:
    Jun 23, 2017
    Posts:
    40
    @yasirkula Just curious, why did you take it off the asset store and archive the github projects? Working on something else?

    They archived right out from under my feet while I'm reading the documentation! Github archived, Unity asset store page gone argh. :p

    Amazing software btw.
     
    Last edited: Jul 1, 2020
    yasirkula likes this.
  44. yasirkula

    yasirkula

    Joined:
    Aug 1, 2011
    Posts:
    2,879
    Haha :D Sorry about that :p There are a couple of reasons that I dropped support for this asset:
    • I've tried to improve this asset's documentation numerous times but people can still get confused at some point and I don't blame them since the documentation is quite large. But I realized that I don't want to spend any more time on improving the documentation and don't want to keep rephrasing the documentation for confused users
    • Some users are interested in Mac/Linux support. The plugin is .NET Standard 2.0 compatible, so it should work on these platforms with minimal changes but I didn't get the chance to test it myself and don't want to just redirect users to a GitHub Issue for Mac/Linux support
    • One key function doesn't return the desired value on Mac and another key function isn't supported on IL2CPP. AFAIK, there are no easy replacements for them. I don't want to deal with these issues anymore
    • Related to first point, I don't want developers to spend days trying to understand the documentation only to find it confusing and switch to another asset. There are other alternatives like PatchKit which handles most of the steps automatically on server-side, offers free CDN solution for indie studios and properly supports Mac/Linux. Most users are looking for something simple like that and they don't want to get bothered with details like finding a CDN, uploading patch files, fetching the download links and passing them to VersionInfo.info
    Don't get me wrong; if I had to create a game that needed a launcher on Windows, I'd probably still use SimplePatchTool since it gives me complete control over the patch files (i.e. I can use any CDN I like) and I can modify its source code as I want. This is just not what most users are interested in and I neither want them to waste their time on SimplePatchTool nor want to keep rephrasing the documentation for them.

    Nonetheless, thank you for your interest in the plugin ^^
     
    Last edited: Jul 11, 2020
    EricWilliams likes this.
  45. Shortay91

    Shortay91

    Joined:
    Nov 15, 2012
    Posts:
    29
    Hey @yasirkula

    Loving the patch tool it works perfectly!

    Quick question...

    I'm using the SelfPatchingTool

    I have a license checker file which matches up to my clients server.

    it creates a streaming assets folder with the license.xml

    is there a way in the selfpatchingtool that I can exclude this single file or folder?

    I noticed when downloading the updates it overwrites the existing license.xml with the one in update server

    upload_2020-7-7_23-23-39.png
     

    Attached Files:

  46. yasirkula

    yasirkula

    Joined:
    Aug 1, 2011
    Posts:
    2,879
    You can add "Steel Challenge_Data/StreamingAssets/License.xml" to the IgnoredPaths list in your SimplePatchTool-project's Settings.xml file.
     
    Shortay91 likes this.
  47. Shortay91

    Shortay91

    Joined:
    Nov 15, 2012
    Posts:
    29
    Perfect thanks , it works!
     
    hopeful likes this.
  48. yasirkula

    yasirkula

    Joined:
    Aug 1, 2011
    Posts:
    2,879
    I'd recommend you to read my previous message before you decide to use SimplePatchTool. Other alternatives may be more suitable for your use-cases.
     
  49. Temka_193

    Temka_193

    Joined:
    Oct 24, 2015
    Posts:
    47
    when trying to update, the following happens. build a project on unity 2020.2.4 il2cpp
    Code (CSharp):
    1. System.ComponentModel.Win32Exception (0x80004005): mono-io-layer-error (0)
    2.   at System.Diagnostics.Process.StartWithShellExecuteEx (System.Diagnostics.ProcessStartInfo startInfo) [0x00000] in <00000000000000000000000000000000>:0
    3.   at System.Diagnostics.Process.Start (System.Diagnostics.ProcessStartInfo startInfo) [0x00000] in <00000000000000000000000000000000>:0
    4.   at SimplePatchToolCore.SimplePatchTool.ApplySelfPatch (System.String selfPatcherExecutable, System.String postSelfPatchExecutable) [0x00000] in <00000000000000000000000000000000>:0
    5.   at UnityEngine.RemoteSettings+UpdatedEventHandler.Invoke () [0x00000] in <00000000000000000000000000000000>:0
    6.   at UnityEngine.Events.UnityEvent.Invoke () [0x00000] in <00000000000000000000000000000000>:0
    7.   at System.Net.UploadFileCompletedEventHandler.Invoke (System.Object sender, System.Net.UploadFileCompletedEventArgs e) [0x00000] in <00000000000000000000000000000000>:0
    8.   at UnityEngine.EventSystems.ExecuteEvents.Execute[T] (UnityEngine.GameObject target, UnityEngine.EventSystems.BaseEventData eventData, UnityEngine.EventSystems.ExecuteEvents+EventFunction`1[T1] functor) [0x00000] in <00000000000000000000000000000000>:0
    9.   at UnityEngine.EventSystems.StandaloneInputModule.ReleaseMouse (UnityEngine.EventSystems.PointerEventData pointerEvent, UnityEngine.GameObject currentOverGo) [0x00000] in <00000000000000000000000000000000>:0
    10.   at UnityEngine.EventSystems.StandaloneInputModule.ProcessMousePress (UnityEngine.EventSystems.PointerInputModule+MouseButtonEventData data) [0x00000] in <00000000000000000000000000000000>:0
    11.   at UnityEngine.EventSystems.StandaloneInputModule.ProcessMouseEvent (System.Int32 id) [0x00000] in <00000000000000000000000000000000>:0
    12.   at UnityEngine.EventSystems.StandaloneInputModule.Process () [0x00000] in <00000000000000000000000000000000>:0
    13.   at UnityEngine.EventSystems.EventSystem.Update () [0x00000] in <00000000000000000000000000000000>:0