Skip to content

Commit

Permalink
🚀 Installer well set up and working for windowsMerge pull request #2
Browse files Browse the repository at this point in the history
…from sandoche/dev

🚀 Installer well set up and working for windows
  • Loading branch information
sandoche authored Mar 30, 2018
2 parents 1267498 + 3db6a94 commit 71c5255
Show file tree
Hide file tree
Showing 743 changed files with 129,304 additions and 13 deletions.
339 changes: 339 additions & 0 deletions COPYING.txt

Large diffs are not rendered by default.

17 changes: 17 additions & 0 deletions GTD-Cryptocurrency-1.0.1.changelog.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
Release 1.0.1

https://bitbucket.org/JeanLucPicard/nxt/downloads/GTD-Cryptocurrency-1.0.1.exe

sha256:

75d7efaf624b01af512a6d4e93a3dc5fa55942d2e5561b892218897c053eaf78 *GTD-Cryptocurrency-1.0.1.exe
https://bitbucket.org/JeanLucPicard/nxt/downloads/GTD-Cryptocurrency-1.0.1.jar

sha256:

f27abd10f830f8d99fea050a13353f2dce39b8f46d5e076304285c2fcd8c97c1 *GTD-Cryptocurrency-1.0.1.jar


Change log:


Binary file added GTD-Cryptocurrency.exe
Binary file not shown.
Binary file removed GTD-Cryptocurrency.jar
Binary file not shown.
Binary file added GTD-Cryptocurrencyservice.exe
Binary file not shown.
15 changes: 7 additions & 8 deletions conf/nxt-default.properties
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
################################################################################

# Do not modify this file. Instead, create a nxt.properties file with only the
# properties you need to change, and set them there. The values in
# properties you need to change, and set them there. The values in
# nxt.properties override those in nxt-default.properties.


Expand All @@ -36,7 +36,7 @@
nxt.shareMyAddress=true

# Port for incoming peer to peer networking requests, if enabled.
nxt.peerServerPort=47874
nxt.peerServerPort=37874

# Enable UPnP for the peer port.
nxt.enablePeerUPnP=true
Expand Down Expand Up @@ -67,7 +67,7 @@ nxt.myHallmark=

# Default initial peers. Only used if nxt.usePeersDb=true.
# Do not modify. Add custom peers to nxt.wellKnownPeers instead.
nxt.defaultPeers=
nxt.defaultPeers=193.70.91.232; 35.182.246.236;

# A list of well known peer addresses / host names, separated by '; '. These
# peers are always kept in connected state.
Expand Down Expand Up @@ -159,7 +159,7 @@ nxt.getMorePeers=true

# Set to true to run offline - do not connect to peers and do not listen for
# incoming peer connections. This is equivalent to setting
# nxt.shareMyAddress=false, nxt.wellKnownPeers=, nxt.testnetPeers=
# nxt.shareMyAddress=false, nxt.wellKnownPeers=, nxt.testnetPeers=
# and nxt.usePeersDb=false, and if set to true overrides those properties.
nxt.isOffline=false

Expand All @@ -186,11 +186,11 @@ nxt.enableAPIServer=true
nxt.allowedBotHosts=127.0.0.1; localhost; [0:0:0:0:0:0:0:1];

# Port for http/json API requests.
nxt.apiServerPort=7876
nxt.apiServerPort=37876

# Port for https/json API request. If same as nxt.apiServerPort, the nxt.apiSSL
# setting determines whether SSL is used or not.
nxt.apiServerSSLPort=7876
nxt.apiServerSSLPort=37876

# Enable UPnP for the API ports.
nxt.enableAPIUPnP=false
Expand Down Expand Up @@ -245,7 +245,7 @@ nxt.apiServerEnforcePOST=true
# requests.
# Please choose a decent password here. Preferably, use a password generator.
# Password protection is disabled and password is not needed when the API server
# only listens on the localhost interface, i.e. when
# only listens on the localhost interface, i.e. when
# nxt.apiServerHost=127.0.0.1.
nxt.adminPassword=

Expand Down Expand Up @@ -657,4 +657,3 @@ nxt.disableSecurityPolicy=false

# NRS version.
nxt.version=1.11.13

2 changes: 2 additions & 0 deletions h2.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#!/bin/sh
java -cp lib/h2*.jar org.h2.tools.Shell -url jdbc:h2:./nxt_db/nxt -user sa -password sa
Binary file added html/www/icon.ico
Binary file not shown.
Binary file added html/www/img/installer_left_pane.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions installer/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
*.log
Binary file added installer/AppIcon.icns
Binary file not shown.
48 changes: 48 additions & 0 deletions installer/RegistrySpec.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<registry version="5.0">

