build: add Windows build script and clean gitignore
This commit is contained in:
1 parent
a7f8893bf2
commit
ad67daa3ee
2 files changed
+80
No files matched your search
@@ -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
|
||||
Reference in new issue
Block a user