This file describes the steps necessary to build 64 bit version of Npackd (GUI, command line or both depending which CMakeLists.txt you use) using MSYS2. You can build the 32 bit version replacing the packages mentioned below with their 32 bit versions.
- Download and install VirtualBox from https://www.virtualbox.org/
- Choose "Virtual Box" on https://developer.microsoft.com/en-US/windows/downloads/virtual-machines/, download the virtual machine disk image, unzip the file.
- Start "Oracle VM VirtualBox Manager" choose "File", "Import appliance..." navigate to "WinDevXXXXEval.ova", use the default settings, press "Import"
- Edit the VM definition
- (optional) "General", "Extended", set "Common clipboard" to "bidirectional"
- (optional) "System", "Main memory", set to 8192 MB,
- (optional) "System", "Processor", set to 8 CPUs
- (optional) "Audio", "Extended", check "Audio output"
- (optional) "Mass storage", add optical drive
- "Tools", "Hard disks", "Properties", resize the disk in VirtualBox to 125 GiB
- (optional) install newest VirtualBox guest additions via the VM window menu "Devices", "Add VirtualBox guest additions"
- (optional) "View"/"Auto-resize guest display"
- (optional) change the password: "net user ieuser newpassword" as administrator, restart VM
- (optional) add a shared directory
- (optional, Windows 10) Start netplwiz, enable and disable password on login. Enter new password. Restart VM.
- (optional, Windows 11) "Settings", "Accounts", "Sign-in options", "Password", "Change". Enter an empty new password to disable password on login
- (optional) Start "Region & language" settings, change the language, restart the VM
- (optional) start diskmgmt.msc, extend the hard disk partition
- Start cmd.exe as administrator
msiexec.exe /qb- /i http://bit.ly/npackdcl64-1_26_9
set path=c:\Program Files\NpackdCL;%path%
ncl set-repo -u https://www.npackd.org/rep/zip?tag=libs -u https://www.npackd.org/rep/zip?tag=stable -u https://www.npackd.org/rep/zip?tag=stable64
ncl detect
ncl add -p com.googlecode.windows-package-manager.Npackd64 -p windows10debloater -p qt-creator64 -p vs-code64 -p com.microsoft.ProcessExplorer -p org.7-zip.SevenZIP64 -p nircmd64 -p com.advancedinstaller.AdvancedInstallerFreeware
ncl add -p astrogrep -p dbeaver64 -p drmemory -p firefox64 -p com.googlecode.gitextensions.GitExtensions -p kdiff3-64 -p com.lockhunter.LockHunter64 -p notepadpp64 -p org.cmake.CMake
mkdir c:\builds
ncl add -p quazip-dev-x86_64-w64_seh_posix_8.2-qt_5.12-static --file c:\Builds\quazip-dev-x86_64-w64_seh_posix_8.2-qt_5.12-static
- (optional) Start PowerShell as administrator
Set-ExecutionPolicy Unrestricted -Force
cd 'C:\Program Files\Windows10Debloater\'
.\Windows10DebloaterGUI.ps1
Click "Remove all Bloatware"
Click "Edge PDF/disable"
Click "Cortana/disable"
Click "Disable telemetry/tasks"
Click "Remove Bloatware regkeys"
ncl add -p msys2_64 --file c:\msys64
- Start c:\msys64\mingw64.exe A system restart after the first command may be necessary.
pacman -Syu --noconfirm
pacman -Su --noconfirm
pacman -S --noconfirm mingw-w64-x86_64-libtool mingw64/mingw-w64-x86_64-jasper mingw64/mingw-w64-x86_64-qt5 mingw64/mingw-w64-x86_64-icu mingw64/mingw-w64-x86_64-zstd mingw64/mingw-w64-x86_64-quazip
pacman -S --noconfirm mingw-w64-x86_64-ninja mingw64/mingw-w64-x86_64-zstd mingw-w64-x86_64-toolchain
- Start Git Extensions and configure "C:\Program Files\KDiff3\bin\kdiff3.exe" as diff and merge tool, [email protected] as the email and tim-lebedkov as user name. Clone https://github.com/tim-lebedkov/npackd-cpp.git to C:\Users\IEUser\Documents\npackd-cpp
set path=C:\msys64\mingw64\bin;C:\Program Files\CMake\bin
set CMAKE_PREFIX_PATH=C:\msys64\mingw64\x86_64-w64-mingw32
mkdir c:\builds\npackd-dyn-minsizerel
cd c:\builds\npackd-dyn-minsizerel
cmake C:\Users\User\Documents\npackd-cpp -G "Ninja" -DCMAKE_BUILD_TYPE=MinSizeRel -DNPACKD_FORCE_STATIC:BOOL=OFF -DQUAZIP_ROOT:PATH=C:\builds\quazip-dev-x86_64-w64_seh_posix_8.2-qt_5.12-static
ninja
- add "C/C++", "Doxygen Documentation Generator", "CMake Tools" extensions
- "CMake: Edit user-local CMake kits"
[{
"name": "GCC",
"compilers": {
"C": "C:\\msys64\\mingw64\\bin\\gcc.exe",
"CXX": "C:\\msys64\\mingw64\\bin\\g++.exe"
}
}]
- "CMake: configure"
- "CMake: Edit Cmake cache (UI)": change "NPACKD_FORCE_STATIC" to "OFF" and QuaZIP paths
- "CMake: build"
- add "C:\msys64\mingw64\bin" to PATH
- install "settings.json" and "keybindings.json" under "C:\Users\IEUser\AppData\Roaming\Code\User"
- (optional) Start Qt Creator as administrator
- "File"/"Manage sessions"/"Reload session on startup"
- "File"/"Open file or project"/"CMakeLists.txt"
- "Projects"/"Import existing build" in Qt creator, choose "C:\builds\npackd-dyn-minsizerel"
- Define the C++ compiler
The best results can be achieved with Very Sleepy performance profiler:
ncl add -p very-sleepy
You can also use GProf for performance profiling:
set path=C:\msys64\mingw64\bin;C:\Program Files\CMake\bin
set CMAKE_PREFIX_PATH=C:\msys64\mingw64\x86_64-w64-mingw32;C:\Builds\quazip-dev-x86_64-w64_seh_posix_8.2-qt_5.12-static
mkdir c:\builds\npackd-dyn-minsizerel
cd c:\builds\npackd-dyn-minsizerel
cmake C:\Users\IEUser\Documents\npackd-cpp -DCMAKE_CXX_FLAGS=-pg -DCMAKE_EXE_LINKER_FLAGS=-pg -DCMAKE_SHARED_LINKER_FLAGS=-pg -G "Ninja" -DCMAKE_BUILD_TYPE=MinSizeRel -DNPACKD_FORCE_STATIC:BOOL=OFF
npackdcl detect
gprof npackdcl.exe gmon.out > analysis.txt