<pack name="UninstallStuff">
<!-- Special "pack", if not defined an uninstall key will be generated automatically -->
<!-- The variable $UNINSTALL_NAME can be only used if CheckedHelloPanel will be used
because there the variable will be declared. With that variabel it is possible
to install more as one instances of the product on one machine each with an
unique uninstall key. -->
<value name="DisplayName"
keypath="SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\$UNINSTALL_NAME"
root="HKLM"
string="$UNINSTALL_NAME"/>
<value name="UninstallString"
keypath="SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\$UNINSTALL_NAME"
root="HKLM"
string="&quot;$INSTALL_PATH\jre\bin\javaw.exe&quot; -jar &quot;$INSTALL_PATH\uninstaller\uninstaller.jar&quot;"/>
<value name="UninstallString"
keypath="SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\$UNINSTALL_NAME"
root="HKLM"
string="&quot;$INSTALL_PATH\jre\bin\javaw.exe&quot; -jar &quot;$INSTALL_PATH\uninstaller\uninstaller.jar&quot;"/>
<value name="DisplayIcon"
keypath="SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\$UNINSTALL_NAME"
root="HKLM"
string="$INSTALL_PATH\html\ui\favicon.ico"/>
<value name="HelpLink"
keypath="SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\$UNINSTALL_NAME"
root="HKLM"
string="https://gtd.network"/>
<value name="URLInfoAbout"
keypath="SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\$UNINSTALL_NAME"
root="HKLM"
string="$APP_URL"/>
<value name="Publisher"
keypath="SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\$UNINSTALL_NAME"
root="HKLM"
string="GTD"/>
<value name="Version"
keypath="SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\$UNINSTALL_NAME"
root="HKLM"
string="$APP_VER"/>
<value name="DisplayVersion"
keypath="SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\$UNINSTALL_NAME"
root="HKLM"
string="$APP_VER"/>
</pack>
</registry>

69 changes: 69 additions & 0 deletions installer/Unix_shortcutSpec.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>

<izpack:shortcuts version="5.0"
xmlns:izpack="http://izpack.org/schema/shortcuts"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://izpack.org/schema/shortcuts http://izpack.org/schema/5.0/izpack-shortcuts-5.0.xsd">

<programGroup defaultName="NXT" location="applications"/>

<shortcut
name="Nxt Start"
programGroup="yes"
desktop="yes"
target="$INSTALL_PATH/start.sh"
workingDirectory="$INSTALL_PATH"
description="Start Nxt"
iconFile="$INSTALL_PATH/html/www/img/nxt-icon-32x32.png"
type="Application"
encoding="UTF-8"
categories="Application;Network;"
createForAll="true">
</shortcut>

<shortcut
name="Nxt Stop"
programGroup="yes"
desktop="yes"
target="$INSTALL_PATH/stop.sh"
workingDirectory="$INSTALL_PATH"
description="Shutdown Nxt"
iconFile="$INSTALL_PATH/html/www/img/nxt-icon-32x32.png"
type="Application"
encoding="UTF-8"
categories="Application;Network;"
createForAll="true">
</shortcut>

<!--
<shortcut
name="Nxt Browser"
programGroup="yes"
desktop="no"
workingDirectory="$INSTALL_PATH"
iconFile="$INSTALL_PATH/html/www/img/nxt-icon-32x32.png"
url="http://localhost:7876/index.html"
type="link"
encoding="UTF-8"
categories="Application;Network;"
description="Open Nxt wallet in browser">
</shortcut>
-->

<shortcut
name="Nxt Uninstaller"
programGroup="yes"
desktop="no"
target="java"
commandLine="-jar &quot;$INSTALL_PATH/Uninstaller/uninstaller.jar&quot;"
iconFile="trashcan_full"
workingDirectory=""
type="Application"
encoding="UTF-8"
categories="Application;Network;"
createForAll="true"
description="Uninstall Nxt">
</shortcut>


</izpack:shortcuts>
2 changes: 2 additions & 0 deletions installer/build-exe.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
@echo off
..\installer\lib\izpack2exe\izpack2exe.py --file ..\%1.jar --output ..\%1.exe --with-7z=..\installer\lib\izpack2exe\7za.exe --no-upx --with-jdk=..\jre --name nxt > ..\installer\build-exe.log 2>&1
2 changes: 2 additions & 0 deletions installer/build-installer.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#!/bin/sh
java -Xmx512m -cp "../installer/lib/*" com.izforge.izpack.compiler.bootstrap.CompilerLauncher ../installer/setup.xml -o $1.jar > ../installer/build-installer.log 2>&1
44 changes: 44 additions & 0 deletions installer/build-readme.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
Building the NXT installer

