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

PATCH - Updating System

Discussion in 'Assets and Asset Store' started by ManHunterITA, Jul 20, 2015.

  1. mr_okk

    mr_okk

    Joined:
    Feb 13, 2014
    Posts:
    2
    Hello!
    Did you have problems with "Access to the path <app_data_path> is denied."?

    It worked fine on unity 5.3.7, but then I update unity to 2017.1.2. This update break something.
     
    ManHunterITA likes this.
  2. SSL7

    SSL7

    Joined:
    Mar 23, 2016
    Posts:
    347
    Do we have an ETA on the update, please?
     
    ManHunterITA likes this.
  3. ManHunterITA

    ManHunterITA

    Joined:
    Sep 3, 2013
    Posts:
    341
    Hi,

    I haven't planned any ETA currently, I am just working on it until it is production ready and I am satisfied of it! I want it to be perfect, since it has really new shining features.

    Currently, I am improving the workflow, coding the Launcher custom inspector and listening for feedback from customers.
    I am also opened to new ideas, if anyone of you has some specific needs.
     
  4. EddieChristian

    EddieChristian

    Joined:
    Oct 9, 2012
    Posts:
    725
    Assets/MHLab/PATCH/Source/PatchBuilder/Editor/PatchBuilderWindow.cs(1149,30): error CS0619: `UnityEditor.BuildTarget.WebPlayer' is obsolete: `WebPlayer has been removed in 5.4'

    Just got this error when I imported into a blank project
     
    ManHunterITA likes this.
  5. ManHunterITA

    ManHunterITA

    Joined:
    Sep 3, 2013
    Posts:
    341
    Yep, I am aware of it.
    Just comment it out, it has been removed in next update.
     
  6. Thorgalson

    Thorgalson

    Joined:
    Mar 9, 2017
    Posts:
    8
    Hello All,

    I'm trying to get my build version after downloading it, but GetCurrentVersion in LauncherManager always return null for me. Is it the right way to do it? Right now I have 4 builds (and 3 patches). Any ideas?

    Thank you
     
  7. builtbyeric

    builtbyeric

    Joined:
    Oct 23, 2017
    Posts:
    6
    The way the launcher is set up doesn't quite fit my use case. I have a WiX installer for the launcher that is distributed to users, which then goes through the normal UAC install into Program Files, has an uninstaller, etc. Then the launcher is responsible for silently downloading and installing the main app, but it should install into the user's AppData/Local directory to avoid UAC. The way things are set up, it's designed to either install into the same directory as where I placed my launcher (in Program Files) or into a different directory, but also in Program Files. I got around this by using a relative path in "Program Files Directory to Install" that steps out of Program Files before specifying the correct path, and hopefully this doesn't have any side effects, but it would be nice to have this supported directly.
     
    Fured likes this.
  8. ManHunterITA

    ManHunterITA

    Joined:
    Sep 3, 2013
    Posts:
    341
    Hi, if GetCurrentVersion returns null, it means that no version has been found.
    Do you have a version file near to your executable?

    That's a nice suggestion.
    By the way, in next release all settings can be dinamically overwritten and they will affect other options too.
    Example: if you change the SettingsManager.AppPath (who represents the workspace folder for the Launcher, usually set to the same folder of the executable), this change will influence other settings too, with no needs to change them manually.
    I am also working on a new configuration methodology (basically, dropping the Launcher GameObject configuration and standardizing configuration steps and formats), it allows you to deeply change each public exposed setting and add your own:
     
  9. optimise

    optimise

    Joined:
    Jan 22, 2014
    Posts:
    2,114
    Hi @ManHunterITA.
    1) Does it supports mobile build patching i.e. Android and IOS?

    2) Does it supports asset bundle patching for Android and IOS too? I have the workflow that needs to build asset bundle and player downloads the asset bundle from server then the asset bundle will install at Application.persistentDataPath.

    3) Does it support mobile build patching with build with il2cpp?

    4) Does it currently supports latest Unity 2017.2 and upcoming Unity 2017.3?
     
    Last edited: Nov 15, 2017
  10. Thorgalson

    Thorgalson

    Joined:
    Mar 9, 2017
    Posts:
    8


    Yes ! have a version file and patching seems successful (see version.png) and version file is not empty. In my patching app, its a tray application that create/kill/reuse your form on preset intervals, I close/kill the form when the patching is done. Maybe I do this too early. When would be the best moment to know that all the patching process is completed? I do this:

    private void Form1_Shown(object sender, EventArgs e)
    {
    StartWork();
    }

    private void StartWork()
    {
    var bw = new BackgroundWorker();

    bw.DoWork += (sender, args) => {
    CheckForUpdates();
    };

    bw.RunWorkerCompleted += (sender, args) => {
    if (args.Error != null)
    MessageBox.Show(args.Error.ToString());

    if (m_context != null)
    m_context.PatcherIsDoneUpdating();

    string version = m_launcher.GetCurrentVersion();
    Settings.Default.CurrentVersion = version;
    Settings.Default.Save();

    this.Hide();
    };

    bw.RunWorkerAsync();

    CheckForUpdates() is your unchanged method for patching in provided source code. So when worker thread is done, I just hide the form.

    Thanks for your support
     

    Attached Files:

    ManHunterITA likes this.
  11. Thorgalson

    Thorgalson

    Joined:
    Mar 9, 2017
    Posts:
    8
    Ok, so error come from my misunderstanding of the INSTALL_IN_LOCAL_PATH flag. It was looking for the version file into my patcher project bin/debug folder instead of looking in my PROGRAM_FILES_DIRECTORY_TO_INSTALL. Will fix it on my end.

    Thank you!
     
    ManHunterITA likes this.
  12. ManHunterITA

    ManHunterITA

    Joined:
    Sep 3, 2013
    Posts:
    341
    Hi,

    P.A.T.C.H. does not support Android and iOS.
    It supports Unity 2017.x, but requires a little fix: just comment out the line about Web Player, since it has been deprecated.

    I will try to work on Android and iOS (plus consoles like Playstation and Xbox) integration at the beginning of next year (hopefully).
     
    Gekigengar likes this.
  13. optimise

    optimise

    Joined:
    Jan 22, 2014
    Posts:
    2,114
    I see. Currently I need it at least can support asset bundle binary delta patching at the moment for Android and iOS. Does it possible?
     
  14. SSL7

    SSL7

    Joined:
    Mar 23, 2016
    Posts:
    347
    Guys, don't want to be the bad guy or advertise something else, but at last I was able to achieve what I needed with SteamWorks, Steams official platform. You pay 100$ that you ll already pay to release your game anyway and you have binary updates and steam keys to do alpha-beta etc.

    So if you plan to release it o steam, this solution is a no brainer until at least P.A.T.C.H is updated which is taking a while.

    Again, just wanted to help people like me that need a solution to push their game before and after release, with regular updates.
     
  15. ManHunterITA

    ManHunterITA

    Joined:
    Sep 3, 2013
    Posts:
    341
    I will know if it is possible when I start to work on it! :D
    Currently, I have strict rules about what the next update will be composed by, and support for Android and iOS isn't on the list. It will be implemented - if possible - in the first quarter of 2018 (hopefully), with other platforms too.

    Well, of course there are a lot of updating solutions out of here. Like everything in this business, also P.A.T.C.H. has its own competitors. That's a real luck for the customer, who can choose what they prefer and what exactly fits their needs! :)

    Based on feedback I received from customers, I am trying to release the best solution I can.
     
    Last edited: Nov 17, 2017
  16. builtbyeric

    builtbyeric

    Joined:
    Oct 23, 2017
    Posts:
    6
    For what it's worth, I didn't see any way to automatically launch the app once the launcher was finished so I rolled my own. To get it to work smoothly I had to make a small modification to UnityThreadHelper, which had dangling threads I had no way of knowing about:

    Code (CSharp):
    1.     public static int Count() {
    2.         lock (syncRoot)
    3.         {
    4.             if ((object)instance == null) return 0;
    5.             return instance.registeredThreads.Count;
    6.         }
    7.     }
    8.  
    If the new version includes that functionality natively or at least doesn't mess me up that'd be very nice.
     
    ManHunterITA likes this.
  17. ManHunterITA

    ManHunterITA

    Joined:
    Sep 3, 2013
    Posts:
    341
    Isn't OnTaskCompleted useful for this purpose?

    ________________________________________

    Meanwhile, I am working on some improvements for the new version. I am trying to standardize file formats for settings, configurations, indexes, etc.
    I am also trying to unify the configuration process between different Launcher types.
    Also, I am trying to listen to all feedback I received: I implemented something that an user asked for some time ago (about special folders). You can now choose the special folder your want to target:

    As you can see, the configuration process is now more simple and dynamic: if you disable something, all related settings will be disabled too. Plus, each setting has now a little comment to explain rapidly what it does: a more in depth description will be added to the documentation. This should offer a better user experience, I hope.

    Other improvements I am planning to do are:
    • I want to rewrite the downloader to allow downloading of chunks of data. This should allow me to compress builds with LZMA and - together with indexes standardization and builds optimization - save builds size up to 99%. A little explanation: Unity packages are already compressed, so compress them again as little-to-no advantages.
    • I want to rewrite Launcher's services to add multithreading computation. It can speed up the patches application process. It should have no effects on installer, since it involves the downloading of files.
    Another interesting feature is the Debug Report generation. Multiple times - in various support requests - I had to ask for settings and configuration values.
    Now I introduced this:

    That button generates a report who includes all relevant information I need to identify a misconfiguration. It is stored in the same folder of your logs and it doesn't include credentials and encryption keys, of course.
    It is valid for Admin Tool and for Launcher too (this means you can also monitor Debug Reports of your users if something bad happens).
     
    Last edited: Nov 25, 2017
  18. Abelius

    Abelius

    Joined:
    Nov 11, 2016
    Posts:
    37
    Been looking for a comparison table between normal and full versions for like... ten minutes now. o_O
     
  19. ManHunterITA

    ManHunterITA

    Joined:
    Sep 3, 2013
    Posts:
    341
    There is just a single difference: FULL version contains the whole source code, the normal version has just the source code for Launcher's frontend customization! :D
     
  20. ShizumaruRiya

    ShizumaruRiya

    Joined:
    Jan 5, 2014
    Posts:
    17
    Hi,
    If I purchase the P.A.T.C.H. currently.
    When v3.0 released, Would I need to paid a upgrade fee for it?
    Or is it a free upgrade?
    Thank you.
     
    ManHunterITA likes this.
  21. ManHunterITA

    ManHunterITA

    Joined:
    Sep 3, 2013
    Posts:
    341
    Hi,
    currently the 3.0.0 will be simply an update for the current package on the store, so no additional fees are planned for current owners.
     
    clobo likes this.
  22. Aeregon

    Aeregon

    Joined:
    Sep 2, 2014
    Posts:
    1
    Hi,
    I am very interested in your product. I have one question. Is it possible that you can include a custom protocol with arguments with the installer? I want to Launch a launcher through a link on my websites. something like myAppName:username?myUsername. at the moment I have to ask my customers to run a .reg file seperately to register a protocol.

    If I get the option to run a seperate .reg file or anything like that, that is also fine.
     
    Last edited: Dec 5, 2017
    ManHunterITA likes this.
  23. Adrian_LM

    Adrian_LM

    Joined:
    Aug 1, 2017
    Posts:
    5
    Hi,

    For patching of the patcher itself, some patches will have this error: PATCH_data/globalgamemanager is corrupted, restored previous version.

    Is there a way to request user to restart the application after there is a new patch for the patcher?

    Thanks alot
     
    ManHunterITA likes this.
  24. ManHunterITA

    ManHunterITA

    Joined:
    Sep 3, 2013
    Posts:
    341
    I guess you're referring to embedded patcher. If so, there are no ways currently to establish if the patch requires the restarting or not.
    In next release I added an event to request a restart.
     
  25. ManHunterITA

    ManHunterITA

    Joined:
    Sep 3, 2013
    Posts:
    341
    Hi,

    I am still working on 3.0.0 release! We are doing really well, guys on Discord channel are supporting me with advices and new ideas. Soon™ I will start the beta test of this new version.
    We also created a TODO list: https://docs.google.com/document/d/1tf4ITPzt_c3F_DyTSEOklxX-RNzdHBgkM9M4lGq0cKQ/edit?usp=sharing
    Discord channel: https://discord.gg/0ndGBjvogdY5SnIw

    I invite you to add suggestions in this document or join us in chat!

    Said that, let's list down main changes!
    • New downloader: it allows chunks downloading now, so it can resume interrupted downloads or just downloads a part of a file (useful for compressed builds)
    • Multithreaded Installer/repairer: now they can have two downloader threads. The first one downloads files starting from the largest one, the second one downloads files starting from the smallest one. In the best case the installation time will be equal to the biggest file's download time. Not bad!
    • File size check: when installer or repairer check for files integrity, now they will first compare file's size with the expected one. This can save some time on hash calculating.
    • File formats standardization: now all files (version, indexes, settings, etc) are stored as JSON. Also, there are no more extensionless files. Encrypted files have .data as extension, text files have .txt or .json as extension.
    • In-Editor tutorial: now a tutorial will be displayed first time you open the Admin Tool, it is a quick explanation of what you can do with this software. It is of course replayable! Disclaimer: it doesn't replace the main documentation, but atleast we will avoid situations where the user didn't even read the manual! :)
    • Launcher deployment: now Launcher has a standalone service to update itself. Both on Admin Tool and client side. It has its own file indexer and automatically generates a zip archive with your Launcher.
    • Test menu: now a new menu has been added in Editor. It contains the "Run test launcher" button: it allows you to create a "test" folder where your deployed Launcher will be placed and ran automatically.

     
  26. musoufan91

    musoufan91

    Joined:
    Nov 27, 2012
    Posts:
    8
    I am sure your sick of hearing this but what is the timeline looking for version3? I have a new project that I want to use this but deadlines are this month. I used the older version before and worked fine but the new features do look good.
     
  27. ManHunterITA

    ManHunterITA

    Joined:
    Sep 3, 2013
    Posts:
    341
    I am currently rushing it (in a way that quality will not be affected, because this is my first concern), but I have no precise ETA.
    I have the roadmap publicly available, by the way. You can take a look to it to have an idea; and also you can add your own requests.


    This is what I am working on currently:

    The old FTP Uploader has been replaced by the new Synchronizer. This time it supports SFTP and FTP, it has a various tools to upload builds (yeah, multiple builds uploading is supported), patches, Launcher and configuration.
     
    blitzvb likes this.
  28. musoufan91

    musoufan91

    Joined:
    Nov 27, 2012
    Posts:
    8
    So I came across a bug where the patcher is trying to deleting the output.log.txt file which unity still has open and the patch fails, this is only in integrated mode.

    I changed my patching structure to have, when I build a patch, a blank txt file. So that there would be no changes when making and executing patches.
     
    Last edited: Mar 1, 2018
    ManHunterITA likes this.
  29. ManHunterITA

    ManHunterITA

    Joined:
    Sep 3, 2013
    Posts:
    341
    Yeah, this side effect makes your patcher to stuck on applying patches. This because Unity Player takes ownership over that file, so it cannot be edited.
    The workaround is simple: just do not include output_log.txt file in your builds :D

    In the next release I added an ignore list for files to skip, something like a .gitignore file.
     
    hopeful likes this.
  30. BerengerVolumiq

    BerengerVolumiq

    Joined:
    Feb 6, 2017
    Posts:
    14
    Hi @ManHunterITA,

    I have a problem with the command line tool. When I use the editor window to build and patch, everything is OK, but the launcher with files generated by the command line tool, I get a "failed to load mono" error and it stops.

    Everything (launcher and build) targets windows standalone 32bits. Api compatibility is .Net2.0 Subset on build and .Net 2.0 on launcher (same project I use for the editor window).

    Any idea ?
     
    ManHunterITA likes this.
  31. ManHunterITA

    ManHunterITA

    Joined:
    Sep 3, 2013
    Posts:
    341
    That's extremely weird. Any log from your Unity Player?
     
  32. BerengerVolumiq

    BerengerVolumiq

    Joined:
    Feb 6, 2017
    Posts:
    14
    I figured it out. It has nothing to do with your solution. I'm using a .bat file to sign the exe, copy everything into the patch folder and start the build / patch process.
    Unfortunately, I'm not familiar with windows command lines and I used "copy" instead of "xcopy" to copy the _Data folder, which doesn't work very well. Every subfolders were empty !

    My bad :)
     
    hopeful and ManHunterITA like this.
  33. MostHated

    MostHated

    Joined:
    Nov 29, 2015
    Posts:
    1,235
    Has anyone made a headless server version of the patcher? I tried to even go as far as getting something called WINSSH FS which maps an ssh connection as a local drive, but unfortunately they didn't work. My server has no UI, so of course neither does the Unity server instance, so I cant patch it and its 2gb. If anyone has came up with anyway to be able to patch a server, please do let me know!
     
  34. Jayme65

    Jayme65

    Joined:
    Dec 11, 2016
    Posts:
    94
    Does the fact that now the player executable is split in two (https://unity3d.com/fr/unity/beta/unity2017.2.0b7) will prevent P.A.T.C.H. to work correctly?
     
    ManHunterITA likes this.
  35. ManHunterITA

    ManHunterITA

    Joined:
    Sep 3, 2013
    Posts:
    341
  36. gecko

    gecko

    Joined:
    Aug 10, 2006
    Posts:
    2,240
    Any ETA on v3?
     
  37. ManHunterITA

    ManHunterITA

    Joined:
    Sep 3, 2013
    Posts:
    341
    No, but I started beta testing on our Discord channel! :)
     
  38. JuanMaldonado

    JuanMaldonado

    Joined:
    Oct 12, 2012
    Posts:
    30
    Hi there,
    Is there a way to abort or cancel the patch update in progress and continue with the current installed version?
     
    ManHunterITA likes this.
  39. BerengerVolumiq

    BerengerVolumiq

    Joined:
    Feb 6, 2017
    Posts:
    14
    Hello,
    Are you using the new UnityWebRequest API to make the web calls, or the old WWW class ? We are having problems with proxies, and we know that the WWW class is a cause of that.
     
  40. ManHunterITA

    ManHunterITA

    Joined:
    Sep 3, 2013
    Posts:
    341
    Well, you should abort the updating thread and run the Rollback feature. But this is not something you can do without modifying the core.
     
  41. pan-master

    pan-master

    Joined:
    Nov 11, 2013
    Posts:
    127
    WebPlayer has been removed in 5.4'<-- I commented it out but still ...


    " Something goes wrong during new version bulding init"
     
    Last edited: Apr 1, 2018
  42. ManHunterITA

    ManHunterITA

    Joined:
    Sep 3, 2013
    Posts:
    341
    Yeah, WebPlayer has been removed so you just have to comment it out.

    About that error: from the top of my head, there are only two possible errors. You have not enough free space on the disk or you have not enough privileges to write into that folder.
     
  43. pan-master

    pan-master

    Joined:
    Nov 11, 2013
    Posts:
    127
    upload_2018-4-2_18-13-59.png

    I am able ubload builds and patches, using (ftp.) instead of (ftp://) to server with versions.txt, however when I launch the game, I get "cant find remote versions list"
    the patcher is integreated inbuild. I tired to use on Launcher script (ftp://) but still it cant see txt file
     
  44. ManHunterITA

    ManHunterITA

    Joined:
    Sep 3, 2013
    Posts:
    341
    Hi,

    you should specify the protocol in your Launcher component. Adding "ftp://" is required.
     
  45. Jayme65

    Jayme65

    Joined:
    Dec 11, 2016
    Posts:
    94
    One question before buying if you don't mind (I've already read the PDF on your site but need to clear out some points):
    - Will I have to upload new builds (and patches) on new versions of my game or may I upload only the first build version and let P.A.T.C.H apply all patches in cascade?
    Let's say that I'm starting with v1.0, followed by 1.1, 1.2 and 2.0.
    Will I have to upload 1.1, 1.2, 2.0 builds...or only 1.1, 1.2 PATCH and maybe 2.0 BUILD if it is a major update? (or could I upload only patches even if there is a major update)
    Hope I'm clear ;)
    Thanks
     
  46. ManHunterITA

    ManHunterITA

    Joined:
    Sep 3, 2013
    Posts:
    341
    This is basically up to you.
    You can live just with the first build and all patches.
    But uploading builds is useful for repairing purposes: if your user owns the 1.1 and he corrupts a file, the patcher service cannot apply the patch. The repairer will not find the remote build, so the local game will remain corrupted. A "force repair" is required in this case: it will reinstall the latest build (the 1.0, in your case).
    After it, all patches will be applied until the last one.
     
  47. pan-master

    pan-master

    Joined:
    Nov 11, 2013
    Posts:
    127
    when the users have version 3 installed and there are allready versions 4,5,6v on the server The patching process breaks, patching goes from 0 to 100% in 1s, even if the downloading process is still being continued , that can not be right, The Patcher works only from one version to another, when there are more then 1 versions to dowload patcher breaks, and lunching the game becomes impossible, how do you think users react when their game stops working after ppatch update hah?????!, this was suposted to be a working plugin, not a hiden bomb

    Additionaly, I dont know why, but on the server there can be multiple "version" files with te same version number
    there should not be 2x version_file3, 2x version_file4, somehow plugin either uploads dobule time the same version file, or it allows to upload same version double time, either way its wrong. I know I'm not the only one experiancing this issue, The worst thing is, you get this plugin to make life easier for the your ussers, but what this plugin does is the oppositive
     
    Last edited: Aug 10, 2018
  48. Jayme65

    Jayme65

    Joined:
    Dec 11, 2016
    Posts:
    94
    That's alarming! @ManHunterITA Is this really the case?
     
  49. AshleyBates

    AshleyBates

    Joined:
    Feb 24, 2017
    Posts:
    34
    Hi,

    Our company has recently acquired patch - we have the requirement that sometimes we need to downgrade users software, or have them exist on a previous version.

    Is it possible to do this in patch or could this be made a feature? So that the user can get a list of patch versions, and then select the version they wish to go to?

    Thank You.
     
  50. ManHunterITA

    ManHunterITA

    Joined:
    Sep 3, 2013
    Posts:
    341
    Currently (and as far as I know) I don't think there is a bug on patching among multiple versions. Atleast, nobody reported me this issue until now (and a lot of people are using this solution successfully) and it worked for me, on my own games.
    I am more concerned about some misconfiguration or some specific edge case that this user is experiencing. I am more than happy solving this case with your help!
    Can you send me more information? Your configuration, your log files (both from Unity Player and from P.A.T.C.H.), your remote URL (so I can inspect your remote end). Also a reproducible case I can debug would be good.

    Also, progress bar problem is already solved for the next release: customers already reported it. It is just a graphical bug, nothing so serious, derived from various changes in the core.

    I am unsure if I correctly understood this, but anyway: for the next release I already solved previously reported issues with FTP uploader (plus I added multiple features and SFTP support too).

    A little thing I just want to point out is that behaving in a rude, destructive, passive-aggressive manner is not the best way to maintain a friendly support environment.
    I am a single developer on this software and I am trying my best to offer you the best experience as possible, both with software and support: please respect this.

    I invite you guys to join our Discord server: here you can take a look at new updates, chat with other customers, request for real time help, testing out beta releases, etc.

    I am sorry the next release is taking so long, but it is a really big release and I want to be sure that everything works well (that's the meaning of the current beta testing).