Skip to content
This repository has been archived by the owner on Feb 21, 2019. It is now read-only.

Commit

Permalink
Merge pull request #10 from testzcrypto/bitshares-pts
Browse files Browse the repository at this point in the history
BitShares-PTS 1.0.0
  • Loading branch information
testzcrypto committed Feb 17, 2014
2 parents 7ad6266 + a333d82 commit 355f685
Show file tree
Hide file tree
Showing 71 changed files with 620 additions and 480 deletions.
4 changes: 2 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
cmake_minimum_required(VERSION 2.8) # Needed for file(COPY ...)

project(ProtoShares)
project(BitShares-PTS)

enable_testing()

Expand Down Expand Up @@ -36,7 +36,7 @@ if(NOT ${OpenSSL_FOUND})
message(FATAL_ERROR "Could not locate OpenSSL.")
endif()

# protoshares-qt dependencies (4.4.3 arbitrarily set via docs):
# bitshares-pts-qt dependencies (4.4.3 arbitrarily set via docs):
find_package(Qt4 4.4.3 COMPONENTS QtCore QtGui QtNetwork)

#
Expand Down
10 changes: 5 additions & 5 deletions INSTALL
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
Building ProtoShares
Building BitShares PTS

See doc/readme-qt.rst for instructions on building ProtoShares-Qt,
See doc/readme-qt.rst for instructions on building BitShares PTS-Qt,
the intended-for-end-users, nice-graphical-interface, reference
implementation of ProtoShares.
implementation of BitShares PTS.

See doc/build-*.txt for instructions on building bitcoind,
See doc/build-*.txt for instructions on building daemon,
the intended-for-services, no-graphical-interface, reference
implementation of ProtoShares.
implementation of BitShares PTS.
15 changes: 8 additions & 7 deletions protoshares-qt.pro → bitshares-pts.pro
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
TEMPLATE = app
TARGET = protoshares-qt
macx:TARGET = "ProtoShares-Qt"
VERSION = 0.8.5
TARGET = BitShares-PTS
macx:TARGET = "BitShares-PTS"
VERSION = 1.0.0
INCLUDEPATH += src src/json src/qt
QT += network widgets
DEFINES += QT_GUI BOOST_THREAD_USE_LIB BOOST_SPIRIT_THREADSAFE
Expand Down Expand Up @@ -111,15 +111,16 @@ LIBS += $$PWD/src/leveldb/libleveldb.a $$PWD/src/leveldb/libmemenv.a
LIBS += -lshlwapi
genleveldb.commands = cd $$PWD/src/leveldb && CC=$$QMAKE_CC CXX=$$QMAKE_CXX TARGET_OS=OS_WINDOWS_CROSSCOMPILE $(MAKE) OPT=\"$$QMAKE_CXXFLAGS $$QMAKE_CXXFLAGS_RELEASE\" libleveldb.a libmemenv.a && $$QMAKE_RANLIB $$PWD/src/leveldb/libleveldb.a && $$QMAKE_RANLIB $$PWD/src/leveldb/libmemenv.a
}
genleveldb.target = $$PWD/src/leveldb/libleveldb.a
genleveldb.target = src/leveldb/libleveldb.a
genleveldb.depends = FORCE
PRE_TARGETDEPS += $$PWD/src/leveldb/libleveldb.a
PRE_TARGETDEPS += src/leveldb/libleveldb.a
QMAKE_EXTRA_TARGETS += genleveldb
# Gross ugly hack that depends on qmake internals, unfortunately there is no other way to do it.
QMAKE_CLEAN += $$PWD/src/leveldb/libleveldb.a; cd $$PWD/src/leveldb ; $(MAKE) clean
QMAKE_CLEAN += src/leveldb/libleveldb.a; cd $$PWD/src/leveldb ; $(MAKE) clean

