RetroShare/build_scripts/Windows-msys2/WindowsMSys2_InstallGuide.md

75 lines
2.1 KiB
Markdown
Raw Normal View History

## Compilation on Windows
2016-10-04 17:14:50 -04:00
The preferred build method on Windows is by using MSYS2 which is a collection
of packages providing unix-like tools to build native Windows software.
2016-10-04 17:14:50 -04:00
Requirements: about 12 GB of free space
2016-10-04 17:14:50 -04:00
The resulting binary is a 32-bit build of Retroshare which will also work
fine on a 64-bit system.
2016-10-04 17:14:50 -04:00
### MSYS2 INSTALLATION
2016-10-04 17:14:50 -04:00
Download MSYS2 from [MSYS2](http://www.msys2.org/). Get the i686 version
if you run a 32-bit Windows or the x86_64 if you run a 64-bit Windows.
2016-10-04 17:14:50 -04:00
Run the installer and install MSYS2.
2016-10-04 17:14:50 -04:00
At the end of the installation, it'll automatically open an MSYS shell terminal.
You can also find it on the start menu as MSYS2 MSYS. This is the shell you'll
use to install packages with pacman and do maintenance but NOT to build
RetroShare.
2016-10-04 17:14:50 -04:00
First, update your MSYS2 environment to the latest version by typing:
2016-10-04 17:14:50 -04:00
pacman -Syu
2016-10-04 17:14:50 -04:00
Close the terminal window.
2016-10-04 17:14:50 -04:00
Run MSYS2 MSYS again and finish updating with:
2016-10-04 17:14:50 -04:00
pacman -Su
2016-10-04 17:14:50 -04:00
Install the default programs needed to build:
2016-10-04 17:14:50 -04:00
2018-09-20 16:24:05 -04:00
pacman -S base-devel git wget p7zip gcc perl ruby python2 doxygen cmake
2016-10-04 17:14:50 -04:00
Install the 32-bit toolchain:
2016-10-04 17:14:50 -04:00
pacman -S mingw-w64-i686-toolchain
2016-10-04 17:14:50 -04:00
Install all needed dependencies:
2016-10-04 17:14:50 -04:00
pacman -S mingw-w64-i686-miniupnpc
pacman -S mingw-w64-i686-libmicrohttpd
pacman -S mingw-w64-i686-libxslt
pacman -S mingw-w64-i686-xapian-core
pacman -S mingw-w64-i686-sqlcipher
pacman -S mingw-w64-i686-qt5
pacman -S mingw32/mingw-w64-i686-cmake
2016-10-04 17:14:50 -04:00
We're done installing MSYS2, close the shell terminal.
2016-10-04 17:14:50 -04:00
### BUILDING RETROSHARE
2016-10-04 17:14:50 -04:00
Now run the MSYS2 MinGW 32-bit shell terminal (it's in the start menu).
We will use it to checkout Retroshare and build it:
2016-10-04 17:14:50 -04:00
git clone https://github.com/RetroShare/RetroShare.git
2016-10-04 17:14:50 -04:00
Go to the RetroShare directory and configure to your liking, for example:
cd RetroShare
qmake -r -Wall -spec win32-g++ "CONFIG+=debug" "CONFIG+=rs_autologin"
2016-10-04 17:14:50 -04:00
Now we're ready to build Retroshare. Use the '-j' option with the number of
cores you have for a faster build, for instance if you have 4 cores:
2016-10-04 17:14:50 -04:00
mingw32-make -j4
2016-10-04 17:14:50 -04:00
Make sure your current Retroshare is not running. Then just run:
2016-10-04 17:14:50 -04:00
retroshare-gui/src/debug/retroshare.exe
2016-10-04 17:14:50 -04:00
You'll get debug output in the terminal and a running Retroshare instance.