From ad67daa3ee224edfd4a39f52c93f0c1815c9c2bd Mon Sep 17 00:00:00 2001 From: BlackAngelTV Date: Mon, 24 Aug 2026 21:56:34 +0200 Subject: [PATCH] build: add Windows build script and clean gitignore --- .gitignore | 23 +++++++++++++++++++ build_windows.bat | 57 +++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 80 insertions(+) create mode 100644 build_windows.bat diff --git a/.gitignore b/.gitignore index 6bc160a..bb5e3b6 100644 --- a/.gitignore +++ b/.gitignore @@ -1,16 +1,39 @@ +# Build directories build/ +build_windows/ .cache/ + +# Compiled objects *.o +*.obj *.so +*.dll *.a +*.lib *.dylib +*.exe + +# CMake CMakeCache.txt CMakeFiles/ cmake_install.cmake Makefile compile_commands.json +_deps/ +Testing/ + +# IDE .vscode/ .idea/ *.swp *~ +*.user +*.suo + +# OS .DS_Store +Thumbs.db +desktop.ini + +# Freebuff +.freebuff/ diff --git a/build_windows.bat b/build_windows.bat new file mode 100644 index 0000000..e48b1ba --- /dev/null +++ b/build_windows.bat @@ -0,0 +1,57 @@ +@echo off +echo ============================================ +echo PackageMapper - Build Windows +echo ============================================ +echo. + +set MSYS2=C:\msys64 +set MINGW=%MSYS2%\mingw64\bin +set MSYS2_SHELL=%MSYS2%\msys2_shell.cmd + +if not exist "%MINGW%\gcc.exe" ( + echo [ERREUR] gcc non trouve dans %MINGW% + echo Installez les packages MSYS2 : + echo pacman -S mingw-w64-x86_64-gcc mingw-w64-x86_64-cmake mingw-w64-x86_64-qt6-base make + pause + exit /b 1 +) + +echo [1/4] Configuration CMake... +mkdir build_windows 2>nul +cd build_windows + +"%MINGW%\cmake.exe" .. -G "MinGW Makefiles" -DCMAKE_BUILD_TYPE=Release +if errorlevel 1 ( + echo [ERREUR] CMake a echoue + pause + exit /b 1 +) + +echo. +echo [2/4] Compilation... +"%MINGW%\mingw32-make.exe" -j%NUMBER_OF_PROCESSORS% +if errorlevel 1 ( + echo [ERREUR] Compilation echouee + pause + exit /b 1 +) + +echo. +echo [3/4] Copie des DLLs... +"%MSYS2_SHELL%" -defterm -no-start -mingw64 -c "cd /e/dev/gestionnaire/build_windows && ldd PackageManager.exe 2>/dev/null | grep 'mingw64' | awk '{print $3}' | while read dll; do cp \"$dll\" . 2>/dev/null; done" + +echo. +echo [4/4] Copie des DLLs des plugins... +"%MSYS2_SHELL%" -defterm -no-start -mingw64 -c "cd /e/dev/gestionnaire/build_windows && for plugin in plugins/*/*.dll; do ldd \"$plugin\" 2>/dev/null | grep 'mingw64' | awk '{print $3}' | while read dll; do cp \"$dll\" . 2>/dev/null; done; done" + +echo. +echo ============================================ +echo BUILD REUSSI ! +echo Executable : build_windows\PackageManager.exe +echo ============================================ +echo. +echo Pour lancer : +echo cd build_windows +echo PackageManager.exe +echo. +pause