Skip to content

Commit

Permalink
Initial port
Browse files Browse the repository at this point in the history
  • Loading branch information
TheTrunk committed Jun 21, 2018
1 parent bb3c4f7 commit c5f06f6
Show file tree
Hide file tree
Showing 62 changed files with 446 additions and 444 deletions.
2 changes: 1 addition & 1 deletion .project
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>ZENCashOfficialSwingWalletUI</name>
<name>ZCashUNOfficialSwingWalletUI</name>
<comment></comment>
<projects>
</projects>
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
Readme from ZENcash
# [ZENCash](https://zensystem.io/) Desktop GUI Wallet

## Graphical user interface wrapper for the [ZENCash](https://zensystem.io/) command line tools
Expand Down
44 changes: 22 additions & 22 deletions installer/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,27 +3,27 @@
<modelVersion>4.0.0</modelVersion>

<parent>
<groupId>com.zencash</groupId>
<artifactId>ZENCashOfficialSwingWalletUI</artifactId>
<groupId>z.cash</groupId>
<artifactId>ZCashUNOfficialSwingWalletUI</artifactId>
<version>0.82.9-SNAPSHOT</version>
</parent>

<artifactId>installer</artifactId>
<name>Zencash Wallet Installer</name>
<name>zcashcash Wallet Installer</name>

<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<staging.dir>${project.build.directory}/staging</staging.dir>
<installer-output-filename>zencash-wallet-installer</installer-output-filename>
<zen.project.url>https://github.com</zen.project.url>
<zen.binaries.file.name.windows>ZencashOfficial/zen/releases/download/v2.0.11/Zen_Win_binaries_v2.0.11.zip</zen.binaries.file.name.windows>
<installer-output-filename>zcash-wallet-installer</installer-output-filename>
<zcash.project.url>https://github.com</zcash.project.url>
<zcash.binaries.file.name.windows>thetrunk/zcash-swing-wallet/releases/download/v2.0.11/zcash_Win_binaries_v2.0.11.zip</zcash.binaries.file.name.windows>
<izpack.version>5.0.6</izpack.version>
</properties>

