Skip to content

Commit bd7a6ad

Browse files
Fix build
1 parent bfc4a2f commit bd7a6ad

File tree

1 file changed

+20
-8
lines changed

1 file changed

+20
-8
lines changed

Build.bat

Lines changed: 20 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,20 @@ echo Program: GenHotkeys
66
echo Authors: mah_boi, nikitvs
77
echo.
88

9+
:: Check for remove build folder
10+
set "KEEP_ALIVE_BUILD=0"
11+
for %%A in (%*) do (
12+
if /I "%%~A"=="--keep-build" set "KEEP_BUILD=1"
13+
if /I "%%~A"=="-k" set "KEEP_BUILD=1"
14+
)
15+
if "%KEEP_BUILD%"=="1" (
16+
echo Skip build folder cleanup
17+
) else (
18+
echo Remove build folder...
19+
rmdir /q /s build > nul 2> nul
20+
)
21+
echo.
22+
923
:: Set up cmake config folder for the project
1024
echo Configuring MinGW Make...
1125
cmake -DCMAKE_BUILD_TYPE:STRING=Release -DCMAKE_EXPORT_COMPILE_COMMANDS:BOOL=TRUE -DCMAKE_C_COMPILER:FILEPATH=C:\Qt\Tools\mingw_64\\bin\gcc.exe -DCMAKE_CXX_COMPILER:FILEPATH=C:\Qt\Tools\mingw_64\bin\g++.exe -S.\ -B.\build -G "MinGW Makefiles"
@@ -19,19 +33,17 @@ echo Compilation and linking executables done
1933
echo.
2034

2135
:: Copy translation tools
22-
mkdir build\exe\Resources\Translations\Tools
23-
copy /y C:\Qt\5.15.2\mingw81_64\bin\lrelease.exe build\exe\Resources\Translations\Tools > nul
24-
copy /y C:\Qt\5.15.2\mingw81_64\bin\linguist.exe build\exe\Resources\Translations\Tools > nul
25-
copy /y src\GUI\Translations\ru.ts build\exe\Resources\Translations\Tools > nul
36+
mkdir build\exe\Resources\Translations\Tools > nul 2> nul
37+
copy /y C:\Qt\5.15.2\mingw81_64\bin\lrelease.exe build\exe\Resources\Translations\Tools > nul 2> nul
38+
copy /y C:\Qt\5.15.2\mingw81_64\bin\linguist.exe build\exe\Resources\Translations\Tools > nul 2> nul
39+
copy /y src\GUI\Translations\ru.ts build\exe\Resources\Translations\Tools > nul 2> nul
2640
echo lrelease.exe -- CLI Qt compilation tool to compile *.ts files to the *.qm. Run lrelease.exe --help to see more info about how to use it. >> build\exe\Resources\Translations\Tools\readme.txt
2741
echo linguist.exe -- GUI Qt translation tool to edit *.ts files. >> build\exe\Resources\Translations\Tools\readme.txt
2842
echo ru.ts -- Translation file example. >> build\exe\Resources\Translations\Tools\readme.txt
2943

3044
:: Add any file to "Logs" folder for the next shipping
3145
mkdir build\exe\Logs >nul 2> nul
32-
cd build\exe\Logs
33-
echo Do not delete this folder, please. Or program will can not be start. > readme.txt
34-
echo.
46+
echo Do not delete this folder, please. Or program will can not be start. > build\exe\Logs\readme.txt
3547

3648
echo Compiling finished. Press enter to exit...
37-
timeout /t 30 > nul
49+
timeout /t 10 > nul

0 commit comments

Comments
 (0)