Skip to content

Commit

Permalink
Windows build fixes (MintcoinCommunity#108)
Browse files Browse the repository at this point in the history
Change to Xenial for Ubuntu builds.

Fixes Windows cross-build.

Update macOS builds to latest Xcode stuff.
  • Loading branch information
shane-kerr authored and EuroCentiem-dev committed Nov 1, 2023
1 parent 0495de7 commit 6f409a6
Show file tree
Hide file tree
Showing 7 changed files with 60 additions and 8 deletions.
36 changes: 33 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,30 @@ matrix:
- sudo apt-get install -y libboost-all-dev:i386 libboost-mpi-dev:i386 libboost-mpi-python-dev:i386 libboost-python-dev:i386 libboost-python1.58-dev:i386 python:i386
script: cd src && make -f makefile.unix -j2 STATIC="all" LDFLAGS="-static"

# Build mintcoind
# OS X 10.11 (El Capitan)
- os: osx
osx_image: xcode8
script: cd src && make -f makefile.osx -j2

# Build mintcoind static
# OS X 10.11 (El Capitan)
- os: osx
osx_image: xcode8
script: cd src && make -f makefile.osx -j2 STATIC="all" LDFLAGS="-static"

# Build mintcoind
# macOS 10.12 (Sierra)
- os: osx
osx_image: xcode9.2
script: cd src && make -f makefile.osx -j2

# Build mintcoind static
# macOS 10.12 (Sierra)
- os: osx
osx_image: xcode9.2
script: cd src && make -f makefile.osx -j2 STATIC="all" LDFLAGS="-static"

# Build mintcoind
# macOS 10.13 (High Sierra)
- os: osx
Expand Down Expand Up @@ -195,11 +219,17 @@ matrix:
sudo: required
script: bash src/mxe-build.sh windows64-qt

# Build MintCoin-Qt
# macOS 10.12 (Sierra)
- os: osx
osx_image: xcode9
script: brew install qrencode qt && /usr/local/opt/qt/bin/qmake && make -j2

# Build MintCoin-Qt
# macOS 10.13 (High Sierra)
#- os: osx
# osx_image: xcode10.1
# script: brew install qrencode qt && /usr/local/opt/qt/bin/qmake && make -j2
- os: osx
osx_image: xcode10.1
script: brew install qrencode qt && /usr/local/opt/qt/bin/qmake && make -j2

# Build MintCoin-Qt
# macOS 10.14 (Mojave)
Expand Down
2 changes: 1 addition & 1 deletion mintcoin-qt.pro
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ else {
QMAKE_CFLAGS += -msse2
}

QMAKE_CXXFLAGS_WARN_ON = -fdiagnostics-show-option -Wall -Wextra -Wformat -Wformat-security -Wno-unused-parameter -Wstack-protector
QMAKE_CXXFLAGS_WARN_ON = -fdiagnostics-show-option -std=c++11 -Wall -Wextra -Wformat -Wformat-security -Wno-unused-parameter -Wstack-protector

# Input
DEPENDPATH += src src/json src/qt
Expand Down
12 changes: 12 additions & 0 deletions src/bignum.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,18 @@

#include <stdexcept>
#include <vector>

#ifdef _WINDOWS
#include <winsock2.h>
#include <windows.h>
#undef X509_NAME
#undef X509_EXTENSIONS
#undef X509_CERT_PAIR
#undef PKCS7_ISSUER_AND_SERIAL
#undef OCSP_REQUEST
#undef OCSP_RESPONSE
#endif // _WINDOWS

#include <openssl/bn.h>

#include "util.h" // for uint64
Expand Down
10 changes: 10 additions & 0 deletions src/key.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,16 @@
#include "uint256.h"
#include "hash.h"

#ifdef _WINDOWS
#include <windows.h>
#undef X509_NAME
#undef X509_EXTENSIONS
#undef X509_CERT_PAIR
#undef PKCS7_ISSUER_AND_SERIAL
#undef OCSP_REQUEST
#undef OCSP_RESPONSE
#endif // _WINDOWS

#include <openssl/ec.h> // for EC_KEY definition

// secp160k1
Expand Down
2 changes: 1 addition & 1 deletion src/leveldb/include/leveldb/status.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
#ifndef STORAGE_LEVELDB_INCLUDE_STATUS_H_
#define STORAGE_LEVELDB_INCLUDE_STATUS_H_

#include <string>
#include <string.h>
#include "leveldb/slice.h"

namespace leveldb {
Expand Down
2 changes: 1 addition & 1 deletion src/makefile.unix
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ DEBUGFLAGS=-g

# CXXFLAGS can be specified on the make command line, so we use xCXXFLAGS that only
# adds some defaults in front. Unfortunately, CXXFLAGS=... $(CXXFLAGS) does not work.
xCXXFLAGS=-O2 -pthread -Wall -Wextra -Wformat -Wformat-security -Wno-unused-parameter \
xCXXFLAGS=-O2 -pthread -std=c++11 -Wall -Wextra -Wformat -Wformat-security -Wno-unused-parameter -Werror \
$(DEBUGFLAGS) $(DEFS) $(HARDENING) $(CXXFLAGS)

# If we have an ARM CPU, we can't use SSE2, so define as thumb.
Expand Down
4 changes: 2 additions & 2 deletions src/mxe-build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,10 @@ fi
# Add the MXE package repository.
sudo apt-get update

echo "deb http://pkg.mxe.cc/repos/apt/debian wheezy main" \
echo "deb https://pkg.mxe.cc/repos/apt xenial main" \
| sudo tee /etc/apt/sources.list.d/mxeapt.list
sudo apt-key adv --keyserver keyserver.ubuntu.com \
--recv-keys D43A795B73B16ABE9643FE1AFD8FFF16DB45C6AB
--recv-keys C6BF758A33A3A276

sudo apt-get update

Expand Down

0 comments on commit 6f409a6

Please sign in to comment.