aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRiccardo Spagni <ric@spagni.net>2016-10-24 10:39:53 +0200
committerRiccardo Spagni <ric@spagni.net>2016-10-24 10:39:53 +0200
commit8ff3ab2dc5ab19f9af52d03ac42646addb2502e8 (patch)
tree5ebf08021070cda31522b1e6fd57ce1e42d5f593
parent63f24ff41031a7c0d62bb842d631f1226e47e394 (diff)
parent538710f21b900538d799d477acb21926e0921a85 (diff)
downloadmonzero-gui-8ff3ab2dc5ab19f9af52d03ac42646addb2502e8.tar.gz
monzero-gui-8ff3ab2dc5ab19f9af52d03ac42646addb2502e8.tar.xz
monzero-gui-8ff3ab2dc5ab19f9af52d03ac42646addb2502e8.zip
Merge pull request #81
538710f build-win: mingw-x86: windeploy_helper.sh not needed anymore (Ilya Kitaev) 0a16d74 build-win: mingw-x86: updated doc and project file (Ilya Kitaev)
-rw-r--r--README.md58
-rw-r--r--monero-core.pro36
2 files changed, 57 insertions, 37 deletions
diff --git a/README.md b/README.md
index 42c38b1f..d98e937b 100644
--- a/README.md
+++ b/README.md
@@ -143,45 +143,53 @@ TODO
### On Windows:
1. Install [msys2](http://msys2.github.io/), follow the instructions on that page on how to update packages to the latest versions
-2. Install monero dependencies as described in [monero documentation](https://github.com/monero-project/monero)
-3. Install git:
+2. Install monero dependencies as described in [monero documentation](https://github.com/monero-project/monero) into msys2 environment.
+ **As we only build application for x86, install only dependencies for x86 architecture (i686 in package name)**
+
+3. Install git into msys2 environment:
```
pacman -S git
```
-4. Install Qt5:
- - if you need to build x86 application, install:
-
- ```
- pacman -S mingw-w64-i686-qt5
- ```
- - if you need to build x64 application, install:
+4. Install Qt5 from [official site](https://www.qt.io/download-open-source/).
+ - download unified installer, run and select following options:
+ - Qt > Qt 5.7 > MinGW 5.3.0 32 bit
+ - Tools > MinGW 5.3.0
+ - continue with installation
- ```
- pacman -S mingw-w64-x86_64-qt5
- ```
-5. Open ```mingw``` shell. MSYS2 will install start menu items for both mingw32 and mingw64 environments, so
- you need to open appropriate one:
- ```%MSYS_ROOT%\msys2_shell.cmd -mingw32``` for x86 targed
- or
- ```%MSYS_ROOT%\msys2_shell.cmd -mingw64``` for x64 targed
+5. Open ```mingw``` shell:
+ ```%MSYS_ROOT%\msys2_shell.cmd -mingw32```
+
Where ```%MSYS_ROOT%``` will be ```c:\msys32``` if your host OS is x86-based or ```c:\msys64``` if your host OS
is x64-based
-6. Clone git repository:
+
+6. Clone repository:
```
git clone https://github.com/monero-project/monero-core.git
```
-7. Build the project:
+7. Build libwallet:
```
cd monero-core
- ./build.sh
+ ./get_libwallet_api.sh
```
-8. Take result binary and dependencies in ```./build/release/bin```
+ close ```mingw``` shell after it done
+
+8. Build application:
+
+ - open ```Qt environment``` shell (Qt 5.7 for Desktop (MinGW 5.3.0 32 bit) is shortcut name)
+ - navigate to the project dir and build the app:
+ ```
+ cd %MSYS_ROOT%\%USERNAME%\monero-core
+ mkdir build
+ cd build
+ qmake ..\ -r "CONFIG+=release"
+ mingw32-make release
+ mingw32-make deploy
+ ```
+ - grab result binary and dependencies in ```.\release\bin```
+
+
- **important: if you testing application within VirtualBox virtual machine, make sure 3D acceleration is enabled
- in machine's settings:
- Machine > Settings > Display > [v] Enable 3D Acceleration**
-
diff --git a/monero-core.pro b/monero-core.pro
index 3121f109..8c446290 100644
--- a/monero-core.pro
+++ b/monero-core.pro
@@ -54,8 +54,31 @@ LIBS += -L$$WALLET_ROOT/lib \
-lwallet_merged \
-lunbound
+
+# currently we only support x86 build as qt.io only provides prebuilt qt for x86 mingw
+
win32 {
- #QMAKE_LFLAGS += -static
+
+ contains(QMAKE_HOST.arch, x86_64) {
+ message("Host is 64bit")
+ MSYS_PATH=c:/msys64/mingw32
+ } else {
+ message("Host is 32bit")
+ MSYS_PATH=c:/msys32/mingw32
+ }
+
+ !contains(QMAKE_TARGET.arch, x86_64) {
+ message("Target is 32bit")
+ ## Windows x86 (32bit) specific build here
+ ## there's 2Mb stack in libwallet allocated internally, so we set stack=4Mb
+ ## this fixes app crash for x86 Windows build
+ QMAKE_LFLAGS += -Wl,--stack,4194304
+ } else {
+ message("Target is 64bit")
+ }
+
+ LIBS+=-L$$MSYS_PATH/lib
+
LIBS+= \
-Wl,-Bstatic \
-lboost_serialization-mt \
@@ -75,16 +98,6 @@ win32 {
-lgdi32
- !contains(QMAKE_TARGET.arch, x86_64) {
- message("x86 build")
- ## Windows x86 (32bit) specific build here
- ## there's 2Mb stack in libwallet allocated internally
- ## this fixes app crash for x86 Windows build
- QMAKE_LFLAGS += -Wl,--stack,4194304
- } else {
- message("x64 build")
- }
-
}
@@ -208,7 +221,6 @@ macx {
win32 {
deploy.commands += windeployqt $$sprintf("%1/%2/%3.exe", $$OUT_PWD, $$DESTDIR, $$TARGET) -release -qmldir=$$PWD
- deploy.commands += $$escape_expand(\n\t) $$PWD/windeploy_helper.sh $$DESTDIR
}