From a4ed36e3c4871a81161cda273f875fbb2bfa5de6 Mon Sep 17 00:00:00 2001 From: ca333 Date: Mon, 4 Mar 2019 00:18:45 +0100 Subject: [PATCH] windowsify rogue build (#1310) * update rogue makefile * update roguelib libs * update rogue makefile * update rogue libs * add ncurses * add rogue WIN artifacts --- .gitlab-ci.yml | 5 +++++ src/cc/Makefile_rogue | 2 +- src/cc/makerogue | 6 ++---- src/cc/rogue/Makefile_win | 4 ++-- 4 files changed, 10 insertions(+), 7 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index a9fb7a01b..fab986211 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -71,6 +71,10 @@ build:windows: - cp src/komodod.exe src/komodo-cli.exe src/komodo-tx.exe + src/cc/rogue/rogue.exe + zcutil/fetch-params.bat + src/cc/rogue/x86_64-w64-mingw32/libcurl-4.dll + src/cc/rogue/x86_64-w64-mingw32/libncursesw6.dll ${PACKAGE_DIR_WINDOWS} - zip -r ${PACKAGE_DIR_WINDOWS}.zip ${PACKAGE_DIR_WINDOWS} - md5sum ${AGAMA_ARTIFACTS_WINDOWS} > ${AGAMA_ARTIFACTS_WINDOWS_CHECKSUM} @@ -91,6 +95,7 @@ build:macos: key: "${CI_JOB_NAME}${CI_COMMIT_REF_NAME}" paths: - depends/built + allow_failure: true script: - zcutil/build-mac.sh -j$(sysctl -n hw.physicalcpu) - ./makeRelease.sh ${PACKAGE_DIR_MACOS} diff --git a/src/cc/Makefile_rogue b/src/cc/Makefile_rogue index a7c60f724..baf8767aa 100644 --- a/src/cc/Makefile_rogue +++ b/src/cc/Makefile_rogue @@ -4,7 +4,7 @@ CC_DARWIN = g++-6 CC_WIN = x86_64-w64-mingw32-gcc-posix CFLAGS_DARWIN = -DBUILD_ROGUE -std=c++11 -arch x86_64 -I../../depends/$(shell echo `../..//depends/config.guess`/include) -I../univalue/include -I../cryptoconditions/include -I../cryptoconditions/src -I../cryptoconditions/src/asn -I.. -I. -fPIC -Wl,-undefined -Wl,dynamic_lookup -Wno-write-strings -shared -dynamiclib CFLAGS = -Wno-write-strings -DBUILD_ROGUE -std=c++11 -I../../depends/$(shell echo `../..//depends/config.guess`/include) -I../univalue/include -I../cryptoconditions/include -I../cryptoconditions/src -I../cryptoconditions/src/asn -I.. -I. -fPIC -shared -CFLAGS_WIN = -Wno-write-strings -DBUILD_ROGUE -std=c++11 -I../../depends/x86_64-w64-mingw32/include -I../univalue/include -I../cryptoconditions/include -I../cryptoconditions/src -I../cryptoconditions/src/asn -I.. -I. -fPIC -shared +CFLAGS_WIN = -Wno-write-strings -DBUILD_ROGUE -std=c++11 -I./rogue/x86_64-w64-mingw32/include -I./rogue/x86_64-w64-mingw32/include/ncursesw -I../univalue/include -I../cryptoconditions/include -I../cryptoconditions/src -I../cryptoconditions/src/asn -I.. -I. -fPIC -shared DEBUGFLAGS = -O0 -D _DEBUG RELEASEFLAGS = -O2 -D NDEBUG -combine -fwhole-program $(info $(OS)) diff --git a/src/cc/makerogue b/src/cc/makerogue index f1f1452c0..ff16cbb16 100755 --- a/src/cc/makerogue +++ b/src/cc/makerogue @@ -5,12 +5,10 @@ make clean; if [ "$HOST" = "x86_64-w64-mingw32" ]; then echo building rogue.exe... ./configure --host=x86_64-w64-mingw32 - mkdir ncurses && cd ncurses echo $PWD - wget https://invisible-island.net/datafiles/release/mingw32.zip - unzip mingw32.zip && rm mingw32.zip + wget https://github.com/KomodoPlatform/rogue/releases/download/0.3.3b-01/x86_64-w64-mingw32.tar.gz + tar xvfz x86_64-w64-mingw32.tar.gz && rm x86_64-w64-mingw32.tar.gz echo lib archive cleaned - cd .. echo $PWD if make -f Makefile_win "$@"; then echo rogue.exe build SUCCESSFUL diff --git a/src/cc/rogue/Makefile_win b/src/cc/rogue/Makefile_win index 6e558960c..e5a36d9b4 100644 --- a/src/cc/rogue/Makefile_win +++ b/src/cc/rogue/Makefile_win @@ -26,10 +26,10 @@ O=o CC = x86_64-w64-mingw32-gcc #CFLAGS=-O2 -CFLAGS= -g -O2 -I./ncurses/include -I./ncurses/include/ncursesw -I../../../depends/x86_64-w64-mingw32/include +CFLAGS= -g -O2 -I./x86_64-w64-mingw32/include -I./x86_64-w64-mingw32/include/ncursesw #LIBS=-lcurses -LIBS = -L./ncurses/lib -lncursesw -lcurl +LIBS = -L./x86_64-w64-mingw32/lib -lncursesw -lcurl #RM=rm -f RM = rm -f