Announcement

Collapse
No announcement yet.

[Plugin] ZipUtility (7zip)

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

    #31
    Hi getnamo! I have a need,one by one to unzip the file,i ues Queue,but At the time of the second,Stable there was an error,Click image for larger version

Name:	QQ截图20170524114858.jpg
Views:	1
Size:	70.3 KB
ID:	1128472
    But I was called by your way,Have you met?

    Comment


      #32
      Hey there, I'm using this for a new project and it's working great - thanks so much. One thing: I had to change the .uplugin type from "Development" to "Runtime" for it to work in packaged builds (it would package fine, but fail to Zip things with the Development type). The working ZipUtility.uplugin file now looks like:

      Code:
      {
      	"FileVersion": 3,
      	"Version": 2,
      	"VersionName": "0.3.0",
      	"FriendlyName": "ZipUtility",
      	"Description": "",
      	"Category": "Utility",
      	"CreatedBy": "Getnamo",
      	"CreatedByURL": "http://www.getnamo.com",
      	"DocsURL": "https://github.com/getnamo/ZipUtility-ue4",
      	"MarketplaceURL": "",
      	"SupportURL": "",
      	"EnabledByDefault": false,
      	"CanContainContent": false,
      	"IsBetaVersion": false,
      	"Installed": false,
      	"Modules": [
      		{
      			"Name": "ZipUtility",
      			"Type": "Runtime",                     // Changed this line
      			"LoadingPhase": "Default",
      			"WhitelistPlatforms": [
      				"Win64",
      				"Win32"
      			]
      		}
      	]
      }
      Cheers!

      Comment


        #33
        Originally posted by StaticMao View Post
        Hi getnamo! I have a need,one by one to unzip the file,i ues Queue,but At the time of the second,Stable there was an error,[ATTACH=CONFIG]142177[/ATTACH]
        But I was called by your way,Have you met?
        I haven't seen this, do you have a log and example C++ code that calls this in a queue?

        Originally posted by lukefwilson View Post
        Hey there, I'm using this for a new project and it's working great - thanks so much. One thing: I had to change the .uplugin type from "Development" to "Runtime" for it to work in packaged builds (it would package fine, but fail to Zip things with the Development type). The working ZipUtility.uplugin file now looks like:

        Code:
        {
        	"FileVersion": 3,
        	"Version": 2,
        	"VersionName": "0.3.0",
        	"FriendlyName": "ZipUtility",
        	"Description": "",
        	"Category": "Utility",
        	"CreatedBy": "Getnamo",
        	"CreatedByURL": "http://www.getnamo.com",
        	"DocsURL": "https://github.com/getnamo/ZipUtility-ue4",
        	"MarketplaceURL": "",
        	"SupportURL": "",
        	"EnabledByDefault": false,
        	"CanContainContent": false,
        	"IsBetaVersion": false,
        	"Installed": false,
        	"Modules": [
        		{
        			"Name": "ZipUtility",
        			"Type": "Runtime",                     // Changed this line
        			"LoadingPhase": "Default",
        			"WhitelistPlatforms": [
        				"Win64",
        				"Win32"
        			]
        		}
        	]
        }
        Cheers!
        Ah nice catch on oversight, consider making a pull request to get the change included in the plugin.
        Plugins: TensorFlow - Socket.io Client - ZipUtility - Leap Motion - Hydra - Myo - RealSense - CIM

        Comment


          #34
          Hi,getnamo
          I've created an official sample programs in the third person,When i execute Unzip of the OnFire(),
          code:
          Click image for larger version

