mingw support for linux->windows cross compilation
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -7,6 +7,7 @@ x64/
|
||||
src/precompiled.h.cpp
|
||||
.qmake.stash
|
||||
zec-qt-wallet
|
||||
zec-qt-wallet-mingw*
|
||||
zec-qt-wallet.vcxproj*
|
||||
zec-qt-wallet.sln
|
||||
zec-qt-wallet.pro.user
|
||||
|
||||
@@ -421,7 +421,7 @@ void RPC::refreshReceivedZTrans(QList<QString> zaddrs) {
|
||||
}
|
||||
|
||||
auto amount = i["amount"].get<json::number_float_t>();
|
||||
auto confirmations = txidInfo["confirmations"].get<json::number_unsigned_t>();
|
||||
auto confirmations = (unsigned long)txidInfo["confirmations"].get<json::number_unsigned_t>();
|
||||
|
||||
TransactionItem tx{ QString("receive"), timestamp, zaddr, txid, amount,
|
||||
confirmations, "", memos.value(zaddr + txid, "") };
|
||||
@@ -617,11 +617,11 @@ void RPC::refreshTransactions() {
|
||||
|
||||
TransactionItem tx{
|
||||
QString::fromStdString(it["category"]),
|
||||
it["time"].get<json::number_unsigned_t>(),
|
||||
(unsigned long)it["time"].get<json::number_unsigned_t>(),
|
||||
(it["address"].is_null() ? "" : QString::fromStdString(it["address"])),
|
||||
QString::fromStdString(it["txid"]),
|
||||
it["amount"].get<json::number_float_t>() + fee,
|
||||
it["confirmations"].get<json::number_unsigned_t>(),
|
||||
(unsigned long)it["confirmations"].get<json::number_unsigned_t>(),
|
||||
"", "" };
|
||||
|
||||
txdata.push_back(tx);
|
||||
|
||||
41
src/scripts/mkmingw.sh
Executable file
41
src/scripts/mkmingw.sh
Executable file
@@ -0,0 +1,41 @@
|
||||
#!/bin/bash
|
||||
|
||||
if [ -z $APP_VERSION ]; then echo "APP_VERSION is not set"; exit 1; fi
|
||||
|
||||
|
||||
export PATH=$MXE_PATH:$PATH
|
||||
|
||||
echo -n "Configuring..."
|
||||
make distclean > /dev/null
|
||||
rm -f zec-qt-wallet-mingw.pro
|
||||
rm -rf release/
|
||||
#Mingw seems to have trouble with precompiled heades, so strip that option from the .pro file
|
||||
cat zec-qt-wallet.pro | sed "s/precompile_header/release/g" | sed "s/PRECOMPILED_HEADER.*//g" > zec-qt-wallet-mingw.pro
|
||||
echo "[OK]"
|
||||
|
||||
|
||||
echo -n "Building......"
|
||||
x86_64-w64-mingw32.static-qmake-qt5 zec-qt-wallet-mingw.pro CONFIG+=release > /dev/null
|
||||
make -j32 > /dev/null
|
||||
echo "[OK]"
|
||||
|
||||
|
||||
echo -n "Packaging....."
|
||||
mkdir release/zec-qt-wallet-v$APP_VERSION
|
||||
cp release/zec-qt-wallet.exe release/zec-qt-wallet-v$APP_VERSION
|
||||
cp README.md release/zec-qt-wallet-v$APP_VERSION
|
||||
cp LICENSE release/zec-qt-wallet-v$APP_VERSION
|
||||
cd release && zip -r Windows-zec-qt-wallet-v$APP_VERSION.zip zec-qt-wallet-v$APP_VERSION/ > /dev/null
|
||||
cd ..
|
||||
|
||||
|
||||
if [ -f release/Windows-zec-qt-wallet-v$APP_VERSION.zip ] ; then
|
||||
echo "[OK]"
|
||||
|
||||
echo "Done. Build is release/Windows-zec-qt-wallet-v$APP_VERSION.zip"
|
||||
echo "Package contents:"
|
||||
unzip -l "release/Windows-zec-qt-wallet-v$APP_VERSION.zip"
|
||||
else
|
||||
echo "[ERROR]"
|
||||
exit 1
|
||||
fi
|
||||
Reference in New Issue
Block a user