Search Unity

  1. Get the latest news, tutorials and offers directly to your inbox with our newsletters. Sign up now.
    Dismiss Notice

SimplePatchTool - open source patching solution for standalone platforms

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

  1. evonfischer

    evonfischer

    Joined:
    Nov 7, 2017
    Posts:
    2
    Hi @yasirkula ,

    I just started using your patching tool for a project I've been working on. Everything seems to work up until the point that the companion app is required to fire, the app opens and then silently closes before writing any of the downloaded patch files. I traced through the code, and from what I can tell at the least I should have gotten an error log out if anything related to the patching process failed. I dug a little deeper into the object compilation of the SelfPatcher project and found that the SelfPatcherCore.dll referenced by the Extras projects was not strongly named, causing a crash on execution but not on compilation. Once I signed the library and referenced the signed library, everything functioned as expected. You may want to add in your documentation that the SelfPatcherCore libraries require signing before being usable, at least on windows. I'm going to try a Mono build in a bit so I'll let you know if there is a similar issue.

    Once I got it working your patch tool is excellent, thank you for all of your effort developing this and stay awesome.
     
  2. yasirkula

    yasirkula

    Joined:
    Aug 1, 2011
    Posts:
    2,086
    Thank you for the feedback, it is much appreciated. By signing the library, do you mean signing it with a code signing certificate? During my tests, I haven't encountered this issue which is why I'm confused. I've also built my self patcher executable using Windows .NET, not Mono. I'll check out the strong-named assembly documentation to see if I'm missing something.
     
  3. evonfischer

    evonfischer

    Joined:
    Nov 7, 2017
    Posts:
    2
    I'm talking about signing it with either the Strong Name tool (SN.exe) or through Visual Studio's signing process https://docs.microsoft.com/en-us/dotnet/standard/assembly/strong-named by default Visual Studio requires this when a library is used in a signed or strong named application. It doesn't need a full application cert, it needs an RSA key pair to uniquely identify, this is to prevent a third party DLL of the same name from being used and potentially running unwanted code. Building using a standard Visual Studio installation on Windows or Mac reproduces this bug for me with your unmodified Extras project files until I signed the assembly, I personally just compiled the SelfPatchCore project and signed it with a new key but if the assembly is unsigned then other users should not have a problem using the Strong Name tool. The proper way to do circumvent this would be to sign them with an application cert to guarantee security, as strong named assemblies can be bypassed with relative ease, but as you stated above you are leaving that on the end user to make that investment, which totally makes sense for a free utility.

    I suppose it would be more accurate to state then that the assemblies require signing if they are being used in a signed compiled version of the SelfPatcher.exe
     
    yasirkula likes this.
  4. Lordmin

    Lordmin

    Joined:
    Mar 9, 2017
    Posts:
    54
    I used Unity 2018.4.0f1 and tested it on the Widnows10 operating system.
    I downloaded the asset from the Asset Store.
    Here are the items I tested.

    All tested by following 'YouTube' in a 'legacy' way.

    1. I tested SelfPatchingAppDemo first but it failed.
    1-1. I followed YouTube as it is.
    1-2. I ran Build1 and the top UI didn't show up at all.
    1-3. Failed.

    2. I tested LauncherDemo but it also failed.
    2-1. I followed YouTube as it is.
    2-1. When I launch the launcher, it says "ERROR: could not download version info from server".
    2-2 failed.

    has something in common: In 2018.4.0f1 version, if you click the "Create Patch" button using Legacy Patcher, unlike the YouTube video, 'InstallerPatch' folder is Add created.

    I want to be able to use this well crafted asset.
    Please upload the latest version of YouTube video!
    Please!
     
  5. yasirkula

    yasirkula

    Joined:
    Aug 1, 2011
    Posts:
    2,086
    I'm aware of the lack of documentation for the plugin. Although the wiki and the documentations for the example scenes are up-to-date, some users find them confusing. For now, I'd recommend you to check out this particular tutorial. If you really want to stick with the legacy video tutorials, you can use that particular version of SimplePatchTool plugin by first removing the current version from your project and then importing this unitypackage.
     
  6. Lordmin

    Lordmin

    Joined:
    Mar 9, 2017
    Posts:
    54
    Thank you so much for making great assets.
    But, It's hard to see and follow the tutorial..

    I want the latest video tutorial.
    It would be a very easy asset if you only had video!

    I wonder if you have the latest video upload plan!
    If I have a plan, can I ask when to upload?
     
    Last edited: Oct 28, 2019
  7. yasirkula

    yasirkula

    Joined:
    Aug 1, 2011
    Posts:
    2,086
    I don't plan to release a video tutorial in the near future since I'm working on my other plugins at the moment.
     
  8. Lordmin

    Lordmin

    Joined:
    Mar 9, 2017
    Posts:
    54
    1. I downloaded the legacy version of the Unity package.
    2. You followed the legacy version of the YouTube video.
    3. The launcher shows an ERROR: version info is invalid error. (Play is possible. Error occurs during update / repair.)
    4. The PatchNotes.txt file works just fine in the launcher. (not ftp error)

    What is the cause?

    I used the same FileZilla and used the Lagacy version you gave me the link.
     
  9. yasirkula

    yasirkula

    Joined:
    Aug 1, 2011
    Posts:
    2,086
    Can you send me the download url of your VersionInfo via private message?
     
  10. Shadowing

    Shadowing

    Joined:
    Jan 29, 2015
    Posts:
    1,530
    ahh no SelfPatcherExecutable anymore :(
    why did that get tossed out?

    I wont be able upgrade to the new version now. No time to figure out how to make my own. Instructions doesn't make any sense to me lol.

    Was there actually any serious bugs fixed this year in 2019?
    Thinking about just using 2018 version and never upgrading. :(

    Guess im bummed out about the executable thing.
    Guess i can try to upgrade again in 6 months when I have more time on my hands.
     
  11. yasirkula

    yasirkula

    Joined:
    Aug 1, 2011
    Posts:
    2,086
    @Shadowing This explains why I've removed the self patcher executable from the plugin and how to create the same self patcher executable yourself. If you don't feel comfortable with the new release, you can continue using the previous release. There were some bugfixes (I don't really remember what they were about, you can check out the commits that mention "bugfix" here: https://github.com/yasirkula/SimplePatchTool/commits/master), so I can't really promise whether or not you'll encounter these bugs at some point with the early versions.
     
    hopeful likes this.
  12. Shadowing

    Shadowing

    Joined:
    Jan 29, 2015
    Posts:
    1,530
    Oh ya that makes sense. sorry i missed that explanation some where.
    I'll just post pone the update till later when I have more time.

    I had one guy say his virus scanner detected a virus. I bet this is what he was talking about.
    Its odd though I ran a online scan that uses ton of known virus scanners and none of them detected it. I could never duplicate his issue.
     
  13. yasirkula

    yasirkula

    Joined:
    Aug 1, 2011
    Posts:
    2,086
    I think it was a "potentially dangerous software" warning rather than a "virus warning" that they mentioned. It is caused by unsigned executables, unfortunately.
     
    hopeful likes this.
  14. odcheban

    odcheban

    Joined:
    Oct 13, 2017
    Posts:
    4
    Hi, I get this error once a week.
     

    Attached Files:

  15. yasirkula

    yasirkula

    Joined:
    Aug 1, 2011
    Posts:
    2,086
    There are only a few places where SPTUtils.OnUpdate is used and at the moment, I couldn't detect any potential issues there. Thank you for reporting this issue but I might not be able to resolve it soon since I can't figure out the cause of the issue.
     
  16. sandeep_tfg

    sandeep_tfg

    Joined:
    Sep 30, 2016
    Posts:
    2
    Getting the following error while creating Incremental Patch. This use to work earlier for the same project.

    Code (CSharp):
    1. System.UnauthorizedAccessException: Access to the path "G:/ONLINE_LAUNCHER_TEST/GAME_ONLINE\Temp\Incremental\Temp\MyGame_Data\Managed\DOTween.dll.mdb" is denied.
    2.   at System.IO.File.Delete (System.String path) [0x00073] in <599589bf4ce248909b8a14cbe4a2034e>:0
    3.   at System.IO.Directory.RecursiveDelete (System.String path) [0x0003f] in <599589bf4ce248909b8a14cbe4a2034e>:0
    4.   at System.IO.Directory.RecursiveDelete (System.String path) [0x00024] in <599589bf4ce248909b8a14cbe4a2034e>:0
    5.   at System.IO.Directory.RecursiveDelete (System.String path) [0x00024] in <599589bf4ce248909b8a14cbe4a2034e>:0
    6.   at System.IO.Directory.Delete (System.String path, System.Boolean recursive) [0x00009] in <599589bf4ce248909b8a14cbe4a2034e>:0
    7.   at SimplePatchToolCore.PatchUtils.DeleteDirectory (System.String path) [0x00010] in <334653d73d7947a3b169e1ee5498c52e>:0
    8.   at SimplePatchToolCore.PatchCreator.CreateIncrementalPatch () [0x00125] in <334653d73d7947a3b169e1ee5498c52e>:0
    9.   at SimplePatchToolCore.PatchCreator.CreatePatch () [0x0011e] in <334653d73d7947a3b169e1ee5498c52e>:0
    10.   at SimplePatchToolCore.PatchCreator.ThreadCreatePatchFunction () [0x00000] in <334653d73d7947a3b169e1ee5498c52e>:0
    11. UnityEngine.Debug:Log(Object)
    12. SimplePatchToolUnity.PatcherEditor:OnUpdate() (at Assets/Plugins/SimplePatchTool/Editor/PatcherEditor.cs:152)
    13. UnityEditor.EditorApplication:Internal_CallUpdateFunctions()`
    14.  
    Please guide us through this as we are on a deadline.

    Thanks in Advance. :D
     
  17. yasirkula

    yasirkula

    Joined:
    Aug 1, 2011
    Posts:
    2,086

    Attached Files:

  18. sandeep_tfg

    sandeep_tfg

    Joined:
    Sep 30, 2016
    Posts:
    2
    Thanks for the prompt response. I have started creating an incremental patch after replacing the DLL you provided and I'll let you know the result. This generally takes a few hours for my project. :)
     
    yasirkula likes this.
  19. AndyVMonsterful

    AndyVMonsterful

    Joined:
    Apr 29, 2019
    Posts:
    1
    Thank you for creating this excellent tool!

    I would like to automate as much of this as possible but can't find any posts on leveraging something similar to the Unity CLI. Is this possible? If so, do you have any documentation or a tutorial you could share?

    We want to create an automated build that publishes patches automatically so that we can patch our launcher quickly after our automated build completes.
     
  20. yasirkula

    yasirkula

    Joined:
    Aug 1, 2011
    Posts:
    2,086
    AndyVMonsterful likes this.
  21. visualjoy

    visualjoy

    Joined:
    Aug 23, 2016
    Posts:
    29
    Hello! I try to make a self patching and got this error:
    upload_2019-11-22_12-46-50.png

    I put the output files in my server:
    upload_2019-11-22_12-49-50.png
    Any ideas?
     
  22. yasirkula

    yasirkula

    Joined:
    Aug 1, 2011
    Posts:
    2,086
    Please check spt_logs.txt in your patched app's directory to see if there are other error messages. You can also send me your VersionInfo's url via private message and I can check it out.
     
  23. visualjoy

    visualjoy

    Joined:
    Aug 23, 2016
    Posts:
    29
    Well, i check spt_logs and could not download

    spt_logs.txt:

    === 11/22/2019 14:42:42 ===
    ...Retrieving version info...
    ...Checking if files are up-to-date...
    Preferred patch method IncrementalPatch: 0.05MB
    Preferred patch method RepairPatch: 0.62MB
    Preferred patch method InstallerPatch: 46.92MB
    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 7 new or updated file(s)...
    ...Updating 7 file(s)...
    1/7 Downloading: MagipixEditor_Data\globalgamemanagers (0.06MB)
    DownloadError: ERROR: MagipixEditor_Data\globalgamemanagers could not be downloaded
    Applying installer patch
    ...Calculating new or changed files...
    ...Downloading patch: Installer.patch...
    DownloadError: ERROR: Installer.patch could not be downloaded
    ERROR: Installer.patch could not be downloaded

    I send you in private the VersionInfo, thanks for reply!
     
  24. AndyHubbard

    AndyHubbard

    Joined:
    Jul 9, 2015
    Posts:
    13
    I have been using Simple Patch Tool for quite some time and it has been great as a self patching solution for me. I do now want to build with IL2CPP but the patch initialization fails when running with an IL2CPP build:

    Code (CSharp):
    1. ArgumentNullException: Collection cannot be null.
    2. Parameter name: c
    3.   at System.Collections.ArrayList.InsertRange (System.Int32 index, System.Collections.ICollection c) [0x00000] in <00000000000000000000000000000000>:0
    4.   at System.Diagnostics.Process.get_Modules () [0x00000] in <00000000000000000000000000000000>:0
    5.   at System.Diagnostics.Process.get_MainModule () [0x00000] in <00000000000000000000000000000000>:0
    6.   at SimplePatchToolCore.PatchUtils.GetCurrentExecutablePath () [0x00000] in <00000000000000000000000000000000>:0
    7.   at SimplePatchToolUnity.SelfPatchingAppDemo.InitializePatcher () [0x00000] in <00000000000000000000000000000000>:0
    8.   at SimplePatchToolUnity.SelfPatchingAppDemo.Awake () [0x00000] in <00000000000000000000000000000000>:0
    9. (Filename: currently not available on il2cpp Line: -1)
    It is fine with a Mono build.

    Any tips please?

    Cheers,

    Andy
     
  25. yasirkula

    yasirkula

    Joined:
    Aug 1, 2011
    Posts:
    2,086
    I'm curious if these two issues are related: https://forum.unity.com/threads/solved-il2cpp-and-process-start.533988/

    Can you try this workaround:

    - Clone/download this repository: https://github.com/yasirkula/SimplePatchTool
    - Change this function as follows:
    Code (CSharp):
    1. public static string GetCurrentExecutablePath()
    2. {
    3.     return Path.GetFullPath( System.Reflection.Assembly.GetEntryAssembly().Location );
    4. }
    - Rebuild the SimplePatchToolCore project (right click it and select Rebuild in Visual Studio)
    - Replace
    Assets/Plugins/SimplePatchTool/DLL/SimplePatchTool.dll
    with
    CLONED_PROJECT_PATH/Extras/lib/SimplePatchTool.dll
     
    Last edited: Dec 19, 2019
  26. AndyHubbard

    AndyHubbard

    Joined:
    Jul 9, 2015
    Posts:
    13
    Hi,

    I tried that and now I get a different error, but in the same place.

    Code (CSharp):
    1. NullReferenceException: Object reference not set to an instance of an object.
    2.   at SimplePatchToolCore.PatchUtils.GetCurrentExecutablePath () [0x00000] in <00000000000000000000000000000000>:0
    3.   at SimplePatchToolUnity.SelfPatchingAppDemo.InitializePatcher () [0x00000] in <00000000000000000000000000000000>:0
    4.   at SimplePatchToolUnity.SelfPatchingAppDemo.Awake () [0x00000] in <00000000000000000000000000000000>:0
    5. (Filename: currently not available on il2cpp Line: -1)
     
  27. yasirkula

    yasirkula

    Joined:
    Aug 1, 2011
    Posts:
    2,086
    Can you try replacing GetEntryAssembly with GetExecutingAssembly (also note that I've removed GetDirectoryName from the function, I shouldn't have used it there)?
     
  28. AndyHubbard

    AndyHubbard

    Joined:
    Jul 9, 2015
    Posts:
    13
    I tried that and now get this
    Code (CSharp):
    1. ArgumentException: The specified path is not of a legal form (empty).
    2.   at System.IO.Path.InsecureGetFullPath (System.String path) [0x00000] in <00000000000000000000000000000000>:0
    3.   at System.IO.Path.GetFullPath (System.String path) [0x00000] in <00000000000000000000000000000000>:0
    4.   at SimplePatchToolUnity.SelfPatchingAppDemo.InitializePatcher () [0x00000] in <00000000000000000000000000000000>:0
    5.   at SimplePatchToolUnity.SelfPatchingAppDemo.Awake () [0x00000] in <00000000000000000000000000000000>:0
    6. (Filename: currently not available on il2cpp Line: -1)
    Here is my PatchUtils
    Code (CSharp):
    1.         public static string GetCurrentExecutablePath()
    2.         {
    3.             return Path.GetFullPath(System.Reflection.Assembly.GetExecutingAssembly().Location);
    4.         }
    And here is the line I have in InitializePatcher
    Code (CSharp):
    1. patcher = SPTUtils.CreatePatcher( Path.GetDirectoryName( PatchUtils.GetCurrentExecutablePath() ), versionInfoURL );
     
  29. yasirkula

    yasirkula

    Joined:
    Aug 1, 2011
    Posts:
    2,086
    Hmm, it is starting to become kinda annoying, lol. Please give this one a shot:

    Code (CSharp):
    1. public static string GetCurrentExecutablePath()
    2. {
    3.     // If there are any error messages, try entering the filename manually, e.g. "MyGame.exe"
    4.     string filename = System.Reflection.Assembly.GetExecutingAssembly().ManifestModule.Name;
    5.     return Path.GetFullPath( Path.Combine( Directory.GetCurrentDirectory(), filename ) );
    6. }
     
  30. AndyHubbard

    AndyHubbard

    Joined:
    Jul 9, 2015
    Posts:
    13
    Some forward progress :)
    I had to enter the filename manually as not doing that gave this:
    Code (CSharp):
    1. NotSupportedException: D:\Unity\2019.2.17f1\Editor\Data\il2cpp\libil2cpp\icalls\mscorlib\System.Reflection\Assembly.cpp(544) : Unsupported internal call for IL2CPP:Assembly::GetManifestModuleInternal - "This icall is not supported by il2cpp."
    2.   at SimplePatchToolCore.PatchUtils.GetCurrentExecutablePath () [0x00000] in <00000000000000000000000000000000>:0
    3.   at SimplePatchToolUnity.SelfPatchingAppDemo.InitializePatcher () [0x00000] in <00000000000000000000000000000000>:0
    4.   at SimplePatchToolUnity.SelfPatchingAppDemo.Awake () [0x00000] in <00000000000000000000000000000000>:0
    5. (Filename: currently not available on il2cpp Line: -1)
    And now things get a little further but hit this error:
    Code (CSharp):
    1. ERROR: ERROR: version info is invalid
    2. UnityEngine.Logger:Log(LogType, Object)
    3. UnityEngine.Debug:LogError(Object)
    4. SimplePatchToolUnity.<CheckForUpdatesCoroutine>d__13:MoveNext()
    5. UnityEngine.SetupCoroutine:InvokeMoveNext(IEnumerator, IntPtr)
    And spt_logs has this:
    Code (CSharp):
    1. === 12/21/2019 11:51:54 ===
    2. ...Checking for updates...
    3. System.InvalidOperationException: There was an error reflecting type 'SimplePatchToolCore.VersionInfo'. ---> System.InvalidOperationException: SimplePatchToolCore.VersionInfo cannot be serialized because it does not have a default public constructor
    4.   at System.Xml.Serialization.ReflectionHelper.CheckSerializableType (System.Type type, System.Boolean allowPrivateConstructors) [0x00000] in <00000000000000000000000000000000>:0
    5.   at System.Xml.Serialization.XmlReflectionImporter.ImportClassMapping (System.Xml.Serialization.TypeData typeData, System.Xml.Serialization.XmlRootAttribute root, System.String defaultNamespace, System.Boolean isBaseType) [0x00000] in <00000000000000000000000000000000>:0
    6.   at System.Xml.Serialization.XmlReflectionImporter.ImportTypeMapping (System.Xml.Serialization.TypeData typeData, System.Xml.Serialization.XmlRootAttribute root, System.String defaultNamespace) [0x00000] in <00000000000000000000000000000000>:0
    7.   at System.Xml.Serialization.XmlSerializer..ctor (System.Type type, System.Xml.Serialization.XmlAttributeOverrides overrides, System.Type[] extraTypes, System.Xml.Serialization.XmlRootAttribute root, System.String defaultNamespace) [0x00000] in <00000000000000000000000000000000>:0
    8.   at System.Xml.Serialization.XmlSerializer..ctor (System.Type type) [0x00000] in <00000000000000000000000000000000>:0
    9.   at SimplePatchToolCore.PatchUtils.DeserializeXMLToVersionInfo (System.String xmlContent) [0x00000] in <00000000000000000000000000000000>:0
    10.   at SimplePatchToolCore.SimplePatchTool.FetchVersionInfo () [0x00000] in <00000000000000000000000000000000>:0
    11.   at SimplePatchToolCore.SimplePatchTool.ThreadCheckForUpdatesFunction (System.Object checkVersionOnlyParameter) [0x00000] in <00000000000000000000000000000000>:0
     
  31. yasirkula

    yasirkula

    Joined:
    Aug 1, 2011
    Posts:
    2,086
    You need to prevent SimplePatchTool from getting stripped by IL2CPP. Please check out this documentation to see how. I think your link.xml should have these lines:

    Code (CSharp):
    1. <linker>
    2.        <assembly fullname="SimplePatchTool" preserve="all"/>
    3.        <assembly fullname="SimplePatchToolCore" preserve="all"/>
    4.        <assembly fullname="SimplePatchToolSecurity" preserve="all"/>
    5. </linker>
     
  32. AndyHubbard

    AndyHubbard

    Joined:
    Jul 9, 2015
    Posts:
    13
    That got it :)
    Many thanks for the fantastic support.
     
    yasirkula likes this.
  33. AndyHubbard

    AndyHubbard

    Joined:
    Jul 9, 2015
    Posts:
    13
    Hi Yasirkula,

    Me again!

    I have successful downloading of incremental patches with an IL2CPP build, but the launching of the selfpatcher fails.

    Code (CSharp):
    1. ...Patch successfully completed in 216.278 seconds...
    2. ...Waiting for the self patcher to complete the update...
    3.  
    4. === 12/23/2019 09:46:57 ===
    5. System.ComponentModel.Win32Exception (0x80004005): Success
    6.   at System.Diagnostics.Process.StartWithShellExecuteEx (System.Diagnostics.ProcessStartInfo startInfo) [0x00000] in <00000000000000000000000000000000>:0
    7.   at System.Diagnostics.Process.Start (System.Diagnostics.ProcessStartInfo startInfo) [0x00000] in <00000000000000000000000000000000>:0
    8.   at SimplePatchToolCore.SimplePatchTool.ApplySelfPatch (System.String selfPatcherExecutable, System.String postSelfPatchExecutable) [0x00000] in <00000000000000000000000000000000>:0
    9.   at System.Threading.ThreadStart.Invoke () [0x00000] in <00000000000000000000000000000000>:0
    10.   at UnityEngine.Events.UnityEvent.Invoke () [0x00000] in <00000000000000000000000000000000>:0
    11.   at System.Diagnostics.DataReceivedEventHandler.Invoke (System.Object sender, System.Diagnostics.DataReceivedEventArgs e) [0x00000] in <00000000000000000000000000000000>:0
    12.   at UnityEngine.EventSystems.ExecuteEvents.Execute[T] (UnityEngine.GameObject target, UnityEngine.EventSystems.BaseEventData eventData, UnityEngine.EventSystems.ExecuteEvents+EventFunction`1[T1] functor) [0x00000] in <00000000000000000000000000000000>:0
    13.   at UnityEngine.EventSystems.StandaloneInputModule.ReleaseMouse (UnityEngine.EventSystems.PointerEventData pointerEvent, UnityEngine.GameObject currentOverGo) [0x00000] in <00000000000000000000000000000000>:0
    14.   at UnityEngine.EventSystems.StandaloneInputModule.ProcessMousePress (UnityEngine.EventSystems.PointerInputModule+MouseButtonEventData data) [0x00000] in <00000000000000000000000000000000>:0
    15.   at UnityEngine.EventSystems.StandaloneInputModule.ProcessMouseEvent (System.Int32 id) [0x00000] in <00000000000000000000000000000000>:0
    16.   at UnityEngine.EventSystems.StandaloneInputModule.Process () [0x00000] in <00000000000000000000000000000000>:0
    17.   at UnityEngine.EventSystems.EventSystem.Update () [0x00000] in <00000000000000000000000000000000>:0
    18.  
    I have made SelfPatcherCore.dll referenced by the Extras projects strongly named as per the post from evonfischer, and it starts to run OK in a command prompt from the games SPPatcher folder (with an expected args format error message).
     
  34. yasirkula

    yasirkula

    Joined:
    Aug 1, 2011
    Posts:
    2,086
  35. AndyHubbard

    AndyHubbard

    Joined:
    Jul 9, 2015
    Posts:
    13
    Thanks for the pointer. I have selfpatcher running from my game build using IL2cppStartProcess built into SimplePatchTool.dll. I need to do a selfpatch update or two to test things properly but hopefully my hurdles are overcome ;)
     
    yasirkula likes this.
  36. Shadowing

    Shadowing

    Joined:
    Jan 29, 2015
    Posts:
    1,530
    I think i may of ran into a bug finally. With the old version Haven't updated yet.
    I'm doing a larger game and I noticed incremental patch isn't working. The incremental patch size is always the size of the repair patch file.

    I know its a bit much to ask lol.
    But I was looking through your comments for this years updates Git. Curious if there was a simple fix for this issue. Like a one script edit? That you don't think it will break anything else with out updating yet?
     
  37. yasirkula

    yasirkula

    Joined:
    Aug 1, 2011
    Posts:
    2,086
    Can't recall fixing such a bug. So, incremental patch is broken when the game is, let's say, at least 1 GB large; am I correct? With "always the size of", do you mean exactly the same size, i.e. total size of all repair patch files?
     
  38. Shadowing

    Shadowing

    Joined:
    Jan 29, 2015
    Posts:
    1,530
    The incrementalPatch folder is 2.62GB and the RepairPatch folder is 2.72GB

    I can send you a test project. My internet is increasing to 14 up so i'll be able send you my test project. If you can't duplicate it some way.

    Thats like plan F.

    First i'll do a test I guess where I only change a simple thing to see how big the patch is.
    I really didn't change must stuff though. Its suppose to be a incremental patch using binary data though right?
     
  39. Shadowing

    Shadowing

    Joined:
    Jan 29, 2015
    Posts:
    1,530
    Everything seems fine now. added a new game object did a new build and patch and was only 30Mb.
    I always move the new build files into the previous build folder and then delete the build files.
    But I noticed yesterday that i still had file in the build folder. I figured i just forgot to delete them. But maybe that wasn't the case. Maybe I did a new build at some point and I forgot and i replaced the preview files. I really don't think i did that though. I don't remember ever doing a build with out doing a patch.
    So that would make sense why the patch was the full size almost.

    so we will play it by ear. Wait till i do more patches I guess. Just need to be more careful.
    Sorry for troubles lol :)
     
  40. Shadowing

    Shadowing

    Joined:
    Jan 29, 2015
    Posts:
    1,530
    I was curious does your new 2019 version fix the issue where I don't need to always do a repair patch?
    Wondering if you worked that out yet?
    Just to clarify thats only a issue if someone needs to do a repair right?
    First time downloading and patching should work just fine?
     
  41. Shadowing

    Shadowing

    Joined:
    Jan 29, 2015
    Posts:
    1,530
    I made several changes and the patch is a huge file again :( So there is a issue going on then. Dang.
    If I sent you previous build and new build would that help you any with looking into it?

    Edit: The patch ended up being 800mb. But still that seems crazy large for the little amount I changed. Interesting enough though it was like 6gb while it was doing "Compressing incremental patch into one file"
    Thats why i thought it was going to be full size of the build.
    Took a really long time to do the patch took.
    When I changed one thing in one scene and did a patch. It did the patch in like 5 minutes and was only 30mb. But when I changed things in several scenes it took a hour.
    All I mostly did was change the positioning of like 300 transforms in 5 scenes.
    Should of been less than 100 mb doing that.
     
    Last edited: Jan 8, 2020
  42. yasirkula

    yasirkula

    Joined:
    Aug 1, 2011
    Posts:
    2,086
  43. Shadowing

    Shadowing

    Joined:
    Jan 29, 2015
    Posts:
    1,530
    I use Unity Hub. I can just create a new project and test the newest version of simplePatchTool out.
    So I'll try that out.
     
  44. Skauron

    Skauron

    Joined:
    Aug 12, 2018
    Posts:
    2
    Hey, I'm just following the guide and everytime I test the launcher it happen this, any help?

    Captura.PNG
     
  45. yasirkula

    yasirkula

    Joined:
    Aug 1, 2011
    Posts:
    2,086
    Probably the download url of the Installer.patch file is inaccessible, which results in SimplePatchTool downloading the corresponding "File Not Found" HTML page instead of the actual Installer.patch file. Please verify that the download url can be accessed from your web browser's incognito window. If that is not the case, you can send your VersionInfo.info to me via private message, if you want.
     
  46. willianjohns

    willianjohns

    Joined:
    Jul 11, 2013
    Posts:
    23
    I have two doubts, can this asset be a substitute for Addressable? In the case of updating my game assets and scripts, since Addressable does not update scripts and this asset does, am I correct?
    My other question is whether I can finish my game and worry about implementing this asset at the end of my game development or should I implement it now?
     
  47. yasirkula

    yasirkula

    Joined:
    Aug 1, 2011
    Posts:
    2,086
    You can update scripts with this asset, yes. I'd agree that if you are using a patcher, then using Addressables or AssetBundles isn't really necessary anymore.

    You can add SimplePatchTool to your project at the end of your game development. If you are planning to use a separate launcher app, then you won't have to make any changes to your Unity app at all.
     
  48. willianjohns

    willianjohns

    Joined:
    Jul 11, 2013
    Posts:
    23
    Cool, I just followed a tutorial from you here on the forum, it worked, but this asset doesn't work like Addressable to check if any files are missing and download it, am I right? This asset is more like a launcher that updates the game version, correct?
     
  49. yasirkula

    yasirkula

    Joined:
    Aug 1, 2011
    Posts:
    2,086
    Repair patch will download missing files from the server.
     
  50. NamelessPerson

    NamelessPerson

    Joined:
    Apr 17, 2017
    Posts:
    26
    Hi @yasirkula ! Just started integrating this into an internal app deployment and it works great! Though there is one feature I'm not quite sure how to accomplish: Having multiple release branches (like a release and beta branch).

    I have built a simple middleware server to abstract the request for update files. Is there a way I can instruct client requests to download a specific patch instead of just the newest one? Would it just involve maintaining two VersionInfo documents and sending the corresponding one? Or would I need to create and maintain two separate project folders.

    Thanks!
     
unityunity