2018-02-19 09:17:59 -05:00
|
|
|
## Compilation on Windows
|
2016-10-04 17:14:50 -04:00
|
|
|
|
2018-08-03 09:15:17 -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
|
|
|
|
2018-08-03 09:15:17 -04:00
|
|
|
Requirements: about 12 GB of free space
|
2016-10-04 17:14:50 -04:00
|
|
|
|
2018-08-03 09:15:17 -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
|
|
|
|
2020-04-26 05:57:20 -04:00
|
|
|
**If you want to make complet solution without debugging it, prefer to use \build_scripts\Windows-msys2\build.bat**
|
|
|
|
|
|
|
|
This batch will install and build all for you.
|
|
|
|
|
|
|
|
You only have to clone this repository (with [git for windows](https://gitforwindows.org/)) to a local folder, then start it in a terminal.
|
|
|
|
|
|
|
|
At the end, you'll get at ..\\*-msys2\deploy\ the Portable 7zip file.
|
|
|
|
|
|
|
|
### MSYS2 INSTALLATION (for editing or debugging)
|
2016-10-04 17:14:50 -04:00
|
|
|
|
2018-08-03 09:15:17 -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
|
|
|
|
2018-08-03 09:15:17 -04:00
|
|
|
Run the installer and install MSYS2.
|
2016-10-04 17:14:50 -04:00
|
|
|
|
2018-08-03 09:15:17 -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
|
|
|
|
2018-08-03 09:15:17 -04:00
|
|
|
First, update your MSYS2 environment to the latest version by typing:
|
2016-10-04 17:14:50 -04:00
|
|
|
|
2018-08-03 09:15:17 -04:00
|
|
|
pacman -Syu
|
2016-10-04 17:14:50 -04:00
|
|
|
|
2018-08-03 09:15:17 -04:00
|
|
|
Close the terminal window.
|
2016-10-04 17:14:50 -04:00
|
|
|
|
2018-08-03 09:15:17 -04:00
|
|
|
Run MSYS2 MSYS again and finish updating with:
|
2016-10-04 17:14:50 -04:00
|
|
|
|
2018-08-03 09:15:17 -04:00
|
|
|
pacman -Su
|
2016-10-04 17:14:50 -04:00
|
|
|
|
2018-08-03 09:15:17 -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
|
|
|
|
2018-08-03 09:15:17 -04:00
|
|
|
Install the 32-bit toolchain:
|
2016-10-04 17:14:50 -04:00
|
|
|
|
2018-08-03 09:15:17 -04:00
|
|
|
pacman -S mingw-w64-i686-toolchain
|
2016-10-04 17:14:50 -04:00
|
|
|
|
2018-08-03 09:15:17 -04:00
|
|
|
Install all needed dependencies:
|
2016-10-04 17:14:50 -04:00
|
|
|
|
2018-08-03 09:15:17 -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
|
2019-05-12 12:30:30 -04:00
|
|
|
pacman -S mingw32/mingw-w64-i686-cmake
|
2019-11-30 10:11:25 -05:00
|
|
|
pacman -S mingw-w64-i686-rapidjson
|
2016-10-04 17:14:50 -04:00
|
|
|
|
2020-04-26 05:57:20 -04:00
|
|
|
If you want to use QtCreator as IDE, prefer using this one publish by MSYS2 as all build Kit are already setted.
|
|
|
|
|
|
|
|
pacman -S mingw-w64-i686-qt-creator
|
|
|
|
*You can start it from MSYS2 terminal.*
|
|
|
|
|
|
|
|
|
2018-08-03 09:15:17 -04:00
|
|
|
We're done installing MSYS2, close the shell terminal.
|
2016-10-04 17:14:50 -04:00
|
|
|
|
2018-08-03 09:15:17 -04:00
|
|
|
### BUILDING RETROSHARE
|
2016-10-04 17:14:50 -04:00
|
|
|
|
2018-08-03 09:15:17 -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
|
|
|
|
2018-08-03 09:15:17 -04:00
|
|
|
git clone https://github.com/RetroShare/RetroShare.git
|
2016-10-04 17:14:50 -04:00
|
|
|
|
2018-08-03 09:15:17 -04:00
|
|
|
Go to the RetroShare directory and configure to your liking, for example:
|
|
|
|
|
|
|
|
cd RetroShare
|
2018-08-03 15:29:00 -04:00
|
|
|
qmake -r -Wall -spec win32-g++ "CONFIG+=debug" "CONFIG+=rs_autologin"
|
2016-10-04 17:14:50 -04:00
|
|
|
|
2018-08-03 09:15:17 -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
|
|
|
|
2018-08-03 09:15:17 -04:00
|
|
|
mingw32-make -j4
|
2016-10-04 17:14:50 -04:00
|
|
|
|
2018-08-03 09:15:17 -04:00
|
|
|
Make sure your current Retroshare is not running. Then just run:
|
2016-10-04 17:14:50 -04:00
|
|
|
|
2018-08-03 09:15:17 -04:00
|
|
|
retroshare-gui/src/debug/retroshare.exe
|
2016-10-04 17:14:50 -04:00
|
|
|
|
2018-08-03 09:15:17 -04:00
|
|
|
You'll get debug output in the terminal and a running Retroshare instance.
|