-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathembed-binary.bat
More file actions
27 lines (18 loc) · 779 Bytes
/
embed-binary.bat
File metadata and controls
27 lines (18 loc) · 779 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
@echo off
setlocal enabledelayedexpansion
set BINARY_BUILDER=%USERPROFILE%\Documents\JUCE\extras\BinaryBuilder\Builds\VisualStudio2022\x64\Debug\ConsoleApp\BinaryBuilder.exe
set WEBVIEW_ZIP=build\webview_files.zip
set CHOP_SCRIPT=python\chopper.py
set OUTPUT_DIR=editor
set CLASS_NAME=BinaryData
if not exist "%OUTPUT_DIR%" (
mkdir "%OUTPUT_DIR%"
)
for /f "delims=" %%I in ('powershell -command "New-Item -ItemType Directory -Path ([System.IO.Path]::GetTempPath()) -Name ([System.Guid]::NewGuid().ToString())"') do set TMP_DIR=%%I
copy "%WEBVIEW_ZIP%" "%TMP_DIR%\"
copy "%CHOP_SCRIPT%" "%TMP_DIR%\"
"%BINARY_BUILDER%" "%TMP_DIR%" "%OUTPUT_DIR%" "%CLASS_NAME%"
rmdir /s /q "%TMP_DIR%"
echo - %OUTPUT_DIR%\%CLASS_NAME%.cpp
echo - %OUTPUT_DIR%\%CLASS_NAME%.h
endlocal