Skip to content

Commit bfc4a2f

Browse files
Change building pipeline
1 parent 8db8172 commit bfc4a2f

File tree

4 files changed

+47
-58
lines changed

4 files changed

+47
-58
lines changed

.github/workflows/Build.yml

Lines changed: 1 addition & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -48,43 +48,7 @@ jobs:
4848
- name: Compile Project
4949
shell: cmd
5050
run: |
51-
:: Remove previous cmake build folder
52-
rmdir /s /q build >nul 2>nul
53-
:: Link MinGW to system variables
54-
mkdir C:\Qt\Tools > nul
55-
mklink C:\Qt\Tools\mingw_64 C:\ProgramData\chocolatey\lib\mingw\tools\install\mingw64 > nul
56-
set PATH=%PATH%;C:\Qt\5.15.2\mingw81_64\bin;C:\Qt\Tools\mingw_64\bin
57-
58-
:: Print header
59-
echo Program: GenHotkeys
60-
echo Authors: mah_boi, nikitvs
61-
echo.
62-
63-
:: Set up cmake config folder for the project
64-
echo Configuring MinGW Make...
65-
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"
66-
echo Configuring MinGW Make done
67-
echo.
68-
69-
:: Start compiling
70-
echo Compilation and linking executables...
71-
cmake --build .\build --config Release --target all -j 16
72-
echo Compilation and linking executables done
73-
echo.
74-
75-
:: Copy translation tools
76-
mkdir build\exe\Resources\Translations\Tools
77-
copy /y C:\Qt\5.15.2\mingw81_64\bin\lrelease.exe build\exe\Resources\Translations\Tools
78-
copy /y C:\Qt\5.15.2\mingw81_64\bin\linguist.exe build\exe\Resources\Translations\Tools
79-
copy /y src\GUI\Translations\ru.ts build\exe\Resources\Translations\Tools
80-
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
81-
echo linguist.exe -- GUI Qt translation tool to edit *.ts files. >> build\exe\Resources\Translations\Tools\readme.txt
82-
echo ru.ts -- Translation file example. >> build\exe\Resources\Translations\Tools\readme.txt
83-
84-
:: Add any file to "Logs" folder for the next shipping
85-
mkdir build\exe\Logs >nul 2> nul
86-
cd build\exe\Logs
87-
echo Do not delete this folder, please. Or program will can not be start. > readme.txt
51+
call Build.bat
8852
8953
# Upload artifact to the GitHub
9054
- name: Upload Artifact

Build.bat

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
@echo off
2+
chcp 65001 > nul
3+
4+
:: Print header
5+
echo Program: GenHotkeys
6+
echo Authors: mah_boi, nikitvs
7+
echo.
8+
9+
:: Set up cmake config folder for the project
10+
echo Configuring MinGW Make...
11+
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"
12+
echo Configuring MinGW Make done
13+
echo.
14+
15+
:: Start compiling
16+
echo Compilation and linking executables...
17+
cmake --build .\build --config Release --target all -j 4
18+
echo Compilation and linking executables done
19+
echo.
20+
21+
:: 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
26+
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
27+
echo linguist.exe -- GUI Qt translation tool to edit *.ts files. >> build\exe\Resources\Translations\Tools\readme.txt
28+
echo ru.ts -- Translation file example. >> build\exe\Resources\Translations\Tools\readme.txt
29+
30+
:: Add any file to "Logs" folder for the next shipping
31+
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.
35+
36+
echo Compiling finished. Press enter to exit...
37+
timeout /t 30 > nul

Run.bat

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
@echo off
2+
chcp 65001 > nul
3+
4+
call Build.bat
5+
6+
echo Starting editor in 5 seconds...
7+
timeout /t 5 > nul
8+
cd .\build\exe\
9+
start "" GenHotkeys.exe

zBuildAndRun.bat

Lines changed: 0 additions & 21 deletions
This file was deleted.

0 commit comments

Comments
 (0)