Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

M2HPatcher - The Unity patching solution

Discussion in 'Assets and Asset Store' started by MikeHergaarden, Nov 12, 2011.

  1. MikeHergaarden

    MikeHergaarden

    Joined:
    Mar 9, 2008
    Posts:
    1,027
    TOOL NO LONGER AVAILABLE


    What is M2HPatcher?

    A multi platform (Mac + Windows) patch solution for Unity. It allows Unity developers to launch
    updates of their games in a single mouse click. Just sit back and wait for the automated
    building, zipping, patch creation and uploading of the game files!

    Features
    ● The creation tool is fully integrated in the Unity editor (Mac and Win)
    ● Supports any Mac and Windows standalone games (plus additional files)
    ● Full source code included for both the editor scripts and the patch client
    ● Updates can be enforced&started from inside your game
    ● Fully automated: just click “Publish” to distribute the latest version to your users:
    - increases the build version number
    - builds a full [Windows, Mac, Webplayer] version of your product
    - creates patches with earlier standalone builds
    - zips the full builds and patch files
    - upload the full builds and patch files
    - publish the latest version number online

    Links
    Download it from the asset store
    Video showcase
    Documentation




    Version history
     
    Last edited: Apr 10, 2017
  2. Robbilie2

    Robbilie2

    Joined:
    Aug 4, 2010
    Posts:
    262
    Will it still be free?
     
  3. seon

    seon

    Joined:
    Jan 10, 2007
    Posts:
    1,441
    Looks awesome dude! Well done :)
     
  4. RobinS

    RobinS

    Joined:
    Sep 2, 2011
    Posts:
    417
    fantastic ! Good job :)
     
  5. PolyMad

    PolyMad

    Joined:
    Mar 19, 2009
    Posts:
    2,350
    Can't find it on the AS.
     
  6. MikeHergaarden

    MikeHergaarden

    Joined:
    Mar 9, 2008
    Posts:
    1,027
  7. simonwittber

    simonwittber

    Joined:
    May 13, 2008
    Posts:
    228
    I've paid (a premium price on the asset store) for this, hoping for a plug and play solution. I've had to make a few changes to get things working, and I'm still getting issues.


    Some suggestions:

    1. When errors occur, the progress bar is sometimes not cleared, which means a Force Quit of an otherwise running Unity instance.

    2. At line 15 in uploadEditorData.php, this line needs to be added before the script works in Ubuntu or similarly configured PHP.

    $action = $_REQUEST['action'];

    3. The ftp code won't upload to an absolute folder. Using /var/www/downloads for instance, tries to upload to /home/simon/var/www/downloads. I solved this with a symlink.

    4. When the publish command bombs out, please restore the original player settings.

    Finally, my current problem involves this exception:

    Code (csharp):
    1. Win32Exception: ApplicationName='/Users/simon/Unity/DB/SkoolboMobile/Assets/M2HPatcher/PatchClient/bsdiff', CommandLine='"/Users/simon/Unity/DB/SkoolboMobile/builds/000001/StandaloneOSXIntel/Skoolbo.app/Contents/Data/level0" "/Users/simon/Unity/DB/SkoolboMobile/builds/000002/StandaloneOSXIntel/Skoolbo.app/Contents/Data/level0" "/var/folders/FY/FYynE0B7FSKk6pjqIh4E1++++TI/-Tmp-/M2HPatcherTMP/StandaloneOSXIntel_1_2__11850/Skoolbo.app/Contents/Data/level0"', CurrentDirectory=''
    2.   at System.Diagnostics.Process.Start_noshell (System.Diagnostics.ProcessStartInfo startInfo, System.Diagnostics.Process process) [0x00000] in <filename unknown>:0
    3.   at System.Diagnostics.Process.Start_common (System.Diagnostics.ProcessStartInfo startInfo, System.Diagnostics.Process process) [0x00000] in <filename unknown>:0
    4.   at System.Diagnostics.Process.Start (System.Diagnostics.ProcessStartInfo startInfo) [0x00000] in <filename unknown>:0
    5.   at M2HPatcher_CreatePatch.CreatePatches (System.String[] filesFrom, System.String[] filesTo, System.String[] fileOutput) [0x0018d] in /Users/simon/Unity/DB/SkoolboMobile/Assets/M2HPatcher/Editor/M2HPatcher_CreatePatch.cs:369
    6.   at M2HPatcher_CreatePatch.MakePatchForDir (System.String from, System.String to, System.String outputFolder, System.String patchTitle) [0x0019d] in /Users/simon/Unity/DB/SkoolboMobile/Assets/M2HPatcher/Editor/M2HPatcher_CreatePatch.cs:134
    7.   at M2HPatcher_CreatePatch.MakePatches (Int32 oldVersion, Int32 newVersion) [0x0017c] in /Users/simon/Unity/DB/SkoolboMobile/Assets/M2HPatcher/Editor/M2HPatcher_CreatePatch.cs:77
    8.   at M2HPatcher.Publish () [0x0006b] in /Users/simon/Unity/DB/SkoolboMobile/Assets/M2HPatcher/Editor/M2HPatcher.cs:84
    9.   at M2HPatcherGUI.Publish () [0x00005] in /Users/simon/Unity/DB/SkoolboMobile/Assets/M2HPatcher/Editor/M2HPatcherGUI.cs:226
    10.  
    11. (Filename: Assets/M2HPatcher/Editor/M2HPatcher_CreatePatch.cs Line: 369)
    I'll post a suggested fix when I solve it.

    Update: The above exception seems to be a permissions related problem. chmod +x on the included bsdiff and bspatch binaries is needed.
     
    Last edited: Nov 30, 2011
  8. MikeHergaarden

    MikeHergaarden

    Joined:
    Mar 9, 2008
    Posts:
    1,027
    First of all, thank you for purchasing the package. I'm sorry it did not work out of the box for you.

    I've added a few more ClearProgress bars in the code where required.

    The weird thing is that I never required a force-quit to fix a hanging progress bar, the progress bar will indeed remain visible but it does not hang the application. I could always simply ignore the progress bar or quit and re-open Unity to clear it. Maybe worth a Unity bug report?

    Added to the packages default webserver.zip

    Added support for absolute paths (when the first character of the ftp_folder is a "/".

    I haven't been able to narrow this down. PlayerSettings are only changed when rebuilding the patch clients ( RebuildPatchers(); ). What error did you experience to have RebuildPatchers fail?

    I've added a few checks on the patchclients to detect when a chmod +x is required.
    I take it that you only need to call the chmod +x once after downloading the package from the asset store? Maybe the asset store packaging emsses up execution rights, I do not remember I had to call chmod after testing on my Mac (via assetserver).

    I hope it's now all working as desired for you. If not; I'd gladly offer support.

    Update 1.01 has been submitted to the asset store and should be live +-friday
     
    Last edited: Nov 30, 2011
  9. simonwittber

    simonwittber

    Joined:
    May 13, 2008
    Posts:
    228
    Wow thanks, thats great, overnight bug fixes! :)

    I have it all working now, and performed my first publish end to end last night. It's really going to save on my bandwidth, and my client will be much happier too. I'm going to investigate creating an option to upload patches only, which will be handy for me.

    Thanks for a much needed product!
     
  10. any_user

    any_user

    Joined:
    Oct 19, 2008
    Posts:
    374
    I purchased the package yesterday for using it in our upcoming game Krautscape (http://krautscape.net/). Unfortunately, it also didn't work out of the box for me (Unity 3.4.2, OSX 10.7).

    Bugs:
    • The Patch Application was missing the patchsettings.txt. After some debugging, I found that there is a slash too much when generating the path for patchsettings.txt which prevents the script from generating the file (without any error message). removing the leading slash before "Patcher.app" solves this for me, at line 330 / M2HPatcher.cs. Don't know if this is a Mac-only problem.
    • If the Game name contains "Patch" (in my case it was PatchTestApplication), it is not possible to launch the game from the patcher, because GetMacApp() / PatchClientGUI.cs filters everything with the word "Patch" in it.

    Suggestions:
    • It would be nice to have a checkbox to upload patches only, as simonwittber mentioned. Especially for testing, it would be great to have this option. Maybe there could be a dialog after pressing on the "Publish" button with checkboxes like "Upload current version", "Increase version number on webserver" etc..
    • Would it be possible to upload the files in the background?
    • I'm thinking about moving the Patcher.app to another unity project, because I want no unused resources to be included (we're using the Resources directory for some assets).
    • Did you ever think of moving the gameversion info into the game directory, so we could reuse the patcher for different versions of a game without rebuilding or changing any contents/settings?

    But anyway, thanks for building this, it's a good product, even though it needs a bit more polish to be great!
     
    Last edited: Dec 31, 2011
  11. MikeHergaarden

    MikeHergaarden

    Joined:
    Mar 9, 2008
    Posts:
    1,027
    Hi Existing_name,

    Thanks for the constructive feedback, I indeed need to do some more polishing on Mac.
    All suggestions and bugreports make sense and I'll look into them.

    "Would it be possible to upload the files in the background?"
    No I'm afraid not, it's impossible to 'yield' in editor scripting AFAIK. Maybe there are workarounds I don't know of though?

    "I'm thinking about moving the Patcher.app to another unity project, because I want no unused resources to be included (we're using the Resources directory for some assets)."
    Right, I could rename the Resources folder for the patcher just before and after building the patcher. Then you wouldn't need to move it to another project.

    "Did you ever think of moving the gameversion info into the game directory, so we could reuse the patcher for different versions of a game without rebuilding or changing any contents/settings?"
    I'll need to have a look at this.
     
  12. dgutierrezpalma

    dgutierrezpalma

    Joined:
    Dec 22, 2009
    Posts:
    404
    In the development version of Pro Racing AI, I'm using Threads instead of yield statements to update a progress bar while I'm doing some heavy calculations. This solution has some quirks (even if the thread continues running in the background, if the Unity Editor doesn't have the focus, the progress bar is not updated), but at least it works.

    I'm still trying to find out how to improve the progress bar behaviour, but I think using real Threads instead of yield statements could be a good starting point for you.
     
    Last edited: Jan 3, 2012
  13. HarvesteR

    HarvesteR

    Joined:
    May 22, 2009
    Posts:
    531
    Hi,

    This system sounds really good. However, I have a few questions here:

    My project relies heavily on external files on the game folder, that are loaded at runtime. These files will need updating every now and then too. How well does M2H cope with these external assets? Or more specifically, how can you set those files to be uploaded along with the latest patch?

    Also, since the project here is going to be pay-to-download, I want the patcher to require the player to first login to his webstore account before allowing it to start the update. How possible would that be?

    One more thing, since the project is commercial, we also need to be able to host the game downloadables in a secure location (probably encrypted). Is that ok with M2H?

    Oh, and one last thing... we here already have our own version numbering scheme, which we would like to keep. Can M2H use custom numbering systems, or will it be necessary to somehow sync up the build id with our own versioning scheme?

    All in all, it looks like a VERY good option, and being able to publish patches straight from the editor would literally save us an entire day of work whenever we do update releases.

    Cheers
     
    Last edited: Jan 3, 2012
  14. romeo_ftv

    romeo_ftv

    Joined:
    Oct 20, 2009
    Posts:
    36
    or use EditorApplication.update
     
  15. dgutierrezpalma

    dgutierrezpalma

    Joined:
    Dec 22, 2009
    Posts:
    404
    I didn't know about that property, I'll give it a try... but I've checked the Scripting Reference and there isn't any sample code. Do you know if it can be use as a replacement of yield statements (and real Threads) to distribute a long process over several seconds without blocking the Unity Editor? How is it supposed to be used?
     
  16. MikeHergaarden

    MikeHergaarden

    Joined:
    Mar 9, 2008
    Posts:
    1,027
    This is something I won't support in the package itself as it should remain a general purpose solution. However all source code is available so you can customize it to your needs.
    You could edit the default patch client and add a login scene. Then only proceed to the current, patch, scene after logging in. To make it even more secure you'd also need to secure the download URL on the server side.

    I wouldn't mind :p. Note that we don't host any of the patches/projects you make: You need to host them on your own servers.

    Hm, you can modify the patchers verson number any time, but it always uses an int and increments it by 1 for every publish. You could choose to simply keep the M2H versioning but use it as build number only, next to your own versioning.
     
  17. MikeHergaarden

    MikeHergaarden

    Joined:
    Mar 9, 2008
    Posts:
    1,027
    This feedback is still on my todo list:

     
  18. MikeHergaarden

    MikeHergaarden

    Joined:
    Mar 9, 2008
    Posts:
    1,027
    I just submitted 1.02 to the asset store:

    1.02:
    - New option "Upload patches only". Helps to speed up the publish process.
    - Bugfix for Mac patch application.
    - The patch appliaction will nowonly ignore executable that contain "Patcher" instead of "Patch" when it's looking for your game executable to start. The defautl patcher is called Patcher (.app/.exe).

    Thanks for the feedback so far :).
     
  19. Varnae

    Varnae

    Joined:
    Aug 16, 2010
    Posts:
    3
    @HarvesteR : I recently modified the patcher to include external files that are kept in a specified folder. Unfortunately, this path is currently hard coded, but I could message you on how to do it if you wanted. It's a really easy modification.
     
  20. aLeXmOrA16

    aLeXmOrA16

    Joined:
    Jan 24, 2011
    Posts:
    25
    Hi,

    I'm having troubles with applying the patch to the game.

    I configured the server and Editor as it should be. It builds the patch and uploads it fine and when I update the game, it starts downloading. But at some point, the most of the times at 87%, the download stops, Patcher application closes and the game opens. This makes you think that the game has been updated, but surprise! It hasn't!

    Although the patchsettings.txt was overwritten, the game did not update. I'm using the Demo that the M2HPatcher has.

    Any help would be appreciated!

    Thanks
     
  21. MikeHergaarden

    MikeHergaarden

    Joined:
    Mar 9, 2008
    Posts:
    1,027
    I will be adding more error checking this week. Furthermore I have received reports of a few issues which will be addressed as well (such as updating multiple versions at once).
     
  22. Deleted User

    Deleted User

    Guest

    I am interested in finding a patching solution for my webplayer game. I am unclear if your product does this. In the docs it says

    If this only creates patches for standalone builds, what does it do with webplayers?

    Basically, I am looking for a solution so I can automatically update instances of my game on game portals around the web (Kongregate, Wooglie :D, etc.). Is this a possible use of your product, or is there a better way to do this? MochiMedia has a "Live Updates" feature for Flash that is similar to what I am looking for.

    Thanks,
    Shawn
     
  23. MikeHergaarden

    MikeHergaarden

    Joined:
    Mar 9, 2008
    Posts:
    1,027
    Webplayer is only supported in the sense that when you press publish that it'll automatically also build the webplayer for you, no special actions are performed. This will only save you the hassles of manually building webplayer etc.

    I used this a lot in Cubelands: I clicked publish, got a drink, and when I returned the game would be build updated (for mac+win standalone and webplayer). However, this game was hosted on our own website. There is no Kongregate integration or so.
     
  24. Samssonart

    Samssonart

    Joined:
    Dec 14, 2011
    Posts:
    25
    Did you get the chance to check it, I too am having this problem, I see the download step, at some point it stops and reloads the game, patchsettings.txt gets updated, but the game itself don't, upon restart it says it need updating again. When will this update/fix be released?
     
  25. Samssonart

    Samssonart

    Joined:
    Dec 14, 2011
    Posts:
    25
    Nevermind, we got it working, but there is now one more issue. Some antivirus software won't let games update claiming a trojan attack, for example avast!, disabling the antivirus solves the problem, but that's not a pretty solution for end-users, has anyone had issues with this? How could this be solved?
     
  26. jsipich

    jsipich

    Joined:
    Feb 3, 2012
    Posts:
    87
    I have several games which trigger false positives donwloaded directly from Steam. It is not an issue of the game or patcher - rather the sensitivity of the antivirus delivering false positives. Its the main reason I moved away from AVG - it thought some of my C++ apps I wrote were viruses, lol. Avast is known for fewer positives but still happens. Avira is also an amazing AV program - sadly no virus program is perfect. It is better to have a false positive than an ignored virus - however - it can scare clients for sure.
     
  27. HarvesteR

    HarvesteR

    Joined:
    May 22, 2009
    Posts:
    531
    Hi,

    I've got a question here, regarding multiple patches. We've purchased M2H already, and I've noticed that for each publish, M2H creates a patch from the previous version to the next one.

    So, suppose I release an update of my game now (v0), and later release five patches for it.

    If the users are regulars, they will probably come across one patch at a time, and the game will update itself normally (as in v1 to v2, then v2 to v3, and so on).

    But what would happen if less dedicated players, who fell behind on the updates, now find that there is a v5 up, and they're still on v0? Will the patcher apply each one in sequence? Or do we have to create patches for each previous version up to the new one?

    We've ran a test here with three builds up, and local copies on the earliest versions. The patcher detected a more recent version, but only updated towards the next one (which wasn't the latest). Then, as the game restarted, it again detected there was a more recent version, and the process started again.

    My question then is, is there a way to have the patcher download and apply several incremental patches at once? Because the other alternatives are, well, not very good... Either we keep a factorial amount of patches in the server, which can quickly become unfeasible, or require players to download patches one by one, restarting the game at every step, which is not something we want to put players through.

    I'm hoping there is already an option to do this, and that we just haven't found it yet.

    If not, the second best option would be to re-download the entire thing if an incremental patch can't be found, but the patcher would need to be able to detect that.

    Thanks in advance,

    Cheers
     
  28. metalouis

    metalouis

    Joined:
    Sep 28, 2011
    Posts:
    12
    @HarvesteR There is an option, under the M2HPatcher settings to create a custom patch: this allows you to create patches between specified version numbers. So in your example, you could create one that went from v0 to v5.

    You can also set what web-page the user is directed to when no patch exists. There you could direct them to download a new version of the game.

    @Leepo Great plug-in! But I'm having a problem at the moment: the patcher is giving me an error when I'm testing. After attempting to download the latest patch, it's reporting:

    Could you please advise me as to what's going wrong? There's plenty of disk space on my local machine and on the ftp server. The patch is unchanged from what the patcher created. I've tried rebuilding everything, but the result is always the same. Any help would be much appreciated!
     
  29. MikeHergaarden

    MikeHergaarden

    Joined:
    Mar 9, 2008
    Posts:
    1,027
    I have found some problems where it would incorrectly serve the wrong patch file to end users (which would mess up their game).
    Furthermore there was also an issue with users that needed to patch multiple versions: after applying the first patch it would set the users version to the latest version while having applied only the first patch (e.g. version 2 would patch to 3 if 5 would be the latest, but set it's version to 5. Atfer the fix it will correctly use the shortest route to 5, e.g: 2 -> 3 -> 4 -> 5).

    I'm doing some more tests and will then submit this update to the asset store in a few hours. I advice everyone to update when it is available.
     
  30. MikeHergaarden

    MikeHergaarden

    Joined:
    Mar 9, 2008
    Posts:
    1,027
    I just had this error myself too. In my case the download link was invalid. With this new fix it will first check the download before trying to unzip it.
     
  31. metalouis

    metalouis

    Joined:
    Sep 28, 2011
    Posts:
    12
    Thanks Mike, excellent support.
     
  32. Charabis

    Charabis

    Joined:
    Nov 5, 2009
    Posts:
    203
    How does the patcher get along with Unity 3.5? I'm hoping well as our current build is up to 3GB of data. Needless to say, download times every release is the biggest complaint we're getting :p
     
  33. MikeHergaarden

    MikeHergaarden

    Joined:
    Mar 9, 2008
    Posts:
    1,027
    It works just fine in 3.4 or 3.5. I'm not aware of any issues.


    1.03 has been submitted and should be live Monday/Thuesday. The release notes have been added to the first post here.

    Improvements to address the last few forum posts:
    I urge everyone to update their webserver and patch clients. Do not forget to remove the old patch clients fromyour builds/ folder (the patch client builds are "cached" there). You can also run a manual rebuild of the patch clients via the editor tool.

    I hope this addresses all issues that have been highlighted in the last few posts here. Please give 1.03 a spin when it's available and let me know if any problems persist!
     
    Last edited: Mar 4, 2012
  34. charmandermon

    charmandermon

    Joined:
    Dec 4, 2011
    Posts:
    352
    Im definitely interested in purchasing this asset, has anyone tested this on iOS yet? I don't care if apple's policies allow it, im just curious if someone has succeeded on a development build.

    I've been working on developing my own custom server based delta update system system with unity on iOS until I found this tool. Also is the source Code available?

    Thanks, Looks like great work so far!!
     
  35. MikeHergaarden

    MikeHergaarden

    Joined:
    Mar 9, 2008
    Posts:
    1,027
    It will not work on iOS right away as its using a second Unity application to update the main application. I'm not sure if it makes sense to get it working on iOS like this.

    Apple will indeed block all Mac/iOS apps that have an update functionality.
    This project comes with full source code. The source code for the patch/diff applications is not bundled but is available online.
     
  36. DiegoGR

    DiegoGR

    Joined:
    Mar 5, 2012
    Posts:
    2
    I have the same problem, how did you solved it please?

    Also the patches always have the same size: 215 bytes... what am i doing wrong? I am working with M2HPatcher 1.03 and Unity Pro 3.4.2 :-(

    Thanks in advance
     
  37. MikeHergaarden

    MikeHergaarden

    Joined:
    Mar 9, 2008
    Posts:
    1,027
    Weird, the patches should be sized differently if you made quite some changes.
    You can open the (.m2hpatch) patchfiles with Winrar/winzip and check the contents of the patch. The root folder has a text file that details what happens in this patch.

    Possibly the editor doesn't properly detect the output of the buildscript at the time of making a patch. However 1.03 should've addresses issues like this (it wont try to create patches if a build failed).

    Is this on Windows or Mac?
    What if you try a clean new project?
     
  38. DiegoGR

    DiegoGR

    Joined:
    Mar 5, 2012
    Posts:
    2
    Yeah, it's weird, all my patches opened with WinRar have a file called "PATCHDATA.M2H" with the text: "EDocumentation.txt" inside, nothing else. The output_log.txt in the root folder doesn't have any execution errors or something wrong...

    The builds are always generated correctly and the version check too...

    Only i've tried on Windows from a clean new project.

    Thanks for the reply.
     
  39. metalouis

    metalouis

    Joined:
    Sep 28, 2011
    Posts:
    12
    The 1.03 update solved my previous issue, and all runs and patches perfectly with a clean build using the demo scene.

    But I'm having a similar problem to DiegoGR: the patcher downloads the update, increments the stored value in patchsettings.txt, but doesn't show the changes when I run the exe. The patches I'm seeing will vary depending on the amount of changes I make (approx 6 - 8KB). The files in the project data folder don't get updated, though there are loads listed in the PATCHDATA.M2H

    Any ideas?
     
  40. Charabis

    Charabis

    Joined:
    Nov 5, 2009
    Posts:
    203
    Hey, I just purchased 1.03 through the asset store and it downloaded fine. However, the following error is showing up in the console window:

    Anyone encountered this before?

    I'm using 3.5.0f1, and Unity itself is saying there's nothing new to patch to. This is Unity Pro licensed with the IPhone and Android licensing as well.
     
    Last edited: Mar 7, 2012
  41. Charabis

    Charabis

    Joined:
    Nov 5, 2009
    Posts:
    203
    Odd. I created a new project and dropped this into it. No more errors. Apparently that only occurs if you try to add it to an existing project, although I'm still not sure as to why.

    Interestingly, I now get this ever-so-informative error when running the test scene sent with the installation:

    I'm assuming I have the permissions wrong on something, but I'm not 100% where to find the file "Unknown" ;)

    Solved: For the record, if you get this weird error or similar, check your php scripts on the server. Mine had somehow got set to 770 instead of 644.

    As I was going through I also noticed that the results of trying to open the file are never checked. It should never be assumed that any such operation worked, as they have a tendency to fail at the oddest times :)
     
    Last edited: Mar 7, 2012
  42. MikeHergaarden

    MikeHergaarden

    Joined:
    Mar 9, 2008
    Posts:
    1,027
    Charabis: Great thanks, I've added some more error messages on the web side to clarify such CHMOD issues (update 1.04)
    Furthermore 3.5 had problems with the obselete build targets for OSX (Universal and PPC). These have been removed in 1.04 as otherwise it would refuse to build.

    Weird, the files and patch list looks healthy then. So changes are applied correctly for when you build(and change) the demo scene? It only acts up in your real product?
    Are you on Win/OSX? What Unity version?
     
  43. metalouis

    metalouis

    Joined:
    Sep 28, 2011
    Posts:
    12
    Yep, the demo scene is working fine, though I've only tried small changes (textures, adding and moving objects etc): it's just the large project I'm working on at the moment that doesn't get updated when patched (when making small or large changes).

    Using all the same steps to set up in both instances, and I can't see any errors in the patcher's output log, so I'm stumped! I'm on Windows 7 (x64), Unity Pro 3.4.2f2.

    Will update to 1.04 but if you have any suggestions of things I can try it would be much appreciated!
     
  44. MikeHergaarden

    MikeHergaarden

    Joined:
    Mar 9, 2008
    Posts:
    1,027
    Thanks, that -should- all be fine....
    I'll have to run some tests on bigger projects. Must be some timing issue somewhere(?).
     
  45. Charabis

    Charabis

    Joined:
    Nov 5, 2009
    Posts:
    203
    I'm hitting a new issue as I go through where the patcher doesn't actually seem to be able to get at the patches. It gets to stage 2, stops for a moment, and then announces it couldn't update. Unfortunately it doesn't say why.

    I suspect it's a setup issue as both the zip files and patches are being dropped into the same directory where the PHP scripts are. The one other thing I've noticed is that the file permissions have to be changed when uploaded as the global read permissions are not set, thus keeping the zip files from being downloaded.
     
  46. Charabis

    Charabis

    Joined:
    Nov 5, 2009
    Posts:
    203
    Never mind. I got that squared away as I had a folder set wrong it seems. However, I'm now experiencing the same problem mentioned above where it goes through the update process, but doesn't seem to change anything. I'm using the demo scene which is why this is really odd to me.

    It doesn't seem to update the version number either as it keeps reporting itself as being a version behind in the main program with the original appearance before the change. However clicking for it to update results in it launching the patcher but not even attempting to patch as evidenced by the progress bar never moving. I'm rather stumped as to what would be causing this as it seems like it's trying to go through the steps, but isn't getting something right. Unity 3.5 on Windows 7. I need to test against the Mac one still
     
  47. MikeHergaarden

    MikeHergaarden

    Joined:
    Mar 9, 2008
    Posts:
    1,027
    Thanks to the help of Charabis and David, I've found this last known issue and submitted a fix as 1.05.
    1.05 is fully compatible with previous versions, just make sure to force an update of your patch clients.

    The update should usually be live on the asset store within 24 hours.
     
  48. metalouis

    metalouis

    Joined:
    Sep 28, 2011
    Posts:
    12
    @Leepo I'm afraid the latest version (1.05) isn't working for me: even just doing a very basic test with the demo scene in a new project won't update on patching. The PATCHDATA.M2H file enclosed in the patch only contains the text "EDocumentation.txt". All the automatic FTP uploading and downloading seems to work perfectly... any idea what I could be doing wrong?? I've tested on two different machines, both Win 7, Unity 3.4 but it's the same result each time.
     
  49. MikeHergaarden

    MikeHergaarden

    Joined:
    Mar 9, 2008
    Posts:
    1,027
    The 1.05 update on the asset store somehow was the 1.04 version. I have reuploaded the package as 1.06 which now contains the 1.05 fixes.

    Do not forget to rebuild(/delete) the patch clients so that the fixes will be applied.
     
  50. by0log1c

    by0log1c

    Joined:
    Jan 30, 2011
    Posts:
    40
    Hey there M2H Team,

    long story short, the studio where I work now has a soon-to-be-released game and the publisher want us to have a patching system. I took a look at how it work and my boss insisted we get it rolling fast so we bought the M2H patcher solution a week ago.

    I initially had a little difficulty with the 'broken' 1.05 release but 1.06 fixed it and the demo project works great but I'm having problem setting it up in our main project. The normal workflow won't work and my work-around is causing me an issue, I'm hoping you'll be able to point me in the right direction. Our project is 40gb, our built project is 2gb and includes a few files as big as 700mb.

    My past problems:
    -If I publish a patch, the Unity Editor crash with OutOfMemoryException, I guess bsdiff'ing choke on the 700mb file.
    -If the patcher project was in my main project, my ProjectSettings are now ruined, I need to re-set them manually. I fixed the problem by moving the patcher to a second project and I just copy the patcher folder in my main project.
    -I can open Unity again, build a patch, upload it and increase version number manually and it seems to work.
    -I open built project, try to launch patcher, crash with Cannot change Screen Resolution error, fixed the problem by tweaking the main project to launch a .NET application that wait for the main project to close then launch the patcher.

    My current problem:
    -I can finally get to build the project, build a patch, upload it, and the main project knows when it need a patch, download it and apply it correctly.
    -After an update from let's say v1 -> v2, when the main project restart, the update are applied but it still sees itself as v1 and propose to update over and over again. The patchsettings.txt file correctly says v2.
    -Tried to fix by increasing the version number BEFORE building a patch, thinking the new build would have v2 embedded in its data. Now the version checking doesn't even occur anymore.
    -Tried to use Build Standalone to see if I could get it to work. Without the patcher project, it results in a weird, mixed-up project of both the Patcher and Main project combined in one mess.

    My current workflow:
    -Build .NET application to launch patcher. Copy in patcher project.
    -Build patcher in a separate project. Copy patchers in the main project build folder.
    -Set local and online version to 1.
    -Build project for the first time. Local version auto-increase to 2.
    -Build project. Crash on patch creation.
    -Manually create patch from v1 to v2. Upload it.
    -Set online version to 2 and local version to 3.

    -Start project, update are required.
    -Launch .NET application, close main project, launch patcher, close .NET application.
    -Update and launch main project again.
    -Changes are applied, no doubt this is v2, yet the game sees itself as v1 and launch another update, again and again...:confused:

    I'm stuck, my next idea is to do the version checking myself but it feels like I've had too much tweaking to do already. So that's about it, I'd appreciate any hint in the right direction. Sorry for the huge post, I tried to be clear and concise but I'm not too good at it. ;)

    TL;DR:
    My project version do not update, even if the project itself does.

    Thanks!
     
    Last edited: Apr 4, 2012