The msvc
directory contains what is needed to build the project. Read the file
msvc/README, which explains how.
You will need to download the library files from Microsoft as indicated. If you don't want to do this, see the alternative in msvc/ucrt.
LLVM-MinGW is a simple toolchain based on the modern CLANG compiler. It produces smaller executables than GCC and does not need to be installed.
Download the toolchain from https://github.com/mstorsjo/llvm-mingw/releases.
Choose the file llvm-mingw-<version>-ucrt-x86_64.zip
and extract its contents to a
folder, for example C:\llvm-mingw
.
Open a command prompt and run the following commands:
path=C:\llvm-mingw\bin;%path%
cd /d %USERPROFILE%\Desktop\superUser &rem (or wherever you put the source to)
mingw32-make
If successful, the files superUser32.exe
and superUser64.exe
are created.
The generated executables require the UCRT dll to run (included in Windows 10 or installed by the cumulative updates in older versions).
MSYS2 is a complete environment for building, installing and running native Windows software. It uses a Linux-like shell and tools.
Run the installer following these instructions: https://www.msys2.org
Do NOT install the packages *ucrt*
indicated in the "Installation" procedure.
In the MSYS2 UCRT64 terminal, run:
pacman -S make
pacman -S mingw-w64-i686-gcc
pacman -S mingw-w64-x86_64-gcc
Run the following command several times until all the packages are up-to-date: (read the beginning of this page for details: https://www.msys2.org/docs/updating/ )
pacman -Suy
When done, close the MSYS2 UCRT64 terminal.
To build the 64-bit executable, open the MSYS2 MINGW64 terminal and run:
cd /c/Users/$USER/Desktop/superUser # (or wherever you put the source to)
make
If successful, the file superUser64.exe
is created.
To build the 32-bit executable, open the MSYS2 MINGW32 terminal and run:
cd /c/Users/$USER/Desktop/superUser # (or wherever you put the source to)
make
If successful, the file superUser32.exe
is created.
It is also possible to use the CLANG64 environment, which have a newer
compiler that builds smaller executables (24 KB instead of 27 KB).
To do this, you will need to install the appropriate package as above
(mingw-w64-clang-x86_64-gcc-compat
).
The generated executables require the UCRT dll to run (included in Windows 10 or
installed by the cumulative updates in older versions).
Run the Cygwin installer, available from https://www.cygwin.com/setup-x86_64.exe. When you get to the package selection page, select "Category" in the list "View" at the top left, and expand the tree by clicking on "All" and "Devel".
Then choose the following packages (you can use the search box to reduce the list), by selecting the version to install in the column "New":
- make
- mingw64-i686-binutils
- mingw64-i686-gcc-core
- mingw64-x86_64-binutils
- mingw64-x86_64-gcc-core
Open a Cygwin terminal and run the following commands:
cd /cygdrive/c/Users/$USER/Desktop/superUser # (or wherever you put the source to)
make
If successful, the files superUser32.exe
and superUser64.exe
are created.
To build on Linux, native executables running on Windows.
Tested on Linux Mint based on Ubuntu.
Install the gcc-mingw-w64
package:
sudo apt install gcc-mingw-w64
Open a terminal and run the following commands:
cd $HOME/Desktop/superUser # (or wherever you put the source to)
make
If successful, the files superUser32.exe
and superUser64.exe
are created.