-
Notifications
You must be signed in to change notification settings - Fork 0
/
build_experimental.bat
49 lines (36 loc) · 1.18 KB
/
build_experimental.bat
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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
@echo off
setlocal enabledelayedexpansion
REM Set the original folder path
set "original_folder=%~dp0"
REM Set the build directory path
set "build_directory=%original_folder%..\build\"
REM Create the build directory if it doesn't exist
if not exist "%build_directory%" (
mkdir "%build_directory%"
)
REM Create a timestamp for the zip file
set "timestamp=%date:/=-%_%time::=-%"
set "timestamp=%timestamp: =0%"
set "timestamp=%timestamp:.=_%"
set "suffix=-Beta-1"
REM Set the zip file
set "zip_file=%build_directory%Pixel-Perfect!suffix!-%timestamp%.zip"
REM Create the zip file
tar.exe -a -c -f !zip_file! -X exclude_from_build.txt LICENSE shaders
echo Created !zip_file!
REM Replace the latest build file with current build
copy "!zip_file!" "%original_folder%..\Pixel-Perfect-Latest!suffix!.zip" /b /y
echo Replaced latest build
if not "%~1"=="/k" (
REM Delete the original zip file
del "!zip_file!"
echo Deleted "!zip_file!"
) else (
echo Kept "!zip_file!"
)
if not "%~1"=="/k" (
echo You can use /k if you want to keep the zip file in the build folder after the program is done.
)
echo Build completed. Press any key to close.
REM Prevent the window from closing on completion
pause >nul