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

MG Patcher

Discussion in 'Assets and Asset Store' started by mihanocho, Mar 21, 2015.

?

Do you like MGPatcherTools,?

  1. Yes

  2. No

Multiple votes are allowed.
Results are only viewable after voting.
  1. Lionious

    Lionious

    Joined:
    Apr 19, 2013
    Posts:
    51
    just question so if after download filezilla server . and then you put your vps ip address - password - username so how im going to find the " HTTP " if im going use MG Patcher becasue is needed ?
     
  2. mihanocho

    mihanocho

    Joined:
    Mar 10, 2015
    Posts:
    296
    Please drop me a mail. And attach the screenshots.
     
  3. mihanocho

    mihanocho

    Joined:
    Mar 10, 2015
    Posts:
    296
    I don't quite understand what you want. Explain in detail
     
  4. mihanocho

    mihanocho

    Joined:
    Mar 10, 2015
    Posts:
    296
    Oh I get it. To change the HTTP host. Go to global settings. Enable Upload and change the value and disable Upload.
     
  5. Ox_

    Ox_

    Joined:
    Jun 9, 2013
    Posts:
    93
    There's a problem with .app packages for OS X.

    Executable files inside a package get wrong permissions when unarchived after downloading (for the first time, with downloader). I'm getting -rw-r--r-- instead of -rwxr-xr-x. And I can't find a workaround.

    Do you have any ideas? See this thread also.

    UPD: found this - running chmod via System.Diagnostics.Process
     
    Last edited: Jan 18, 2016
  6. J_P_

    J_P_

    Joined:
    Jan 9, 2010
    Posts:
    1,027
    Yeah I had to do something similar for linux builds too
     
  7. mihanocho

    mihanocho

    Joined:
    Mar 10, 2015
    Posts:
    296
    Please write to me in PM Skype. So I can see the process and help you out.
     
  8. Ox_

    Ox_

    Joined:
    Jun 9, 2013
    Posts:
    93
    Thank you, but I solved it using system unzip:

    Code (CSharp):
    1. System.Diagnostics.Process process;
    2.  
    3. void ExtractWithSystem(string archivePath, string pathToExtract)
    4. {
    5. #if UNITY_STANDALONE_OSX || UNITY_EDITOR_OSX
    6.     System.Diagnostics.ProcessStartInfo processInfo = new System.Diagnostics.ProcessStartInfo();
    7.     processInfo.FileName = "/usr/bin/unzip";
    8.     processInfo.Arguments = archivePath + " -d " + pathToExtract;
    9.    
    10.     process = new System.Diagnostics.Process();
    11.     process.StartInfo = processInfo;
    12.     process.Start();
    13. #endif
    14. }
    15.  
    16.  
    17. void Update()
    18. {
    19.     if (process != null && process.HasExited)
    20.     {
    21.         process = null;
    22.        
    23.         // you need to return to main thread, I'm returning from queue in another Update()
    24.         App.InvokeFromQueue(() => {
    25.             _onPatchingFinished.Invoke();
    26.             _PP.ProgressBar(100);
    27.         });
    28.     }
    29. }
     
  9. mihanocho

    mihanocho

    Joined:
    Mar 10, 2015
    Posts:
    296
    Oh thanks a lot!
     
  10. Lethn

    Lethn

    Joined:
    May 18, 2015
    Posts:
    1,583
    Does anyone know why I'd get the following error?

    ArgumentException: The Assembly System.Web is referenced by Microsoft.WindowsAzure.StorageClient ('Assets/MGPatcherTools/Plugins/Microsoft.WindowsAzure.StorageClient.dll'). But the dll is not allowed to be included or could not be found.
    UnityEditor.AssemblyHelper.AddReferencedAssembliesRecurse (System.String assemblyPath, System.Collections.Generic.List`1 alreadyFoundAssemblies, System.String[] allAssemblyPaths, System.String[] foldersToSearch,

    To me it first looked like a simple case of disabling read only which is what I did on all the files, however it still pops up the error message as if I haven't, I have not enabled the isAzure boolean in any way so I don't know why I'd be even having this error in the first place.
     
  11. Ox_

    Ox_

    Joined:
    Jun 9, 2013
    Posts:
    93
    :) By the way, do you know how to manage Program Files administrator-only restriction on Windows? Patcher can't update files because of it.

    Probably it's better to put game files and executables somewhere else in the system...
     
  12. mihanocho

    mihanocho

    Joined:
    Mar 10, 2015
    Posts:
    296
    Probably best I give up on Unity installer. I want to Make them on VS and XCode
     
  13. mihanocho

    mihanocho

    Joined:
    Mar 10, 2015
    Posts:
    296
    Please. Go to Edit->Project Settings->Player->Otimizate and change Net 2.0 Subject to Net 2.0
     
  14. Lethn

    Lethn

    Joined:
    May 18, 2015
    Posts:
    1,583
    That got rid of the error but now when I try running the patch after building everything I get this error on the patcher itself, it says it's to do with the version file so I thought that might be version.txt or CurrentVersion.txt, nothings worked so far.

    Error: Version file is incorrect
     
  15. mihanocho

    mihanocho

    Joined:
    Mar 10, 2015
    Posts:
    296
    how do you record version in version.txt? You need to list all the versions using "&".(For example: 1.0&2.0)
     
  16. mihanocho

    mihanocho

    Joined:
    Mar 10, 2015
    Posts:
    296
    Guys I need to collect all the questions you might have and answer them in the documentation. I beg you to write your questions.
     
  17. Lethn

    Lethn

    Joined:
    May 18, 2015
    Posts:
    1,583
    Thanks! You reply very quickly, I haven't done that, I just thought you put them in a list, so I'll try again and see what happens.

    I just had it listed as:

    1.0
    1.1

    Edit: Will need to poke around not sure what I'm doing wrong here.
     
  18. mihanocho

    mihanocho

    Joined:
    Mar 10, 2015
    Posts:
    296
    Please go to the skype or teamviewer.
     
  19. ftejada

    ftejada

    Joined:
    Jul 1, 2015
    Posts:
    695
    Hey there!! Is there some problem with your asset Unity version 5.3.1p1?

    I bought your asset but follow the video instructions (Build) and manual but simply with imported asset in my project did not build any project ...

    what am I doing wrong???

    I expect an answer or help ...

    Greetings
     
  20. mihanocho

    mihanocho

    Joined:
    Mar 10, 2015
    Posts:
    296
    Please. Go to Edit->Project Settings->Player->Otimizate and change Net 2.0 Subject to Net 2.0
     
  21. ftejada

    ftejada

    Joined:
    Jul 1, 2015
    Posts:
    695
    thanks for answering. That was the problem.

    Now I encounter another problem. I make the first build and run this I get:

    upload_2016-1-26_2-22-19.png

    I imagine it will be something because there is no server or something, because uncheck the option to upload because no server to upload and I do not think you can upload to Mega or Mediafire ...

    But then as I have to do to install the patches on my application?

    I await your response. A greeting


    Edit: on the other side when I run the launcher (MG Downloader), to install the game the first time I do the build, nothing is installed on the folder indicating. Always remains the loading screen in 100% of the installation.
     
    Last edited: Jan 26, 2016
  22. mihanocho

    mihanocho

    Joined:
    Mar 10, 2015
    Posts:
    296
    upload_2016-1-26_19-13-30.png
    please check your links. version file encode - utf8
     
  23. ftejada

    ftejada

    Joined:
    Jul 1, 2015
    Posts:
    695
    I do not understand what you say. Can you explain better what you I do and tell me if I can use his asset if I have no server upload patches ???

    Regards.
     
  24. mihanocho

    mihanocho

    Joined:
    Mar 10, 2015
    Posts:
    296
    First, you need to rent a hosting or server. You can also use Microsoft Azure. Next, enter settings in the MG Tools Patcher window.
     
  25. ftejada

    ftejada

    Joined:
    Jul 1, 2015
    Posts:
    695
    You're telling me that your asset is useless unless I do not have a hosting or server????

    Can not create the patch, store it in my PC, upload the patch to a type MEGA server, the client can download it from the link I to give him the client and install it in any way ????
     
  26. mihanocho

    mihanocho

    Joined:
    Mar 10, 2015
    Posts:
    296
    Hello. I understand that you want to use the update offline. Then check is_offline in MGPatcherScript. Create a patch and the files CurrentVersion.txt and version.txt and place them in the folder with the game. If I don't understand please explain in more detail.
     
  27. ftejada

    ftejada

    Joined:
    Jul 1, 2015
    Posts:
    695
    Sorry, but I think his explanation is too poor.
    I've been doing several tests with what you said but I can not do it.

    Would beg him to give me a detailed explanation step by step what needs to do and how to do an offline upgrade and how to update the game offline.

    I hope your answer, a greeting
     
  28. mihanocho

    mihanocho

    Joined:
    Mar 10, 2015
    Posts:
    296
    Give me a few days. I'll give you a lesson
     
  29. ftejada

    ftejada

    Joined:
    Jul 1, 2015
    Posts:
    695
    Ok. gracias
     
  30. mihanocho

    mihanocho

    Joined:
    Mar 10, 2015
    Posts:
    296
    Hello. Sorry for the wait.;)
    A few steps to patching offline:
    1. Select is_offline to true.
    upload_2016-2-4_9-3-4.png
    2. Configure MG Patcher Tools Window.
    upload_2016-2-4_9-5-32.png
    3.Copy the files for the current version in any folder.
    upload_2016-2-4_9-8-48.png
    4. Create a new version. And copy .patch file and version.txt file in the game folder.
    upload_2016-2-4_9-10-19.png
    5. Create a fileCurrentVersion.txt.
    upload_2016-2-4_9-13-46.png
    Done!:)
     
    Last edited: Feb 4, 2016
  31. ftejada

    ftejada

    Joined:
    Jul 1, 2015
    Posts:
    695
    Thanks you.
    One question mate! to which GameObject should this script "MG Patcher script" be attached to?
     
  32. mihanocho

    mihanocho

    Joined:
    Mar 10, 2015
    Posts:
    296
    Look in the scene MGPatcher. It is in principle possible to hang anywhere.
     
  33. ftejada

    ftejada

    Joined:
    Jul 1, 2015
    Posts:
    695
    Ok. I'll look and these days I answer some
     
  34. ftejada

    ftejada

    Joined:
    Jul 1, 2015
    Posts:
    695
    I followed your instructions (I have recorded a video for you to see), but I can not update the offline application.

    Please tell me I'm doing wrong because I do not understand.

     
  35. mihanocho

    mihanocho

    Joined:
    Mar 10, 2015
    Posts:
    296
    The fact that you have not copied the files of the first version and moved them. I already many times wrote about it. The files contents do not move and do not run. Because the versions in these folder to be compared. In this case, the program compared the empty space and version 2.0. If you can see the patch you weighed 15 Mb is the size of your game. Thank you.
     
  36. ftejada

    ftejada

    Joined:
    Jul 1, 2015
    Posts:
    695
    Ok. Thanks you!! I did not notice that detail. Forgive and a greeting for the help.
     
  37. mihanocho

    mihanocho

    Joined:
    Mar 10, 2015
    Posts:
    296
    Hi! I decided to write the steps for a Separate program.
    1. First you need to create a scene for the patcher. And place on any object MGPatcherScript and ProgressPatch. Checkis_separate_programto true in the MGPatcherScript.
    upload_2016-2-12_8-49-37.png
    2. Configure the patcher to create version 1.0. I will use start_version to distribute a patcher program that's a bit of weight. This functionis only possible when using SeparateProgram or Visual Studio.
    upload_2016-2-12_8-51-35.png
    3. After the creation of version 1.0 we need to build a patcher program.
    upload_2016-2-12_8-57-31.png
    4.Next, we must create CurrentVersion.txt and write in it "start_version".
    upload_2016-2-12_9-1-59.png
    These filesI have to distribute.
     

    Attached Files:

    Last edited: Feb 12, 2016
  38. mihanocho

    mihanocho

    Joined:
    Mar 10, 2015
    Posts:
    296
    Before using this lesson. Fix a piece of code in the function "checkVersion".
    upload_2016-2-12_9-35-6.png
    5. Will look like after game update to version 1.0.
    upload_2016-2-12_9-38-21.png
     
  39. mihanocho

    mihanocho

    Joined:
    Mar 10, 2015
    Posts:
    296
    The new version will be available 3.0.0.0 bittorrent.
     
  40. Lethn

    Lethn

    Joined:
    May 18, 2015
    Posts:
    1,583
    Does anyone know why I'd bet getting an error "WebException: Server returned an error: 550 Can't change directory to /Win/x86/: No such file or directory"

    Is this to do with permissions? Or something else? It seems to be connecting up but isn't actually writing files.

    Edit: Oh snap! I just fixed it by accident.

    For those who were wondering it was to do with the patches category.

    if you're uploading to an FTP server it should be:

    /www_root/Win/x86/

    as opposed to /Win/x86

    Now I need to test it to make sure this isn't a fluke -_- I also entered in my I.P address as my host HTTP and that seemed to fix things as well when I was getting error messages.
     
    Last edited: Mar 5, 2016
  41. mihanocho

    mihanocho

    Joined:
    Mar 10, 2015
    Posts:
    296
    For such cases I made root_directory. For ftp: ftp://host/root_directory/Win/x86/. For http: http://http_host/Win/x86/
     
  42. Lethn

    Lethn

    Joined:
    May 18, 2015
    Posts:
    1,583
    Bah, unfortunately I still can't get around this stupid version.txt error, I'll write down the full thing for people to dissect.

    ERROR: Version file is incorrect System.Net.WebException: The remote server returned an error: ( 404 ) Not found. at System.Net.HttpWebRequest.CheckFinalStatus ( System.Net.WebAsyncResult result ) [0x00000] in <filename unknown> :0
    at System.Net.HttpWebRequest.SetResponseData
    ( System.Net.WebConnectionData data ) [0x00000] in <filnename

    I want to devote some time getting this fixed because it would be really useful having this thing up and running properly -_-
     
    Last edited: Mar 9, 2016
  43. mihanocho

    mihanocho

    Joined:
    Mar 10, 2015
    Posts:
    296
    Check the full path version.txt. The program can't find the file on the server via the link.
    Here's how to check:
    upload_2016-3-9_20-34-32.png
    upload_2016-3-9_20-35-57.png
     
  44. Lethn

    Lethn

    Joined:
    May 18, 2015
    Posts:
    1,583
    By the way, do I need to delete my old patch files off the FTP server and re-compile the patches or do these settings save themselves when you compile offline and only matter when you compile the full program as an .EXE?
     
  45. mihanocho

    mihanocho

    Joined:
    Mar 10, 2015
    Posts:
    296
    All server information is stored in the file .exe. This is done to protect. If you do not correctly set up the patcher, you'll have to redo everything. Therefore, I recommend before compiling run the patcher from editor to check.
     
  46. Lethn

    Lethn

    Joined:
    May 18, 2015
    Posts:
    1,583
    Thanks for that, it cleared a lot up.
     
  47. mihanocho

    mihanocho

    Joined:
    Mar 10, 2015
    Posts:
    296
    New video!
    MGPatcherTools Torrent tutorial!!!
     
  48. mihanocho

    mihanocho

    Joined:
    Mar 10, 2015
    Posts:
    296
  49. PeterShoferistov

    PeterShoferistov

    Joined:
    Sep 22, 2013
    Posts:
    59
    Works like a charm. But.. there is a little bug. If application is located at desktop (for example Desktop\1.0.0.0\app.exe), program hangs up with exception
     
  50. mihanocho

    mihanocho

    Joined:
    Mar 10, 2015
    Posts:
    296
    Hello! Error can be for 2 reasons:
    1. Because of the use of "." in folder name.
    2. Errors in the settings.
    Let me know by mail all settings