Note: all pathes are relative to the git repository folder (nxt-private)

Pre-requisites for both Unix and Windows
========================================
Compile classes on Unix using compile.sh
Windows build has to be executed from a Cygwin shell (Install from https://www.cygwin.com/)
Compile classes on Windows by running win-compile.sh from a Cygwin shell
In order to create an obfuscated release also install proguard (http://proguard.sourceforge.net/)
Package NXT.jar using jar.sh
mkdir jre

Building the installer on Unix
==============================
Execute the build: ./release-package.sh
Review results: vi installer/build-installer.log
Test X11 installer: java -jar nxt-client-<version>.jar
Test console installer: java -jar nxt-client-<version>.jar -console

Building the installer on Windows
=================================
Initial setup (perform once for each development workstation or whenever Java is updated)
Install the latest version of the Java Windows Server JRE (64 bit)
Copy the content of Java JRE folder (C:\Program Files\Java\jre<version>) into the jre folder under your nxt-private git repository preserving the folder structure
Install the latest Java JDK x64 for Windows - needed for the jar and jarsigner commands
Install python and associate it with .py file extension - required by build-exe.bat
Install the Microsoft Windows SDK for Windows 7 and .NET Framework 4, make sure the signtool.exe command is in your path - needed to sign the installer executable

From a Cygwin shell invoke the command win-release-package.sh followed by the version number
Review results in installer/build-installer.log, installer/build-exe.log
Digitally sign the installer jar file and zip file using jarsigner
Digitally sign the installer exe file using signtool
Test the installer using Java: java -jar nxt-client-<version>.jar
Test the windows executable: nxt-client-<version>.exe

Technical information
=====================
Installer is based on the IzPack product from http://izpack.org/
Installer project source code is in installer/setup.xml, RegistrySpec.xml and shortcutSpec.xml
nxt.jar is now self executing, the full classpath is embedded into the jar file manifest automatically by jar.sh
Converting the Jar file to a Windows exe relies on the 7za utility (http://www.7-zip.org/) bundled with the IzPack distribution
Creating and signing the installer jar can be performed either on Unix or Windows
Creating and signing the installer exe must be performed on a Windows workstation
Binary file added installer/lib/JavaExe.exe
Binary file not shown.
Binary file added installer/lib/ant-1.9.4.jar
Binary file not shown.
Binary file added installer/lib/ant-launcher-1.9.4.jar
Binary file not shown.
Binary file added installer/lib/asm-all-2.2.3.jar
Binary file not shown.
Binary file added installer/lib/bcel-5.2.jar
Binary file not shown.
Binary file added installer/lib/classworlds-1.1-alpha-2.jar
Binary file not shown.
Binary file added installer/lib/commons-cli-1.2.jar
Binary file not shown.
Binary file added installer/lib/commons-collections-3.1.jar
Binary file not shown.
Binary file added installer/lib/commons-compress-1.3.jar
Binary file not shown.
Binary file added installer/lib/commons-io-2.4.jar
Binary file not shown.
Binary file added installer/lib/commons-lang-2.6.jar
Binary file not shown.
Binary file added installer/lib/izpack-ant-5.0.5.jar
Binary file not shown.
Binary file added installer/lib/izpack-api-5.0.5.jar
Binary file not shown.
Binary file added installer/lib/izpack-compiler-5.0.5.jar
Binary file not shown.
Binary file added installer/lib/izpack-core-5.0.5.jar
Binary file not shown.
Binary file added installer/lib/izpack-event-5.0.5.jar
Binary file not shown.
Binary file added installer/lib/izpack-gui-5.0.5.jar
Binary file not shown.
Binary file added installer/lib/izpack-installer-5.0.5.jar
Binary file not shown.
Binary file added installer/lib/izpack-native-5.0.5.jar
Binary file not shown.
Binary file added installer/lib/izpack-panel-5.0.5.jar
Binary file not shown.
Binary file added installer/lib/izpack-tools-5.0.5.jar
Binary file not shown.
Binary file added installer/lib/izpack-uninstaller-5.0.5.jar
Binary file not shown.
Binary file added installer/lib/izpack-util-5.0.5.jar
Binary file not shown.
Binary file added installer/lib/izpack2exe/7zS.sfx
Binary file not shown.
Binary file added installer/lib/izpack2exe/7za
Binary file not shown.
Binary file added installer/lib/izpack2exe/7za.exe
Binary file not shown.
Loading

0 comments on commit 71c5255

Please sign in to comment.