# regenerate src/build.h
!win32|contains(USE_BUILD_INFO, 1) {
!win32:contains(USE_BUILD_INFO, 1) {
message(Building with build info)
genbuild.depends = FORCE
genbuild.commands = cd $$PWD; /bin/sh share/genbuild.sh $$OUT_PWD/build/build.h
genbuild.target = $$OUT_PWD/build/build.h
Expand Down
6 changes: 3 additions & 3 deletions protosharesd.pro → bitshares-ptsd.pro
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
TEMPLATE = app
TARGET = protosharesd
#macx:TARGET = "ProtoShares-Qt"
VERSION = 0.8.5
TARGET = bitshares-ptsd
#macx:TARGET = "BitShares-PTS-Qt"
VERSION = 1.0.0
INCLUDEPATH += src src/json
QT += network
DEFINES += BOOST_THREAD_USE_LIB BOOST_SPIRIT_THREADSAFE
Expand Down
Binary file modified contrib/macdeploy/background.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified contrib/macdeploy/background.psd
Binary file not shown.
2 changes: 1 addition & 1 deletion contrib/macdeploy/fancy.plist
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
<integer>370</integer>
<integer>156</integer>
</array>
<key>Bitcoin-Qt.app</key>
<key>BitShares-PTS.app</key>
<array>
<integer>128</integer>
<integer>156</integer>
Expand Down
2 changes: 1 addition & 1 deletion contrib/macdeploy/macdeployqtplus
Original file line number Diff line number Diff line change
Expand Up @@ -763,7 +763,7 @@ if config.dmg is not None:
items_positions.append(itemscript.substitute(params))

params = {
"disk" : "Bitcoin-Qt",
"disk" : "BitShares-PTS",
"window_bounds" : "300,300,800,620",
"icon_size" : "96",
"background_commands" : "",
Expand Down
6 changes: 3 additions & 3 deletions contrib/macdeploy/notes.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ You will need the appscript package for the fancy disk image creation to work.
Install it by invoking "sudo easy_install appscript".

This script should be invoked in the target directory like this:
$source_dir/contrib/macdeploy/macdeployqtplus Bitcoin-Qt.app -add-qt-tr da,de,es,hu,ru,uk,zh_CN,zh_TW -dmg -fancy $source_dir/contrib/macdeploy/fancy.plist -verbose 2
$source_dir/contrib/macdeploy/macdeployqtplus BitShares-PTS.app -add-qt-tr da,de,es,hu,ru,uk,zh_CN,zh_TW -dmg -fancy $source_dir/contrib/macdeploy/fancy.plist -verbose 2

During the process, the disk image window will pop up briefly where the fancy
settings are applied. This is normal, please do not interfere.
Expand All @@ -19,8 +19,8 @@ Fill in the following.
Enable custom process step: [x]
Command: %{sourceDir}/contrib/macdeploy/macdeployqtplus
Working directory: %{buildDir}
Command arguments: Bitcoin-Qt.app -add-qt-tr da,de,es,hu,ru,uk,zh_CN,zh_TW -dmg -fancy %{sourceDir}/contrib/macdeploy/fancy.plist -verbose 2
Command arguments: BitShares-PTS.app -add-qt-tr da,de,es,hu,ru,uk,zh_CN,zh_TW -dmg -fancy %{sourceDir}/contrib/macdeploy/fancy.plist -verbose 2

After that you can start the deployment process through the menu with
Build -> Deploy Project "bitcoin-qt"
Build -> Deploy Project "bitshares-pts"

13 changes: 13 additions & 0 deletions share/makesetup.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
@echo off

set MAKENSIS="C:\Program Files (x86)\NSIS\makensis.exe"
if not exist %MAKENSIS% goto nonsis
%MAKENSIS% setup.nsi
goto end

:nonsis
echo Error: %MAKENSIS% not found
echo Please download and install NSIS 2.46 from:
echo http://nsis.sourceforge.net/download

:end
Binary file added share/pixmaps/bitshares-pts.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified share/pixmaps/nsis-header.bmp
Binary file not shown.
Binary file modified share/pixmaps/nsis-wizard.bmp
Binary file not shown.
10 changes: 5 additions & 5 deletions share/qt/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -7,27 +7,27 @@
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleGetInfoString</key>
<string>$VERSION, Copyright © 2009-$YEAR The Bitcoin developers</string>
<string>$VERSION, Copyright © 2009-$YEAR The Bitcoin developers, Invictus Innovations</string>
<key>CFBundleShortVersionString</key>
<string>$VERSION</string>
<key>CFBundleVersion</key>
<string>$VERSION</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleExecutable</key>
<string>Bitcoin-Qt</string>
<string>BitShares-PTS</string>
<key>CFBundleIdentifier</key>
<string>org.bitcoinfoundation.Bitcoin-Qt</string>
<string>org.invictusinnovations.BitShares-PTS</string>
<key>CFBundleURLTypes</key>
<array>
<dict>
<key>CFBundleTypeRole</key>
<string>Editor</string>
<key>CFBundleURLName</key>
<string>org.bitcoinfoundation.BitcoinPayment</string>
<string>org.invictusinnovations.BitSharesPTSPayment</string>
<key>CFBundleURLSchemes</key>
<array>
<string>bitcoin</string>
<string>bitshares-pts</string>
</array>
</dict>
</array>
Expand Down
6 changes: 3 additions & 3 deletions share/qt/clean_mac_info_plist.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env python
# Jonas Schnelli, 2013
# make sure the Bitcoin-Qt.app contains the right plist (including the right version)
# make sure the BitShares-PTS.app contains the right plist (including the right version)
# fix made because of serval bugs in Qt mac deployment (https://bugreports.qt-project.org/browse/QTBUG-21267)

from string import Template
Expand All @@ -9,10 +9,10 @@
bitcoinDir = "./";

inFile = bitcoinDir+"/share/qt/Info.plist"
outFile = "Bitcoin-Qt.app/Contents/Info.plist"
outFile = "BitShares-PTS.app/Contents/Info.plist"
version = "unknown";

fileForGrabbingVersion = bitcoinDir+"bitcoin-qt.pro"
fileForGrabbingVersion = bitcoinDir+"bitshares-pts.pro"
for line in open(fileForGrabbingVersion):
lineArr = line.replace(" ", "").split("=");
if lineArr[0].startswith("VERSION"):
Expand Down
72 changes: 28 additions & 44 deletions share/setup.nsi
Original file line number Diff line number Diff line change
@@ -1,28 +1,28 @@
Name Bitcoin
Name BitShares-PTS

RequestExecutionLevel highest
SetCompressor /SOLID lzma

# General Symbol Definitions
!define REGKEY "SOFTWARE\$(^Name)"
!define VERSION 0.8.5
!define COMPANY "Bitcoin project"
!define URL http://www.bitcoin.org/
!define VERSION 1.0.0
!define COMPANY "Invictus Innovations"
!define URL http://www.invictus.io

# MUI Symbol Definitions
!define MUI_ICON "../share/pixmaps/bitcoin.ico"
!define MUI_WELCOMEFINISHPAGE_BITMAP "../share/pixmaps/nsis-wizard.bmp"
!define MUI_ICON "..\share\pixmaps\bitcoin.ico"
!define MUI_WELCOMEFINISHPAGE_BITMAP "..\share\pixmaps\nsis-wizard.bmp"
!define MUI_HEADERIMAGE
!define MUI_HEADERIMAGE_RIGHT
!define MUI_HEADERIMAGE_BITMAP "../share/pixmaps/nsis-header.bmp"
!define MUI_HEADERIMAGE_BITMAP "..\share\pixmaps\nsis-header.bmp"
!define MUI_FINISHPAGE_NOAUTOCLOSE
!define MUI_STARTMENUPAGE_REGISTRY_ROOT HKLM
!define MUI_STARTMENUPAGE_REGISTRY_KEY ${REGKEY}
!define MUI_STARTMENUPAGE_REGISTRY_VALUENAME StartMenuGroup
!define MUI_STARTMENUPAGE_DEFAULTFOLDER Bitcoin
!define MUI_FINISHPAGE_RUN $INSTDIR\bitcoin-qt.exe
!define MUI_UNICON "${NSISDIR}\Contrib\Graphics\Icons\modern-uninstall.ico"
!define MUI_UNWELCOMEFINISHPAGE_BITMAP "../share/pixmaps/nsis-wizard.bmp"
!define MUI_STARTMENUPAGE_DEFAULTFOLDER BitShares-PTS
!define MUI_FINISHPAGE_RUN $INSTDIR\BitShares-PTS.exe
!define MUI_UNICON "..\share\pixmaps\bitcoin.ico"
!define MUI_UNWELCOMEFINISHPAGE_BITMAP "..\share\pixmaps\nsis-wizard.bmp"
!define MUI_UNFINISHPAGE_NOAUTOCLOSE

# Included files
Expand All @@ -45,14 +45,14 @@ Var StartMenuGroup
!insertmacro MUI_LANGUAGE English

# Installer attributes
OutFile bitcoin-0.8.5-win32-setup.exe
InstallDir $PROGRAMFILES\Bitcoin
OutFile ..\release\BitShares-PTS-1.0.0-win32-setup.exe
InstallDir $PROGRAMFILES\BitShares-PTS
CRCCheck on
XPStyle on
BrandingText " "
ShowInstDetails show
VIProductVersion 0.8.5.0
VIAddVersionKey ProductName Bitcoin
VIProductVersion 1.0.0.0
VIAddVersionKey ProductName BitShares-PTS
VIAddVersionKey ProductVersion "${VERSION}"
VIAddVersionKey CompanyName "${COMPANY}"
VIAddVersionKey CompanyWebsite "${URL}"
Expand All @@ -66,19 +66,9 @@ ShowUninstDetails show
Section -Main SEC0000
SetOutPath $INSTDIR
SetOverwrite on
File ../release/bitcoin-qt.exe
File /oname=COPYING.txt ../COPYING
File /oname=readme.txt ../doc/README_windows.txt
SetOutPath $INSTDIR\daemon
File ../src/bitcoind.exe
SetOutPath $INSTDIR\src
File /r /x *.exe /x *.o ../src\*.*
SetOutPath $INSTDIR
File ..\release\BitShares-PTS.exe
File ..\release\bitshares-ptsd.exe
WriteRegStr HKCU "${REGKEY}\Components" Main 1

# Remove old wxwidgets-based-bitcoin executable and locales:
Delete /REBOOTOK $INSTDIR\bitcoin.exe
RMDir /r /REBOOTOK $INSTDIR\locale
SectionEnd

Section -post SEC0001
Expand All @@ -87,8 +77,8 @@ Section -post SEC0001
WriteUninstaller $INSTDIR\uninstall.exe
!insertmacro MUI_STARTMENU_WRITE_BEGIN Application
CreateDirectory $SMPROGRAMS\$StartMenuGroup
CreateShortcut "$SMPROGRAMS\$StartMenuGroup\Bitcoin.lnk" $INSTDIR\bitcoin-qt.exe
CreateShortcut "$SMPROGRAMS\$StartMenuGroup\Uninstall Bitcoin.lnk" $INSTDIR\uninstall.exe
CreateShortcut "$SMPROGRAMS\$StartMenuGroup\BitShares-PTS.lnk" $INSTDIR\BitShares-PTS.exe
CreateShortcut "$SMPROGRAMS\$StartMenuGroup\Uninstall BitShares-PTS.lnk" $INSTDIR\uninstall.exe
!insertmacro MUI_STARTMENU_WRITE_END
WriteRegStr HKCU "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\$(^Name)" DisplayName "$(^Name)"
WriteRegStr HKCU "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\$(^Name)" DisplayVersion "${VERSION}"
Expand All @@ -98,10 +88,10 @@ Section -post SEC0001
WriteRegStr HKCU "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\$(^Name)" UninstallString $INSTDIR\uninstall.exe
WriteRegDWORD HKCU "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\$(^Name)" NoModify 1
WriteRegDWORD HKCU "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\$(^Name)" NoRepair 1
WriteRegStr HKCR "bitcoin" "URL Protocol" ""
WriteRegStr HKCR "bitcoin" "" "URL:Bitcoin"
WriteRegStr HKCR "bitcoin\DefaultIcon" "" $INSTDIR\bitcoin-qt.exe
WriteRegStr HKCR "bitcoin\shell\open\command" "" '"$INSTDIR\bitcoin-qt.exe" "%1"'
WriteRegStr HKCR "BitShares-PTS" "URL Protocol" ""
WriteRegStr HKCR "BitShares-PTS" "" "URL:BitShares-PTS"
WriteRegStr HKCR "BitShares-PTS\DefaultIcon" "" $INSTDIR\BitShares-PTS.exe
WriteRegStr HKCR "BitShares-PTS\shell\open\command" "" '"$INSTDIR\BitShares-PTS.exe" "%1"'
SectionEnd

# Macro for selecting uninstaller sections
Expand All @@ -119,27 +109,21 @@ done${UNSECTION_ID}:

# Uninstaller sections
Section /o -un.Main UNSEC0000
Delete /REBOOTOK $INSTDIR\bitcoin-qt.exe
Delete /REBOOTOK $INSTDIR\COPYING.txt
Delete /REBOOTOK $INSTDIR\readme.txt
RMDir /r /REBOOTOK $INSTDIR\daemon
RMDir /r /REBOOTOK $INSTDIR\src
Delete /REBOOTOK $INSTDIR\BitShares-PTS.exe
Delete /REBOOTOK $INSTDIR\bitshares-ptsd.exe
DeleteRegValue HKCU "${REGKEY}\Components" Main
SectionEnd

Section -un.post UNSEC0001
DeleteRegKey HKCU "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\$(^Name)"
Delete /REBOOTOK "$SMPROGRAMS\$StartMenuGroup\Uninstall Bitcoin.lnk"
Delete /REBOOTOK "$SMPROGRAMS\$StartMenuGroup\Bitcoin.lnk"
Delete /REBOOTOK "$SMSTARTUP\Bitcoin.lnk"
Delete /REBOOTOK "$SMPROGRAMS\$StartMenuGroup\Uninstall BitShares-PTS.lnk"
Delete /REBOOTOK "$SMPROGRAMS\$StartMenuGroup\BitShares-PTS.lnk"
Delete /REBOOTOK $INSTDIR\uninstall.exe
Delete /REBOOTOK $INSTDIR\debug.log
Delete /REBOOTOK $INSTDIR\db.log
DeleteRegValue HKCU "${REGKEY}" StartMenuGroup
DeleteRegValue HKCU "${REGKEY}" Path
DeleteRegKey /IfEmpty HKCU "${REGKEY}\Components"
DeleteRegKey /IfEmpty HKCU "${REGKEY}"
DeleteRegKey HKCR "bitcoin"
DeleteRegKey HKCR "BitShares-PTS"
RmDir /REBOOTOK $SMPROGRAMS\$StartMenuGroup
RmDir /REBOOTOK $INSTDIR
Push $R0
Expand Down
12 changes: 6 additions & 6 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -46,21 +46,21 @@ include_directories(${BDB_INCLUDE}
"leveldb/include"
"leveldb/helpers"
)
add_library(protoshares ${DAEMON_SOURCES})
target_link_libraries(protoshares leveldb
add_library(bitshares-pts ${DAEMON_SOURCES})
target_link_libraries(bitshares-pts leveldb
${CMAKE_THREAD_LIBS_INIT}
${BDB_LIBRARY}
${Boost_LIBRARIES}
${OPENSSL_LIBRARIES}
)
add_executable(protosharesd main.cpp)
target_link_libraries(protosharesd protoshares)
add_executable(bitshares-ptsd main.cpp)
target_link_libraries(bitshares-ptsd bitshares-pts)

if(BUILD_QT)
add_subdirectory( qt )
else(BUILD_QT)
add_executable(protosharesd main.cpp)
target_link_libraries(protosharesd protoshares)
add_executable(bitshares-ptsd main.cpp)
target_link_libraries(bitshares-ptsd bitshares-pts)
endif(BUILD_QT)

#add_subdirectory(test)
Expand Down
Loading

0 comments on commit 355f685

Please sign in to comment.