<dependencies>
<dependency>
<groupId>com.zencash</groupId>
<artifactId>zencash-wallet-swing</artifactId>
<groupId>z.cash</groupId>
<artifactId>zcashcash-wallet-swing</artifactId>
<version>${project.version}</version>
</dependency>
</dependencies>
Expand Down Expand Up @@ -58,7 +58,7 @@
<filtering>false</filtering>
</resource>
<resource>
<directory>../zencash-wallet-swing/src/deb/resources</directory>
<directory>../zcash-wallet-swing/src/deb/resources</directory>
<includes>
<include>licences/*</include>
</includes>
Expand All @@ -75,15 +75,15 @@
<version>1.0</version>
<executions>
<execution>
<id>download-zen</id>
<id>download-zcash</id>
<phase>validate</phase>
<goals>
<goal>download-single</goal>
</goals>
<configuration>
<url>${zen.project.url}</url>
<fromFile>${zen.binaries.file.name.windows}</fromFile>
<toFile>${project.build.directory}/staging/zen-win-binaries.zip</toFile>
<url>${zcash.project.url}</url>
<fromFile>${zcash.binaries.file.name.windows}</fromFile>
<toFile>${project.build.directory}/staging/zcash-win-binaries.zip</toFile>
</configuration>
</execution>
</executions>
Expand All @@ -96,12 +96,12 @@
<configuration>
<tasks>
<echo message="unzipping file" />
<unzip src="${project.build.directory}/staging/zen-win-binaries.zip"
dest="${project.build.directory}/staging/zen-win-binaries">
<unzip src="${project.build.directory}/staging/zcash-win-binaries.zip"
dest="${project.build.directory}/staging/zcash-win-binaries">
<patternset>
<include name="**/zen-cli.exe"/>
<include name="**/zen-tx.exe"/>
<include name="**/zend.exe"/>
<include name="**/zcash-cli.exe"/>
<include name="**/zcash-tx.exe"/>
<include name="**/zcashd.exe"/>
</patternset>
<mapper type="flatten"/>
</unzip>
Expand Down Expand Up @@ -130,7 +130,7 @@
<overWriteReleases>true</overWriteReleases>
<overWriteSnapshots>true</overWriteSnapshots>
<overWriteIfNewer>true</overWriteIfNewer>
<includeArtifactIds>zencash-wallet-swing,bitcoinj-core,sqlite-jdbc,minimal-json</includeArtifactIds>
<includeArtifactIds>zcash-wallet-swing,bitcoinj-core,sqlite-jdbc,minimal-json</includeArtifactIds>
</configuration>
</execution>
</executions>
Expand Down Expand Up @@ -160,8 +160,8 @@
for the panels -->
<dependencies>
<dependency>
<groupId>com.zencash</groupId>
<artifactId>zencash-wallet-swing</artifactId>
<groupId>z.cash</groupId>
<artifactId>zcash-wallet-swing</artifactId>
<version>${project.version}</version>
</dependency>
</dependencies>
Expand All @@ -177,7 +177,7 @@
<goal>launch4j</goal>
</goals>
<configuration>
<icon>${staging.dir}/win-shortcut/zencash.ico</icon>
<icon>${staging.dir}/win-shortcut/zcashcash.ico</icon>
<headerType>gui</headerType>
<jar>${project.build.directory}/${installer-output-filename}.jar</jar>
<outfile>${project.build.directory}/${installer-output-filename}.exe</outfile>
Expand Down
10 changes: 5 additions & 5 deletions installer/src/main/izpack/default_shortcut_spec.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,16 @@
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">
<shortcuts>
<programGroup defaultName="Zen Team" location="applications"/>
<programGroup defaultName="TheTrunk" location="applications"/>
<lateShortcutInstall/>
<skipIfNotSupported/>
<shortcut
name = "Zencash Wallet"
target = "$INSTALL_PATH\zencashwallet.bat"
name = "Zcash Wallet"
target = "$INSTALL_PATH\zcashwallet.bat"
commandLine = ""
workingDirectory= "$INSTALL_PATH\app"
description="Zencash Wallet Launch"
iconFile="$INSTALL_PATH\zencash.ico"
description="Zcash Wallet Launch"
iconFile="$INSTALL_PATH\zcash.ico"
iconIndex="0"
initialState="normal"
programGroup="yes"
Expand Down
2 changes: 1 addition & 1 deletion installer/src/main/izpack/i18n/customLangPack.xml_eng
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<langpack>
<str id="installer.reversetitle" txt="$APP_NAME $APP_VER"/>
<str id="installation.panel.header" txt="ZENCash Desktop GUI Wallet binary release 0.80.5 for Windows"/>
<str id="installation.panel.header" txt="ZCash Desktop GUI Wallet binary release 0.80.5 for Windows"/>
</langpack>
4 changes: 4 additions & 0 deletions installer/src/main/izpack/i18n/zcashPacksLang.xml_eng
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<langpack>
<str id="myApplicationPack" txt="ZCash Desktop GUI Wallet"/>
<str id="myApplicationPack.description" txt="ZCash Desktop GUI Wallet"/>
</langpack>
4 changes: 0 additions & 4 deletions installer/src/main/izpack/i18n/zencashPacksLang.xml_eng

This file was deleted.

Binary file modified installer/src/main/izpack/images/JFrameIcon.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 installer/src/main/izpack/images/UninstallerIcon.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 added installer/src/main/izpack/images/zcash-logo.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 removed installer/src/main/izpack/images/zencash-logo.png
Binary file not shown.
19 changes: 10 additions & 9 deletions installer/src/main/izpack/install.xml
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<installation version="5.0">
<info>
<appname>ZencashOfficialSwingWalletUI</appname>
<appname>ZcashUNOfficialSwingWalletUI</appname>
<appversion>0.82.9</appversion>
<url>https://zencash.com</url>
<url>https://z.cash</url>
<authors>
<author name="Ivan Vaklinov" email="[email protected]"/>
<author name="Armand Ballaci" email="[email protected]"/>
<author name="Tadeas Kmenza" email="[email protected]"/>
</authors>
</info>
<guiprefs height="400" resizable="no" width="640">
Expand All @@ -29,10 +30,10 @@
<res id="LicencePanel.licence" src="@{main.basedir}/../LICENSE"/>
<res id="HTMLHelloPanel.welcome" src="welcome.html"/>
<res id="HTMLInfoPanel.welcome" src="welcome.html"/>
<res id="ZencashLogo" src="images/zencash-logo.png"/>
<res id="ZcashLogo" src="images/zcash-logo.png"/>

<res id="TargetPanel.dir.windows" src="TargetDirWindows.txt"/>
<res id="packsLang.xml_eng" src="i18n/zencashPacksLang.xml_eng"/>
<res id="packsLang.xml_eng" src="i18n/zcashPacksLang.xml_eng"/>
<res id="CustomLangPack.xml_eng" src="i18n/customLangPack.xml_eng" />

<res id="Installer.image.0" src=""/>
Expand All @@ -46,7 +47,7 @@
</resources>
<variables>
<variable name="InstallerFrame.logfilePath" value="Default"/>
<variable name="WELCOME_TEXT" value="Zencash Swing Wallet Installation"/>
<variable name="WELCOME_TEXT" value="Zcash Swing Wallet Installation"/>
<variable name="WELCOME_VERSION" value="Version: 0.82.9"/>
<variable name="WELCOME_BG_COLOR" value="#404B62"/>
<variable name="WELCOME_TEXT_COLOR" value="#ffffff"/>
Expand All @@ -65,7 +66,7 @@
</configuration>
</panel>
<!-- this is our custom panel, loaded from the izpack-panels.jar file -->
<!--panel classname="com.zencash.installer.panels.ZencashInstallerPanel" id="zencash-installer-panel"/-->
<!--panel classname="com.zcash.installer.panels.ZcashInstallerPanel" id="zcash-installer-panel"/-->
<panel classname="TargetPanel" id="install_dir"/>
<panel classname="PacksPanel" id="sdk_pack_select"/>
<panel classname="InstallPanel" id="install"/>
Expand Down Expand Up @@ -115,9 +116,9 @@
</fileset>
<fileset dir="@{staging.dir}/licences" targetdir="${INSTALL_PATH}/licences"/>
</pack>
<pack name="Zen Binaries" preselected="yes" required="yes">
<description>Zencash Binaries</description>
<fileset dir="@{staging.dir}/zen-win-binaries" targetdir="$INSTALL_PATH/app"/>
<pack name="Zcash Binaries" preselected="yes" required="yes">
<description>Zcash Binaries</description>
<fileset dir="@{staging.dir}/zcash-win-binaries" targetdir="$INSTALL_PATH/app"/>
</pack>
</packs>
</installation>
2 changes: 1 addition & 1 deletion installer/src/main/izpack/welcome.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
</tr>
<tr height="20%">
<td valign=middle align="center" width="100%">
<img src=ZencashLogo />
<img src=ZcashLogo />
</td>
</tr>
<tr height="20%">
Expand Down
Binary file added installer/src/main/izpack/win-shortcut/zcash.ico
Binary file not shown.
3 changes: 3 additions & 0 deletions installer/src/main/izpack/win-shortcut/zcashwallet.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
@ECHO OFF
chdir app
start javaw -jar zcash-wallet-swing.jar
Binary file removed installer/src/main/izpack/win-shortcut/zencash.ico
Binary file not shown.
3 changes: 0 additions & 3 deletions installer/src/main/izpack/win-shortcut/zencashwallet.bat

This file was deleted.

8 changes: 4 additions & 4 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>

<groupId>com.zencash</groupId>
<artifactId>ZENCashOfficialSwingWalletUI</artifactId>
<groupId>z.cash</groupId>
<artifactId>ZCashUNOfficialSwingWalletUI</artifactId>
<version>0.82.9-SNAPSHOT</version>
<packaging>pom</packaging>
<name>ZENCash Official Swing Wallet UI</name>
<name>ZCash UNOfficial Swing Wallet UI</name>

<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
Expand All @@ -25,7 +25,7 @@


<modules>
<module>zencash-wallet-swing</module>
<module>zcash-wallet-swing</module>
<module>installer</module>
</modules>

Expand Down
34 changes: 17 additions & 17 deletions src/build/build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,12 @@
* THE SOFTWARE.
*
-->
<project name="ZENCashSwingWalletUI" basedir="../.." default="buildit">
<project name="ZCashSwingWalletUI" basedir="../.." default="buildit">

<property name="zencash.swing.module.dir" value="${basedir}/zencash-wallet-swing"/>
<property name="zcash.swing.module.dir" value="${basedir}/zcash-wallet-swing"/>
<property name="src.dir" value="src"/>
<property name="lib.dir" value="lib"/>
<property name="deb.dir" value="${zencash.swing.module.dir}/src/deb"/>
<property name="deb.dir" value="${zcash.swing.module.dir}/src/deb"/>
<property name="deb.resource.dir" value="${deb.dir}/resources"/>
<property name="build.dir" value="build"/>
<property name="classes.dir" value="${build.dir}/classes"/>
Expand Down Expand Up @@ -115,45 +115,45 @@

<target name="ubuntuPackage" depends="jar,copyothers">
<mkdir dir="${ubuntu.package.dir}"/>
<deb destfile="${ubuntu.package.dir}/zencash-desktop-gui-wallet_0.82.9_all.deb"
<deb destfile="${ubuntu.package.dir}/zcash-desktop-gui-wallet_0.82.9_all.deb"
control="${deb.dir}/control"
verbose="true">

<data src="${jar.dir}/${ant.project.name}.jar" type="file">
<mapper type="perm" filemode="755" prefix="/usr/lib/zencash-gui-wallet"/>
<mapper type="perm" filemode="755" prefix="/usr/lib/zcash-gui-wallet"/>
</data>
<data src="${jar.dir}/bitcoinj-core-0.14.5.jar" type="file">
<mapper type="perm" filemode="755" prefix="/usr/lib/zencash-gui-wallet"/>
<mapper type="perm" filemode="755" prefix="/usr/lib/zcash-gui-wallet"/>
</data>
<data src="${jar.dir}/bitcoinj-core-0.14.5_LICENSE.txt" type="file">
<mapper type="perm" filemode="755" prefix="/usr/lib/zencash-gui-wallet"/>
<mapper type="perm" filemode="755" prefix="/usr/lib/zcash-gui-wallet"/>
</data>
<data src="${jar.dir}/sqlite-jdbc-3.21.0.jar" type="file">
<mapper type="perm" filemode="755" prefix="/usr/lib/zencash-gui-wallet"/>
<mapper type="perm" filemode="755" prefix="/usr/lib/zcash-gui-wallet"/>
</data>
<data src="${jar.dir}/sqlite-jdbc-3.21.0_LICENSE.txt" type="file">
<mapper type="perm" filemode="755" prefix="/usr/lib/zencash-gui-wallet"/>
<mapper type="perm" filemode="755" prefix="/usr/lib/zcash-gui-wallet"/>
</data>

<!-- TODO: As of Nov 2017 the IPFS wallet integration is suspended.
<data src="${jar.dir}/go-ipfs/ipfs" type="file">
<mapper type="perm" filemode="755" prefix="/usr/lib/zencash-gui-wallet/go-ipfs"/>
<mapper type="perm" filemode="755" prefix="/usr/lib/zcash-gui-wallet/go-ipfs"/>
</data>
<data src="${jar.dir}/go-ipfs/LICENSE" type="file">
<mapper type="perm" filemode="755" prefix="/usr/lib/zencash-gui-wallet/go-ipfs"/>
<mapper type="perm" filemode="755" prefix="/usr/lib/zcash-gui-wallet/go-ipfs"/>
</data>
<data src="${jar.dir}/go-ipfs/README.md" type="file">
<mapper type="perm" filemode="755" prefix="/usr/lib/zencash-gui-wallet/go-ipfs"/>
<mapper type="perm" filemode="755" prefix="/usr/lib/zcash-gui-wallet/go-ipfs"/>
</data>
-->
<data src="${deb.resource.dir}/zencash-desktop-gui-wallet" type="file">
<data src="${deb.resource.dir}/zcash-desktop-gui-wallet" type="file">
<mapper type="perm" filemode="755" prefix="/usr/bin"/>
</data>
<data src="${deb.resource.dir}/ZENCashWallet.desktop" type="file">
<data src="${deb.resource.dir}/ZCashWallet.desktop" type="file">
<mapper type="perm" filemode="755" prefix="/usr/share/applications"/>
</data>
<data src="${deb.resource.dir}/ZEN-icon.png" type="file">
<mapper type="perm" filemode="755" prefix="/usr/lib/zencash-gui-wallet"/>
<data src="${deb.resource.dir}/ZCash-icon.png" type="file">
<mapper type="perm" filemode="755" prefix="/usr/lib/zcash-gui-wallet"/>
</data>
</deb>
</target>
Expand Down Expand Up @@ -191,7 +191,7 @@
</target>

<target name="buildit" depends="clean,jar,copyothers,ubuntuPackage">
<echo message="Built ZENCash Desktop GUI Wallet with JDK ${ant.java.version}"/>
<echo message="Built ZCash Desktop GUI Wallet with JDK ${ant.java.version}"/>
<!-- Final cleanup -->
<delete dir="${classes.dir}"/>
<delete dir="${temp.dir}"/>
Expand Down
2 changes: 1 addition & 1 deletion src/java/com/vaklinov/zcashui/AddressBookPanel.java
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ private JPanel buildButtonsPanel() {
newContactButton.addActionListener(new NewContactActionListener());
panel.add(newContactButton);

sendCashButton = new JButton(langUtil.getString("panel.address.book.send.zen.button.text"));
sendCashButton = new JButton(langUtil.getString("panel.address.book.send.zcash.button.text"));
sendCashButton.addActionListener(new SendCashActionListener());
sendCashButton.setEnabled(false);
panel.add(sendCashButton);
Expand Down
4 changes: 2 additions & 2 deletions src/java/com/vaklinov/zcashui/AddressTable.java
Original file line number Diff line number Diff line change
Expand Up @@ -206,10 +206,10 @@ public void actionPerformed(ActionEvent e)

Log.info("Address for block explorer is: " + address);

String urlPrefix = "https://explorer.zensystem.io/address/";
String urlPrefix = "https://zcash.blockexplorer.com/address/";
if (AddressTable.this.installationObserver.isOnTestNet())
{
urlPrefix = "https://explorer-testnet.zen-solutions.io/address/";
urlPrefix = "https://explorer.testnet.z.cash/address/";
}

Desktop.getDesktop().browse(new URL(urlPrefix + address).toURI());
Expand Down
6 changes: 3 additions & 3 deletions src/java/com/vaklinov/zcashui/AddressesPanel.java
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,7 @@ private void createNewAddress(boolean isZAddress)
this.clientCaller.unlockWallet(pd.getPassword());
}

// zend has a bug that sometimes supposedly newly returned addresses have actually
// zcashd has a bug that sometimes supposedly newly returned addresses have actually
// been used as change addresses.
String address = null;
double dBalance = 0;
Expand All @@ -285,7 +285,7 @@ private void createNewAddress(boolean isZAddress)

if (dBalance > 0)
{
Log.warning("New address {0} generated by ZEND has been used before. Will generate another!", address);
Log.warning("New address {0} generated by ZCASHD has been used before. Will generate another!", address);
}
} while (dBalance > 0);

Expand Down Expand Up @@ -434,7 +434,7 @@ private String[][] getAddressBalanceDataFromWallet()

String[][] addressBalances = new String[zAddresses.length + tAddressesCombined.size()][];

// Format double numbers - else sometimes we get exponential notation 1E-4 ZEN
// Format double numbers - else sometimes we get exponential notation 1E-4 ZEC
DecimalFormat df = new DecimalFormat("########0.00######");

String confirmed = "\u2690";
Expand Down
Loading

0 comments on commit c5f06f6

Please sign in to comment.