Name:	QQ截图20170602182016.png
Views:	1
Size:	42.2 KB
ID:	1128981

          MyClass.h:

          #include "UObject/NoExportTypes.h"
          #include "ZipFileFunctionLibrary.h"
          #include "MyClass.generated.h"
          UCLASS()
          class UNZIP2_API UMyClass : public UObject, public IZipUtilityInterface
          {
          GENERATED_BODY()

          virtual void OnProgress_Implementation(const FString& archive, float percentage, int32 bytes) override;
          virtual void OnDone_Implementation(const FString& archive, EZipUtilityCompletionState CompletionState) override;
          virtual void OnStartProcess_Implementation(const FString& archive, int32 bytes) override;
          virtual void OnFileDone_Implementation(const FString& archive, const FString& file) override;
          virtual void OnFileFound_Implementation(const FString& archive, const FString& file, int32 size) override;


          };

          MyClass.cpp:

          #include "Unzip2.h"
          #include "MyClass.h"

          void UMyClass::OnProgress_Implementation(const FString& archive, float percentage, int32 bytes)
          {

          UE_LOG(LogClass, Log, TEXT("OnProgress_Implementation!%lf"), percentage);
          }
          void UMyClass::OnDone_Implementation(const FString& archive, EZipUtilityCompletionState CompletionState)
          {

          UE_LOG(LogClass, Log, TEXT("OnDone_Implementation!"));
          }
          void UMyClass::OnStartProcess_Implementation(const FString& archive, int32 bytes)
          {
          UE_LOG(LogClass, Log, TEXT("OnStartProcess_Implementation!"));
          }
          void UMyClass::OnFileDone_Implementation(const FString& archive, const FString& file)
          {

          }
          void UMyClass::OnFileFound_Implementation(const FString& archive, const FString& file, int32 size)
          {
          UE_LOG(LogClass, Log, TEXT("OnFileFound_Implementation!"));
          }



          The first execute absolutely no problem,I will wait for the complete Unzip,Problems arise when the second or third time,The picture above is wrong,Is there anything else I didn't do it?
          Last edited by StaticMao; 06-02-2017, 06:34 AM.

          Comment


            #35
            Originally posted by StaticMao View Post
            Hi,getnamo
            I've created an official sample programs in the third person,When i execute Unzip of the OnFire(),
            code:
            [ATTACH=CONFIG]143519[/ATTACH]

            MyClass.h:

            #include "UObject/NoExportTypes.h"
            #include "ZipFileFunctionLibrary.h"
            #include "MyClass.generated.h"
            UCLASS()
            class UNZIP2_API UMyClass : public UObject, public IZipUtilityInterface
            {
            GENERATED_BODY()

            virtual void OnProgress_Implementation(const FString& archive, float percentage, int32 bytes) override;
            virtual void OnDone_Implementation(const FString& archive, EZipUtilityCompletionState CompletionState) override;
            virtual void OnStartProcess_Implementation(const FString& archive, int32 bytes) override;
            virtual void OnFileDone_Implementation(const FString& archive, const FString& file) override;
            virtual void OnFileFound_Implementation(const FString& archive, const FString& file, int32 size) override;


            };

            MyClass.cpp:

            #include "Unzip2.h"
            #include "MyClass.h"

            void UMyClass::OnProgress_Implementation(const FString& archive, float percentage, int32 bytes)
            {

            UE_LOG(LogClass, Log, TEXT("OnProgress_Implementation!%lf"), percentage);
            }
            void UMyClass::OnDone_Implementation(const FString& archive, EZipUtilityCompletionState CompletionState)
            {

            UE_LOG(LogClass, Log, TEXT("OnDone_Implementation!"));
            }
            void UMyClass::OnStartProcess_Implementation(const FString& archive, int32 bytes)
            {
            UE_LOG(LogClass, Log, TEXT("OnStartProcess_Implementation!"));
            }
            void UMyClass::OnFileDone_Implementation(const FString& archive, const FString& file)
            {

            }
            void UMyClass::OnFileFound_Implementation(const FString& archive, const FString& file, int32 size)
            {
            UE_LOG(LogClass, Log, TEXT("OnFileFound_Implementation!"));
            }



            The first execute absolutely no problem,I will wait for the complete Unzip,Problems arise when the second or third time,The picture above is wrong,Is there anything else I didn't do it?
            Just sanity checks:
            1) Do you wait for completion before starting the second operation?
            2) Garbage collection usually takes 60 seconds, do any of your unzip operations take longer than that?

            Either way I've added the issue to github for tracking https://github.com/getnamo/ZipUtility-ue4/issues/12, feel free to add to it.
            Plugins: TensorFlow - Socket.io Client - ZipUtility - Leap Motion - Hydra - Myo - RealSense - CIM

            Comment


              #36
              Update to 0.3.3
              -compile fixes for 4.17
              -runtime plugin

              Now ready for your 4.17 drag and drop uses. Available here: https://github.com/getnamo/ZipUtility-ue4/releases
              Plugins: TensorFlow - Socket.io Client - ZipUtility - Leap Motion - Hydra - Myo - RealSense - CIM

              Comment


                #37
                Hello,

                I posted an issue on the GitHub repo but perhaps this is a better place for it...

                I'm trying to add the plugin to my project but I keep getting linking errors when compiling that I don't quite understand:

                Code:
                CompilerResultsLog: [1/1] Link UE4Editor-TestProject-7049.dll
                CompilerResultsLog: Error: LINK : fatal error LNK1181: cannot open input file 'C:\Users\prisonerjohn\Desktop\TestProject\Plugins\ZipUtility-ue4\Intermediate\Build\Win64\UE4Editor\Development\UE4Editor-ZipUtility.lib'
                CompilerResultsLog: ERROR: UBT ERROR: Failed to produce item: C:\Users\prisonerjohn\Desktop\TestProject\Binaries\Win64\UE4Editor-TestProject-7049.dll

                I followed the instructions in the README to add the plugin (including adding the module name to the Build.cs file), and tried restarting both Unreal Engine and Visual Studio, but still get the same issue.

                I found the following similar issue on the forums, but it didn't resolve my problem.

                Thanks in advance for the help!

                Comment


                  #38
                  Originally posted by prisonerjohn View Post
                  I'm trying to add the plugin to my project but I keep getting linking errors when compiling that I don't quite understand:
                  I had the same problem when trying to add the plugin to my C++ project (it worked fine in blueprints). Struggled with this for about a day and it is finally working. I think the main problem for me was that "ATL" was missing.

                  There is a path in the ZipUtility.Build.CS file that reads:
                  "C:/Program Files (x86)/Microsoft Visual Studio/2017/Community/VC/Tools/MSVC/14.14.26428/atlmfc"

                  But I had no such folder. I solved it by opening the Visual Studio Installer, clicking "more" and "modify". I then installed the "Desktop development with C++"-package which includes ATL. Now the folder appeared and I could compile.

                  Comment


                    #39
                    Originally posted by Simone13 View Post

                    I had the same problem when trying to add the plugin to my C++ project (it worked fine in blueprints). Struggled with this for about a day and it is finally working. I think the main problem for me was that "ATL" was missing.

                    There is a path in the ZipUtility.Build.CS file that reads:
                    "C:/Program Files (x86)/Microsoft Visual Studio/2017/Community/VC/Tools/MSVC/14.14.26428/atlmfc"

                    But I had no such folder. I solved it by opening the Visual Studio Installer, clicking "more" and "modify". I then installed the "Desktop development with C++"-package which includes ATL. Now the folder appeared and I could compile.
                    Excellent find, I've added this section in the readme pertaining to it: https://github.com/getnamo/ZipUtilit...e-on-compiling. NB: It should auto-detect the ats.lib since this pull request got merged: https://github.com/getnamo/ZipUtility-ue4/pull/26
                    Plugins: TensorFlow - Socket.io Client - ZipUtility - Leap Motion - Hydra - Myo - RealSense - CIM

                    Comment


                      #40
                      Hi getnamo!
                      I'm using your plugin in ue4.21 and i'm loving it!
                      In the editor the plug in work, i'm able to extract a zip that i dowloaded with an http request, to install an update of my application.
                      But when i try to build the application for windows, it fails here:

                      Code:
                      UATHelper: Packaging (Windows (32-bit)): ********** BUILD COMMAND STARTED **********
                      UATHelper: Packaging (Windows (32-bit)): Running: C:\Program Files\Epic Games\UE_4.21\Engine\Binaries\DotNET\UnrealBuildTool.exe Test_zip Win32 Development -Project=D:\UnrealProj_generic\Test_zip\Test_zip.uproject  D:\UnrealProj_generic\Test_zip\Test_zip.uproject -NoUBTMakefiles  -remoteini="D:\UnrealProj_generic\Test_zip" -skipdeploy -Manifest=D:\UnrealProj
                      _generic\Test_zip\Intermediate\Build\Manifest.xml -NoHotReload -log="C:\Users\3DVR\AppData\Roaming\Unreal Engine\AutomationTool\Logs\C+Program+Files+Epic+Games+UE_4.21\UBT-Test_zip-Win32-Development.txt"
                      UATHelper: Packaging (Windows (32-bit)):   Using Visual Studio 2017 14.16.27023 toolchain (C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.16.27023) and Windows 10.0.17763.0 SDK (C:\Program Files (x86)\Windows Kits\10).
                      UATHelper: Packaging (Windows (32-bit)):   ZipUtility: Found VS path in registry: C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\
                      UATHelper: Packaging (Windows (32-bit)):   D:\UnrealProj_generic\Test_zip\Plugins\ZipUtility-ue4\Source\ZipUtility\ZipUtility.Build.cs: warning: Referenced directory 'C:\Program Files\Epic Games\UE_4.21\Engine\Source\ZipUtility\Public' does not exist.
                      PackagingResults: Warning: Referenced directory 'C:\Program Files\Epic Games\UE_4.21\Engine\Source\ZipUtility\Public' does not exist.
                      UATHelper: Packaging (Windows (32-bit)):   D:\UnrealProj_generic\Test_zip\Plugins\ZipUtility-ue4\Source\WindowsUtility\WindowsFileUtility.Build.cs: warning: Referenced directory 'C:\Program Files\Epic Games\UE_4.21\Engine\Source\WindowsFileUtility\Public' does not exist.
                      UATHelper: Packaging (Windows (32-bit)):   D:\UnrealProj_generic\Test_zip\Plugins\ZipUtility-ue4\Source\WindowsUtility\WindowsFileUtility.Build.cs: warning: Referenced directory 'D:\UnrealProj_generic\Test_zip\Plugins\ZipUtility-ue4\Source\WindowsFileUtility\Private' does not exist.
                      PackagingResults: Warning: Referenced directory 'C:\Program Files\Epic Games\UE_4.21\Engine\Source\WindowsFileUtility\Public' does not exist.
                      PackagingResults: Warning: Referenced directory 'D:\UnrealProj_generic\Test_zip\Plugins\ZipUtility-ue4\Source\WindowsFileUtility\Private' does not exist.
                      UATHelper: Packaging (Windows (32-bit)):   Parsing headers for Test_zip
                      UATHelper: Packaging (Windows (32-bit)):     Running UnrealHeaderTool "D:\UnrealProj_generic\Test_zip\Test_zip.uproject" "D:\UnrealProj_generic\Test_zip\Intermediate\Build\Win32\Test_zip\Development\Test_zip.uhtmanifest" -LogCmds="loginit warning, logexit warning, logdatabase error" -Unattended -WarningsAsErrors -installed
                      UATHelper: Packaging (Windows (32-bit)):   Reflection code generated for Test_zip in 6,2352186 seconds
                      UATHelper: Packaging (Windows (32-bit)):   Writing manifest to D:\UnrealProj_generic\Test_zip\Intermediate\Build\Manifest.xml
                      UATHelper: Packaging (Windows (32-bit)):   Building 14 actions with 16 processes...
                      UATHelper: Packaging (Windows (32-bit)):     [1/14] PCH.ZipUtility.cpp
                      UATHelper: Packaging (Windows (32-bit)):     [2/14] PCH.WindowsFileUtility.cpp
                      UATHelper: Packaging (Windows (32-bit)):     [3/14] Module.WindowsFileUtility.gen.cpp
                      UATHelper: Packaging (Windows (32-bit)):     [4/14] Module.ZipUtility.gen.cpp
                      UATHelper: Packaging (Windows (32-bit)):     [5/14] Module.WindowsFileUtility.cpp
                      UATHelper: Packaging (Windows (32-bit)):     [6/14] Module.ZipUtility.cpp
                      UATHelper: Packaging (Windows (32-bit)):     D:\UnrealProj_generic\Test_zip\Plugins\ZipUtility-ue4\Source\ZipUtility\Private\ZipFileFunctionLibrary.cpp(50): error C4668: '_WIN64' non � definita come macro del preprocessore. Sostituzione con '0' per '#if/#elif'.
                      UATHelper: Packaging (Windows (32-bit)):     C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.16.27023\INCLUDE\vcruntime_new.h(71): error C4577: � stato usato 'noexcept' senza specificare la modalit� di gestione delle eccezioni. La terminazione in caso di eccezione non � garantita. Specificare /EHsc
                      UATHelper: Packaging (Windows (32-bit)):     C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.16.27023\INCLUDE\vcruntime_new.h(82): error C4577: � stato usato 'noexcept' senza specificare la modalit� di gestione delle eccezioni. La terminazione in caso di eccezione non � garantita. Specificare /EHsc
                      UATHelper: Packaging (Windows (32-bit)):     [7/14] SharedPCH.Engine.cpp
                      UATHelper: Packaging (Windows (32-bit)):     [8/14] Test_zip.cpp
                      UATHelper: Packaging (Windows (32-bit)):     [9/14] Test_zip.init.gen.cpp
                      UATHelper: Packaging (Windows (32-bit)):     [10/14] Test_zipGameMode.gen.cpp
                      UATHelper: Packaging (Windows (32-bit)):     [11/14] Test_zipCharacter.gen.cpp
                      UATHelper: Packaging (Windows (32-bit)):     [12/14] Test_zipGameMode.cpp
                      UATHelper: Packaging (Windows (32-bit)):     [13/14] Test_zipCharacter.cpp
                      UATHelper: Packaging (Windows (32-bit)):   ERROR: UBT ERROR: Failed to produce item: D:\UnrealProj_generic\Test_zip\Binaries\Win32\Test_zip.exe
                      UATHelper: Packaging (Windows (32-bit)):          (see C:\Users\3DVR\AppData\Roaming\Unreal Engine\AutomationTool\Logs\C+Program+Files+Epic+Games+UE_4.21\UBT-Test_zip-Win32-Development.txt for full exception trace)
                      PackagingResults: Error: UBT ERROR: Failed to produce item: D:\UnrealProj_generic\Test_zip\Binaries\Win32\Test_zip.exe
                      UATHelper: Packaging (Windows (32-bit)):   Total build time: 31,47 seconds (Parallel executor: 0,00 seconds)
                      UATHelper: Packaging (Windows (32-bit)): Took 31,6678059s to run UnrealBuildTool.exe, ExitCode=5
                      UATHelper: Packaging (Windows (32-bit)): ERROR: UnrealBuildTool failed. See log for more details. (C:\Users\3DVR\AppData\Roaming\Unreal Engine\AutomationTool\Logs\C+Program+Files+Epic+Games+UE_4.21\UBT-Test_zip-Win32-Development.txt)
                      UATHelper: Packaging (Windows (32-bit)):        (see C:\Users\3DVR\AppData\Roaming\Unreal Engine\AutomationTool\Logs\C+Program+Files+Epic+Games+UE_4.21\Log.txt for full exception trace)
                      PackagingResults: Error: UnrealBuildTool failed. See log for more details. (C:\Users\3DVR\AppData\Roaming\Unreal Engine\AutomationTool\Logs\C+Program+Files+Epic+Games+UE_4.21\UBT-Test_zip-Win32-Development.txt)
                      UATHelper: Packaging (Windows (32-bit)): AutomationTool exiting with ExitCode=5 (5)
                      UATHelper: Packaging (Windows (32-bit)): BUILD FAILED
                      PackagingResults: Error: Unknown Error
                      I installed the plugin as you said in the readme on github, so i just copied the folder in the project folder.
                      I specify that i'm trying to use it in a clean new template c++ prject.

                      I'm trying to resolve these warning and errors but if you or someone has seen this error that would be great!

                      Thanks!

                      Comment


                        #41
                        Originally posted by xmario View Post
                        Hi getnamo!
                        I'm using your plugin in ue4.21 and i'm loving it!
                        In the editor the plug in work, i'm able to extract a zip that i dowloaded with an http request, to install an update of my application.
                        But when i try to build the application for windows, it fails here:

                        Code:
                        ...
                        I installed the plugin as you said in the readme on github, so i just copied the folder in the project folder.
                        I specify that i'm trying to use it in a clean new template c++ prject.

                        I'm trying to resolve these warning and errors but if you or someone has seen this error that would be great!

                        Thanks!
                        Fixed in https://github.com/getnamo/ZipUtilit...ases/tag/0.5.2. See https://github.com/getnamo/ZipUtilit...ment-449761620 for issue details.
                        Plugins: TensorFlow - Socket.io Client - ZipUtility - Leap Motion - Hydra - Myo - RealSense - CIM

                        Comment


                          #42
                          Hello, I've just found your plugin, and it exactly what I need for my project, thank you for sharing it!
                          But, could you help me out a bit, I'm getting a UE editor crash everytimeI'm running a zip node. I've attached a few screens.
                          It crashes after it zip's, as the zip is created and can be extracted just fine using 7zip or winrar.
                          Added a crash log too.
                          Thanks!
                          Attached Files
                          Last edited by strezoiu; 01-24-2019, 04:54 PM.

                          Comment


                            #43
                            Originally posted by strezoiu View Post
                            Hello, I've just found your plugin, and it exactly what I need for my project, thank you for sharing it!
                            But, could you help me out a bit, I'm getting a UE editor crash everytimeI'm running a zip node. I've attached a few screens.
                            It crashes after it zip's, as the zip is created and can be extracted just fine using 7zip or winrar.
                            Added a crash log too.
                            Thanks!
                            Based on that crash and the fact this is done in a UMG blueprint I speculate you didn't add the zip utility interface to the Mods_Widget1 calling this function see this section: https://github.com/getnamo/ziputilit...ueprint-access for details on usage.

                            NB: Thanks for spotting a crash! It's bad design for the plugin to crash when the interface isn't set, so I added an issue to change the crash to a warning here: https://github.com/getnamo/ZipUtility-ue4/issues/32. It may be a long time before I add the enhancement though.
                            Last edited by getnamo; 01-31-2019, 11:05 PM.
                            Plugins: TensorFlow - Socket.io Client - ZipUtility - Leap Motion - Hydra - Myo - RealSense - CIM

                            Comment

                            Working...
                            X