Skip to content

Commit

Permalink
Merge pull request spesmilo#4 from pknight007/master
Browse files Browse the repository at this point in the history
Vertcoin exchange rate (fixes spesmilo#3). Creating binaries.
  • Loading branch information
metalicjames committed May 15, 2017
2 parents a3fd68d + b1c1947 commit 8b289a6
Show file tree
Hide file tree
Showing 10 changed files with 227 additions and 192 deletions.
12 changes: 11 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ dist/
*.egg/
/electrum.py
contrib/pyinstaller/
Electrum_LTC.egg-info/
Electrum_VTC.egg-info/
gui/qt/icons_rc.py
locale/
.devlocaltmp/
Expand All @@ -16,3 +16,13 @@ env/
.tox/
.buildozer/
bin/
contrib/dns/
contrib/ecdsa/
contrib/jsonrpclib/
contrib/pyaes/
contrib/qrcode/
contrib/socks.py
contrib/sockshandler.py
contrib/pbkdf2.py
contrib/build-wine/tmp/
.vscode/settings.json
6 changes: 3 additions & 3 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
include LICENCE RELEASE-NOTES AUTHORS
include README.rst
include electrum-ltc.conf.sample
include electrum-ltc.desktop
include electrum-vtc.conf.sample
include electrum-vtc.desktop
include *.py
include electrum-ltc
include electrum-vtc
recursive-include lib *.py
recursive-include gui *.py
recursive-include plugins *.py
Expand Down
3 changes: 3 additions & 0 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,9 @@ To create binaries, create the 'packages' directory::
./contrib/make_packages

This directory contains the python dependencies used by Electrum.
If you get ImportErrors, this is because the modules aren't installed or
are installed compressed. unzipping the modules to the contrib folder should
fix the errors (refer to the contrib/* lines in .gitignore)

Mac OS X
--------
Expand Down
14 changes: 7 additions & 7 deletions contrib/build-wine/electrum.nsi
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
;--------------------------------
;Variables

!define PRODUCT_NAME "Electrum-LTC"
!define PRODUCT_WEB_SITE "https://github.com/pooler/electrum-ltc"
!define PRODUCT_NAME "Electrum-VTC"
!define PRODUCT_WEB_SITE "https://github.com/vertcoin/electrum-vtc"
!define PRODUCT_PUBLISHER "Electrum Technologies GmbH"
!define PRODUCT_UNINST_KEY "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PRODUCT_NAME}"

Expand All @@ -16,7 +16,7 @@

;Name and file
Name "${PRODUCT_NAME}"
OutFile "dist/electrum-ltc-setup.exe"
OutFile "dist/electrum-vtc-setup.exe"

;Default installation folder
InstallDir "$PROGRAMFILES\${PRODUCT_NAME}"
Expand Down Expand Up @@ -110,7 +110,7 @@ Section
Delete "$SMPROGRAMS\${PRODUCT_NAME}\*.*"

;Files to pack into the installer
File /r "dist\electrum-ltc\*.*"
File /r "dist\electrum-vtc\*.*"
File "..\..\icons\electrum.ico"

;Store installation folder
Expand All @@ -122,19 +122,19 @@ Section

;Create desktop shortcut
DetailPrint "Creating desktop shortcut..."
CreateShortCut "$DESKTOP\${PRODUCT_NAME}.lnk" "$INSTDIR\electrum-ltc-${PRODUCT_VERSION}.exe" ""
CreateShortCut "$DESKTOP\${PRODUCT_NAME}.lnk" "$INSTDIR\electrum-vtc-${PRODUCT_VERSION}.exe" ""

;Create start-menu items
DetailPrint "Creating start-menu items..."
CreateDirectory "$SMPROGRAMS\${PRODUCT_NAME}"
CreateShortCut "$SMPROGRAMS\${PRODUCT_NAME}\Uninstall.lnk" "$INSTDIR\Uninstall.exe" "" "$INSTDIR\Uninstall.exe" 0
CreateShortCut "$SMPROGRAMS\${PRODUCT_NAME}\${PRODUCT_NAME}.lnk" "$INSTDIR\electrum-ltc-${PRODUCT_VERSION}.exe" "" "$INSTDIR\electrum-ltc-${PRODUCT_VERSION}.exe" 0
CreateShortCut "$SMPROGRAMS\${PRODUCT_NAME}\${PRODUCT_NAME}.lnk" "$INSTDIR\electrum-vtc-${PRODUCT_VERSION}.exe" "" "$INSTDIR\electrum-vtc-${PRODUCT_VERSION}.exe" 0

;Links bitcoin: URI's to Electrum
WriteRegStr HKCU "Software\Classes\litecoin" "" "URL:litecoin Protocol"
WriteRegStr HKCU "Software\Classes\litecoin" "URL Protocol" ""
WriteRegStr HKCU "Software\Classes\litecoin" "DefaultIcon" "$\"$INSTDIR\electrum.ico, 0$\""
WriteRegStr HKCU "Software\Classes\litecoin\shell\open\command" "" "$\"$INSTDIR\electrum-ltc-${PRODUCT_VERSION}.exe$\" $\"%1$\""
WriteRegStr HKCU "Software\Classes\litecoin\shell\open\command" "" "$\"$INSTDIR\electrum-vtc-${PRODUCT_VERSION}.exe$\" $\"%1$\""

;Adds an uninstaller possibilty to Windows Uninstall or change a program section
WriteRegStr HKCU "${PRODUCT_UNINST_KEY}" "DisplayName" "$(^Name)"
Expand Down
8 changes: 4 additions & 4 deletions contrib/build-wine/portable.patch
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
diff --git a/electrum-ltc b/electrum-ltc
diff --git a/electrum-vtc b/electrum-vtc
index 6029abb..beec018 100755
--- a/electrum-ltc
+++ b/electrum-ltc
--- a/electrum-vtc
+++ b/electrum-vtc
@@ -454,6 +454,8 @@ if __name__ == '__main__':
if config_options.get('server'):
config_options['auto_connect'] = False

+ config_options['portable'] = True
+
if config_options.get('portable'):
config_options['electrum_path'] = os.path.join(os.path.dirname(os.path.realpath(__file__)), 'electrum-ltc_data')
config_options['electrum_path'] = os.path.join(os.path.dirname(os.path.realpath(__file__)), 'electrum-vtc_data')

6 changes: 5 additions & 1 deletion contrib/build-wine/prepare-wine.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ PYWIN32_URL=http://sourceforge.net/projects/pywin32/files/pywin32/Build%20219/py
PYINSTALLER_URL=https://pypi.python.org/packages/source/P/PyInstaller/PyInstaller-2.1.zip
NSIS_URL=http://prdownloads.sourceforge.net/nsis/nsis-2.46-setup.exe?download
SETUPTOOLS_URL=https://pypi.python.org/packages/2.7/s/setuptools/setuptools-0.6c11.win32-py2.7.exe
LYRA2RE_HASH_PYTHON_URL=https://github.com/metalicjames/lyra2re-hash-python/archive/master.zip


## These settings probably don't need change
Expand Down Expand Up @@ -90,4 +91,7 @@ wine mingw-get install mingw32-libz

printf "[build]\ncompiler=mingw32\n" > $WINEPREFIX/drive_c/Python27/Lib/distutils/distutils.cfg

wine "$PYHOME\\Scripts\\pip.exe" install ltc_scrypt
$PYTHON -m pip install vtc_scrypt
$PYTHON -m pip install win_inet_pton

$PYTHON -m pip install $LYRA2RE_HASH_PYTHON_URL
2 changes: 1 addition & 1 deletion contrib/make_packages
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ if __name__ == '__main__':
'dns',
'six',
'jsonrpclib',
'socks',
'socks',
]
for module in deps:
f, pathname, descr = imp.find_module(module)
Expand Down
16 changes: 8 additions & 8 deletions electrum-vtc.desktop
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,16 @@
# sudo desktop-file-install electrum.desktop

[Desktop Entry]
Comment=Lightweight Litecoin Client
Exec=electrum-ltc %u
GenericName[en_US]=Litecoin Wallet
GenericName=Litecoin Wallet
Icon=electrum-ltc
Name[en_US]=Electrum Litecoin Wallet
Name=Electrum Litecoin Wallet
Comment=Lightweight Vertcoin Client
Exec=electrum-vtc %u
GenericName[en_US]=Vertcoin Wallet
GenericName=Vertcoin Wallet
Icon=electrum-vtc
Name[en_US]=Electrum Vertcoin Wallet
Name=Electrum Vertcoin Wallet
Categories=Finance;Network;
StartupNotify=false
Terminal=false
Type=Application
MimeType=x-scheme-handler/litecoin;
MimeType=x-scheme-handler/vertcoin;

218 changes: 173 additions & 45 deletions lib/currencies.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
{
"Bit2C": [
"NIS"
],
"BitcoinAverage": [
"Poloniex": [
"DZD",
"NAD",
"GHS",
Expand Down Expand Up @@ -176,47 +173,178 @@
"SDG",
"XAU"
],
"BitcoinVenezuela": [
"ARS",
"Bittrex": [
"DZD",
"NAD",
"GHS",
"EGP",
"BGN",
"PAB",
"PHP",
"BOB",
"DKK",
"BWP",
"LBP",
"TZS",
"VND",
"AOA",
"KHR",
"QAR",
"KYD",
"LYD",
"UAH",
"JOD",
"AWG",
"SAR",
"XPT",
"HKD",
"EUR",
"CHF",
"GIP",
"BYR",
"XPF",
"XPD",
"BYN",
"MRO",
"HRK",
"DJF",
"THB",
"XAF",
"BND",
"ETB",
"UYU",
"NIO",
"LAK",
"SYP",
"MAD",
"MZN",
"YER",
"ZAR",
"NPR",
"ZWL",
"NGN",
"CRC",
"AED",
"EEK",
"MWK",
"TTD",
"LKR",
"PKR",
"HUF",
"BMD",
"LSL",
"MNT",
"AMD",
"UGX",
"XDR",
"JMD",
"GEL",
"SHP",
"AFN",
"MMK",
"KPW",
"TRY",
"BDT",
"CNY",
"HTG",
"SLL",
"MGA",
"ANG",
"LRD",
"RWF",
"NOK",
"MOP",
"INR",
"MXN",
"CZK",
"TJS",
"BTC",
"BTN",
"COP",
"MYR",
"TMT",
"MUR",
"IDR",
"HNL",
"FJD",
"ISK",
"PEN",
"BZD",
"ILS",
"DOP",
"GGP",
"MDL",
"BSD",
"SEK",
"ZMK",
"JEP",
"AUD",
"SRD",
"CUP",
"CLF",
"BBD",
"KMF",
"KRW",
"GMD",
"VEF",
"IMP",
"CUC",
"CLP",
"ZMW",
"LTL",
"ALL",
"XCD",
"KZT",
"RUB",
"XAG",
"CDF",
"RON",
"OMR",
"BRL",
"SBD",
"PLN",
"PYG",
"KES",
"MKD",
"GBP",
"AZN",
"TOP",
"MVR",
"VUV",
"GNF",
"WST",
"IQD",
"ERN",
"BAM",
"SCR",
"CAD",
"CVE",
"KWD",
"BIF",
"PGK",
"SOS",
"TWD",
"SGD",
"UZS",
"STD",
"IRR",
"SVC",
"XOF",
"TND",
"GYD",
"MTL",
"NZD",
"FKP",
"LVL",
"USD",
"VEF"
],
"Bitfinex": [
"USD"
],
"BTCChina": [
"CNY"
],
"BTCe": [
"EUR",
"RUR",
"USD"
],
"CaVirtEx": [
"CAD"
],
"CoinSpot": [
"AUD"
],
"GoCoin": [
"CNY"
],
"HitBTC": [
"EUR",
"USD"
],
"Kraken": [
"EUR",
"USD"
],
"OKCoin": [
"CNY"
],
"MercadoBitcoin": [
"BRL"
],
"Bitcointoyou": [
"BRL"
"KGS",
"ARS",
"SZL",
"GTQ",
"RSD",
"BHD",
"JPY",
"SDG",
"XAU"
]
}
}
Loading

0 comments on commit 8b289a6

Please sign in to comment.