Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Initial CMake support #45

Open
wants to merge 20 commits into
base: main
Choose a base branch
from
Open

Initial CMake support #45

wants to merge 20 commits into from

Conversation

raspopov
Copy link

@raspopov raspopov commented Aug 6, 2024

The initial idea was to build a standard distribution for Windows. CMake was chosen for its ability to build distributions using NSIS. BAT scripts were fixed, pausing due to the need for automatic execution was removed, and administrative login was added. As a bonus, the creation of primitive Debian packages was also supported.

The sample build script (placed in the root of the sources) using the Qt installation for gcc compiler:

rem Detect a CMake
for /f "tokens=2*" %%i in ('reg query HKLM\SOFTWARE\Kitware\CMake /v InstallDir ^| findstr REG_SZ') do if exist "%%~j" set "PATH=%PATH%;%%~j\bin"
where /q cmake
if not %errorlevel% equ 0 echo CMake not found! && exit /b %errorlevel%

rem Detect GCC
set "PATH=%PATH%;C:\Qt\Tools\llvm-mingw1706_64\bin"
where /q g++
if not %errorlevel% equ 0 echo GCC not found! && exit /b %errorlevel%

rem Generate a project
cmake -B build -G "MinGW Makefiles" -DCMAKE_BUILD_TYPE=Release --fresh
if not %errorlevel% equ 0 exit /b %errorlevel%

rem Build a project
cmake --build build --config Release --target package --parallel
if not %errorlevel% equ 0 exit /b %errorlevel%

@hufrea
Copy link
Owner

hufrea commented Aug 6, 2024

Спасибо, но создание уст. пакетов не планируется, в CMake нет необходимости.

@raspopov
Copy link
Author

raspopov commented Aug 7, 2024

This is about usability. Most Windows users can't perform complex command line operations or find where in the system the proxy is configured. And let's not forget the older generation. Oh, and the existing Makefile doesn't create the resulting zip files. So, we're still creating "packages" manually.

Этот реквест про удобство использования. Типичный пользователь Windows не в состоянии выполнить замысловатые операции с командной строкой, или найти, где в системе настраивается прокси. Что уж говорить о старшем поколении... И, кстати, существующий Makefile не создаёт результирующие zip-файы, грубо говоря "пакеты" всё же создаются, но вручную.

@raspopov
Copy link
Author

raspopov commented Aug 7, 2024

BTW, with CMake, this great project can be opened with Qt Creator or any other IDE. 😎

@KDBal
Copy link

KDBal commented Aug 7, 2024

Most Windows users can't perform complex command line operations or find where in the system the proxy is configured. And let's not forget the older generation.

This makes more sense to be done as a separate project. Maybe even a GUI solution.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants