-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
14 changed files
with
143 additions
and
33 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,46 @@ | ||
@echo off | ||
setlocal | ||
|
||
:: Clean repository | ||
git clean -fdx | ||
|
||
cmake . | ||
:: Detect system architecture and set Qt6_DIR accordingly | ||
if exist "%ProgramFiles%\Arm" ( | ||
set "Qt6_DIR=C:\Qt\6.7.1\msvc2019_arm64\lib\cmake\Qt6" | ||
) else ( | ||
set "Qt6_DIR=C:\Qt\6.7.1\msvc2019_64\lib\cmake\Qt6" | ||
) | ||
|
||
:: Detect Visual Studio version | ||
set "vsver=" | ||
for /f "tokens=*" %%i in ('dir "C:\Program Files\Microsoft Visual Studio\" /b /ad-h') do ( | ||
if "%%i"=="2019" ( | ||
set "vsver=Visual Studio 16 2019" | ||
) else if "%%i"=="2022" ( | ||
set "vsver=Visual Studio 17 2022" | ||
) | ||
) | ||
|
||
if not defined vsver ( | ||
echo "No suitable Visual Studio version found." | ||
exit /b 1 | ||
) | ||
|
||
:: Set system architecture based on previous detection | ||
if exist "%ProgramFiles%\Arm" ( | ||
set "arch=ARM64" | ||
) else ( | ||
set "arch=X64" | ||
) | ||
|
||
:: Generate project files | ||
cmake -G "%vsver%" -A %arch% . | ||
|
||
cmake --build . --target mill-pro | ||
windeployqt "Debug\mill-pro.exe" | ||
:: Build and deploy Debug version | ||
cmake --build . --target mill-pro --config Debug | ||
C:\Qt\Tools\QtDesignStudio\qt6_design_studio_reduced_version\bin\windeployqt "Debug\mill-pro.exe" | ||
|
||
:: Build and deploy Release version | ||
cmake --build . --target mill-pro --config Release | ||
windeployqt "Release\mill-pro.exe" | ||
C:\Qt\Tools\QtDesignStudio\qt6_design_studio_reduced_version\bin\windeployqt "Release\mill-pro.exe" | ||
|
||
# cov-build --dir cov-int cmake --build . --target mill-pro |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,46 @@ | ||
#!/bin/bash | ||
set -e | ||
|
||
# Clean repository | ||
git clean -fdx | ||
|
||
cmake . | ||
# Detect Qt installation and set Qt6_DIR | ||
Qt6_BIN=$(dirname "$(which qmake 2>/dev/null)") | ||
Qt6_DIR="${Qt6_BIN%/bin}" | ||
|
||
if [[ -z "$Qt6_DIR" ]]; then | ||
echo "Qt6 installation not found." | ||
exit 1 | ||
fi | ||
|
||
# Detect system architecture | ||
ARCH=$(uname -m) | ||
if [[ "$ARCH" == "arm64" || "$ARCH" == "aarch64" ]]; then | ||
ARCH="ARM64" | ||
else | ||
ARCH="x86_64" | ||
fi | ||
|
||
cmake --build . --target mill-pro | ||
#windeployqt "Debug/mill-pro" | ||
# Detect compiler version | ||
if command -v gcc > /devontinue; then | ||
GCC_VER=$(gcc -dumpversion) | ||
echo "GCC version $GCC_VER detected." | ||
elif command -v clang > /dev/null; then | ||
CLANG_VER=$(clang --version | grep version | awk '{print $3}') | ||
echo "Clang version $CLANG_VER detected." | ||
else | ||
echo "No suitable compiler found." | ||
exit 1 | ||
fi | ||
|
||
cmake --build . --target mill-pro --config Release | ||
#windeployqt "Release/mill-pro" | ||
# Generate project files for Debug | ||
cmake -G "Unix Makefiles" -DCMAKE_PREFIX_PATH="$Qt6_DIR" -DCMAKE_BUILD_TYPE=Debug $EXTRA_CMAKE_FLAGS -DCMAKE_C_COMPILER=gcc -DCMAKE_CXX_COMPILER=g++ -DCMAKE_RUNTIME_OUTPUT_DIRECTORY=Debug . | ||
|
||
# cmake .. -G "Xcode" -DCMAKE_PREFIX_PATH=~/Qt5.12.12/5.12.12/clang_64 -DCMAKE_OSX_ARCHITECTURES=x86_64 | ||
# Build and deploy Debug version | ||
cmake --build . --target mill-pro --config Debug -j | ||
|
||
# cov-build --dir cov-int cmake --build . --target mill-pro | ||
# Generate project files for Release | ||
cmake -G "Unix Makefiles" -DCMAKE_PREFIX_PATH="$Qt6_DIR" -DCMAKE_BUILD_TYPE=Release $EXTRA_CMAKE_FLAGS -DCMAKE_C_COMPILER=gcc -DCMAKE_CXX_COMPILER=g++ -DCMAKE_RUNTIME_OUTPUT_DIRECTORY=Release . | ||
|
||
# Build and deploy Release version | ||
cmake --build . --target mill-pro --config Release -j |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters