diff --git a/.gitignore b/.gitignore index 27641ff..ebfb6cf 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ *.swp Binaries/ Intermediate/ +PopcornFX_Runtime_SDK/ diff --git a/Download_SDK_All.bat b/Download_SDK_All.bat new file mode 100644 index 0000000..3607243 --- /dev/null +++ b/Download_SDK_All.bat @@ -0,0 +1,4 @@ +@echo off + +call "Download_SDK_Desktop.bat" +call "Download_SDK_Mobile.bat" diff --git a/Download_SDK_Desktop.bat b/Download_SDK_Desktop.bat new file mode 100644 index 0000000..a2b3d6d --- /dev/null +++ b/Download_SDK_Desktop.bat @@ -0,0 +1,45 @@ +@echo off + +echo "---------- Downloading PopcornFX Runtime SDK for Unreal Engine (Desktop platforms) ----------" + +setlocal + +bitsadmin /reset +bitsadmin /create third_party_download_desktop +bitsadmin /addfile third_party_download_desktop https://downloads.popcornfx.com/Plugins/UE4/UnrealEngine_PopcornFXPlugin_2.11.2_Win64_Linux64_Mac64.7z "%~dp0\_PopcornFX_Runtime_SDK_Desktop.7z" +bitsadmin /setpriority third_party_download_desktop "FOREGROUND" +bitsadmin /resume third_party_download_desktop + +:WAIT_FOR_DOWNLOAD_LOOP_START + call bitsadmin /info third_party_download_desktop /verbose | find "STATE: TRANSFERRED" + if %ERRORLEVEL% equ 0 goto WAIT_FOR_DOWNLOAD_LOOP_END + call bitsadmin /RawReturn /GetBytesTransferred third_party_download_desktop + echo Bytes transferred + timeout 2 > nul + goto WAIT_FOR_DOWNLOAD_LOOP_START +:WAIT_FOR_DOWNLOAD_LOOP_END + +bitsadmin /complete third_party_download_desktop + +echo "---------- Download complete ----------" +echo "---------- Preparing PopcornFX_Runtime_SDK/ ----------" + +rem rmdir /s /q %~dp0\PopcornFX_Runtime_SDK +mkdir %~dp0\PopcornFX_Runtime_SDK + +echo "---------- Unzipping _PopcornFX_Runtime_SDK.7z ----------" + +7z x _PopcornFX_Runtime_SDK_Desktop.7z -o_PopcornFX_Runtime_SDK_Desktop + +echo "---------- Copying PopcornFX Runtime SDK ----------" + +xcopy _PopcornFX_Runtime_SDK_Desktop\PopcornFX\PopcornFX_Runtime_SDK %~dp0\PopcornFX_Runtime_SDK /S /F /Y + +echo "---------- Removing temp files ----------" + +rmdir /s /q %~dp0\_PopcornFX_Runtime_SDK_Desktop +del /f _PopcornFX_Runtime_SDK_Desktop.7z + +echo "---------- Finished ----------" + +endlocal diff --git a/Download_SDK_Mobile.bat b/Download_SDK_Mobile.bat new file mode 100644 index 0000000..3733aff --- /dev/null +++ b/Download_SDK_Mobile.bat @@ -0,0 +1,45 @@ +@echo off + +echo "---------- Downloading PopcornFX Runtime SDK for Unreal Engine (Mobile platforms) ----------" + +setlocal + +bitsadmin /reset +bitsadmin /create third_party_download_mobile +bitsadmin /addfile third_party_download_mobile https://downloads.popcornfx.com/Plugins/UE4/UnrealEngine_PopcornFXPlugin_2.11.2_iOS_Android.7z "%~dp0\_PopcornFX_Runtime_SDK_Mobile.7z" +bitsadmin /setpriority third_party_download_mobile "FOREGROUND" +bitsadmin /resume third_party_download_mobile + +:WAIT_FOR_DOWNLOAD_LOOP_START + call bitsadmin /info third_party_download_mobile /verbose | find "STATE: TRANSFERRED" + if %ERRORLEVEL% equ 0 goto WAIT_FOR_DOWNLOAD_LOOP_END + call bitsadmin /RawReturn /GetBytesTransferred third_party_download_mobile + echo Bytes transferred + timeout 2 > nul + goto WAIT_FOR_DOWNLOAD_LOOP_START +:WAIT_FOR_DOWNLOAD_LOOP_END + +bitsadmin /complete third_party_download_mobile + +echo "---------- Download complete ----------" +echo "---------- Preparing PopcornFX_Runtime_SDK/ ----------" + +rem rmdir /s /q %~dp0\PopcornFX_Runtime_SDK +mkdir %~dp0\PopcornFX_Runtime_SDK + +echo "---------- Unzipping _PopcornFX_Runtime_SDK_Mobile.7z ----------" + +7z x _PopcornFX_Runtime_SDK_Mobile.7z -o_PopcornFX_Runtime_SDK_Mobile + +echo "---------- Copying PopcornFX Runtime SDK ----------" + +xcopy _PopcornFX_Runtime_SDK_Mobile\PopcornFX\PopcornFX_Runtime_SDK %~dp0\PopcornFX_Runtime_SDK /S /F /Y + +echo "---------- Removing temp files ----------" + +rmdir /s /q %~dp0\_PopcornFX_Runtime_SDK_Mobile +del /f _PopcornFX_Runtime_SDK_Mobile.7z + +echo "---------- Finished ----------" + +endlocal diff --git a/README.md b/README.md index fb69836..4627f0b 100644 --- a/README.md +++ b/README.md @@ -13,7 +13,13 @@ The plugin can only be installed in Code projects (Blueprint-only projects are n On windows, it is required to install **[Visual studio](https://docs.unrealengine.com/4.27/en-US/ProductionPipelines/DevelopmentSetup/VisualStudioSetup/)** to compile the plugin as we do not provide compiled PopcornFX plugin binaries yet. -Check out the **[Installation steps](https://www.popcornfx.com/docs/popcornfx-v2/plugins/ue4-plugin/installation-and-setup/)** to install the plugin and start using PopcornFX! +Currently, you will need to download & install **[7-zip](https://www.7-zip.org/download.html)** and add it to your PATH environment variable (this is a requirement we want to remove in future updates): we currently use 7zip as it produces smaller archives of the PopcornFX Runtime SDK. + +Once Visual studio and 7-zip are installed, you can launch `Download_SDK_All.bat` to download PopcornFX Runtime SDK. `Download_SDK_Desktop.bat` and `Download_SDK_Mobile.bat` can be used separately if you only need Desktop or Mobile platforms. + +Once PopcornFX Runtime SDK is downloaded and placed in `PopcornFX_Runtime_SDK/` folder, the plugin is ready to be compiled. + +Check out the **[General installation steps](https://www.popcornfx.com/docs/popcornfx-v2/plugins/ue4-plugin/installation-and-setup/)** to see how to compile the plugin! ## Quick Links: Documentation and Support