Skip to content
Permalink
Browse files

Merge pull request turtlecoin#6 from rixombea/master

Update build instruction + layout fixes
  • Loading branch information...
rixombea committed Sep 15, 2018
2 parents be69658 + 9b27609 commit 433a5f431fcad9e999d1decb06c78ec67f6a7f80
@@ -27,7 +27,7 @@ If you don't trust the bundled `turtle-service` file, you can compare the sha256

### Download & Run WalletShell

* Download latest packaged release for your platform here: https://github.com/rixombea/turtle-wallet-electron/releases
* Download latest packaged release for your platform here: https://github.com/turtlecoin//turtle-wallet-electron/releases

* Extract downloaded file
* Open/Run the wallet executable, located in the extracted directory:
@@ -41,23 +41,40 @@ You need to have `Node.js` and `npm` installed, go to https://nodejs.org and fin

Once you have Node installed:
```
# first, download turtle-service binary for each platform
# from TurtleCoin official repo
# https://github.com/turtlecoin/turtlecoin/releases
# extract the turtle-service executable somewhere
# clone the repo
git clone https://github.com/turtlecoin/turtle-wallet-electron
cd turtle-wallet-electron
$ git clone https://github.com/turtlecoin/turtle-wallet-electron
$ cd turtle-wallet-electron
# install dependencies
npm install
$ npm install
# create build directory
$ mkdir ./build
# copy/symlink icons from assets, required for packaging
$ cp ./assets/icon.* ./build/
# build GNU/Linux package
npm run linpack
$ mkdir -p ./tbin/lin
$ cp /path/to/linux-version-of/turtle-service ./tbin/lin/
$ npm run linpack
# build Windows package
npm run winpack
$ mkdir -p ./tbin/win
$ cp /path/to/win-version-of/turtle-service.exe ./tbin/win/
$ npm run winpack
# build OSX package
npm run osxpack
$ mkdir -p ./tbin/osx
$ cp /path/to/osx-version-of/turtle-service ./tbin/osx/
$ npm run osxpack
```

Find the binary in a ready to package folder for each platform inside `build` subdirectory.
You can find the resulting walletshell binary in a ready to package folder inside `build/walletshell-<platform>-<arch>` subdirectory.


49 main.js
@@ -11,6 +11,7 @@ const IS_DEBUG = (process.argv[1] === 'debug' || process.argv[2] === 'debug');
const SERVICE_FILENAME = (platform === 'win32' ? 'turtle-service.exe' : 'turtle-service' );
const DEFAULT_SERVICE_BIN = path.join(process.resourcesPath, SERVICE_FILENAME);
const DEFAULT_TITLE = 'TurtleCoin Wallet';
const DEFAULT_TRAY_TIP = 'Slow and steady wins the race!';
const PUBLIC_NODES_URL = 'https://raw.githubusercontent.com/turtlecoin/turtlecoin-nodes-json/master/turtlecoin-nodes.json';
const FALLBACK_NODES = [
'public.turtlenode.io:11898',
@@ -30,34 +31,27 @@ const DEFAULT_SETTINGS = {
tray_close: false
}

let win;

app.prompExit = true;
app.needToExit = false;

let trayIcon = path.join(__dirname,'src/assets/tray_24x24.png');
if(platform === 'darwin'){
trayIcon = path.join(__dirname,'src/assets/tray.icns');
}else if(platform === 'win32'){
trayIcon = path.join(__dirname,'src/assets/tray.ico');
}
let trayIcon = path.join(__dirname,'src/assets/tray.png');
let trayIconHide = path.join(__dirname,'src/assets/trayon.png');

let trayIconHide = path.join(__dirname,'src/assets/trayon_24x24.png');
if(platform === 'darwin'){
trayIconHide = path.join(__dirname,'src/assets/trayon.icns');
}else if(platform === 'win32'){
trayIconHide = path.join(__dirname,'src/assets/trayon.ico');
}
let win;
let tray;

function createWindow () {
// Create the browser window.
win = new BrowserWindow({
title: DEFAULT_TITLE,
icon: path.join(__dirname,'src/assets/walletshell_icon.png'),
frame: true,//frame: false,
frame: true,
width: 800,
height: 680,
minWidth: 800,
minHeight: 680,
// maxWidth: 1280,
show: false,
backgroundColor: '#02853e',
});
@@ -70,11 +64,11 @@ function createWindow () {
}
}
]);
// linux default;
const tray = new Tray(trayIcon);

tray = new Tray(trayIcon);
tray.setPressedImage(trayIconHide);
tray.setTitle(DEFAULT_TITLE);
tray.setToolTip('Slow and steady wins the race!');
tray.setToolTip(DEFAULT_TRAY_TIP);
tray.setContextMenu(contextMenu);
tray.on('click', () => {
win.isVisible() ? win.hide() : win.show();
@@ -92,6 +86,7 @@ function createWindow () {
}
]);
tray.setContextMenu(contextMenu);
tray.setToolTip(DEFAULT_TRAY_TIP);
});

win.on('hide', () => {
@@ -130,6 +125,7 @@ function createWindow () {
win.once('ready-to-show', () => {
win.show();
win.setTitle(DEFAULT_TITLE);
tray.setToolTip(DEFAULT_TRAY_TIP);
})

win.on('close', (e) => {
@@ -238,6 +234,7 @@ if (!silock) app.quit();

app.on('ready', () => {
initSettings();
if(IS_DEBUG) console.log('Running in debug mode');

global.wsession = {
loadedWalletAddress: '',
@@ -261,8 +258,6 @@ app.on('ready', () => {
debug: IS_DEBUG
};

if(IS_DEBUG) console.log('Running in debug mode');

let today = new Date();
let last_checked = new Date(settings.get('pubnodes_date'));
diff_d = parseInt((today-last_checked)/(1000*60*60*24),10);
@@ -281,7 +276,7 @@ app.on('ready', () => {
app.on('window-all-closed', () => {
// On macOS it is common for applications and their menu bar
// to stay active until the user quits explicitly with Cmd + Q
if (process.platform !== 'darwin') app.quit();
if (platform !== 'darwin') app.quit();
});

app.on('activate', () => {
@@ -304,12 +299,10 @@ process.on('exit', (code) => {
});

process.on('warning', (warning) => {
if(IS_DEBUG){
console.warn(warning.name);
console.warn(warning.message);
console.warn(warning.code);
console.warn(warning.stack);
console.warn(warning.detail);
}
});
if(IS_DEBUG) console.warn(warning.code, warning.message);
// console.warn(warning.name);
// console.warn(warning.code);
// console.warn(warning.stack);
// console.warn(warning.detail);

});
BIN -141 KB (60%) src/assets/background.png
Binary file not shown.
BIN +96.8 KB src/assets/icon.icns
Binary file not shown.
BIN +361 KB src/assets/icon.ico
Binary file not shown.
BIN +25 KB src/assets/icon.png
Binary file not shown.
BIN -76.3 KB src/assets/tray.icns
Binary file not shown.
BIN -361 KB src/assets/tray.ico
Binary file not shown.
BIN -910 Bytes (92%) src/assets/tray.png
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN -75.3 KB src/assets/trayon.icns
Binary file not shown.
BIN -361 KB src/assets/trayon.ico
Binary file not shown.
BIN -959 Bytes (92%) src/assets/trayon.png
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.

This file was deleted.

@@ -45,6 +45,9 @@ body {
text-align: center;
}

.text-center{
text-align: center;
}
/* The titlebar */
.titlebar {
z-index: 1;
@@ -153,6 +156,14 @@ body {
top: 15px;
left: 10px;
}
.navbar-inner{
height: 45px;
overflow: hidden;
max-width: 1380px;
margin: 0 auto;
padding: 0;
width: 100%;
}

.navbar-button {
height: 45px;
@@ -198,12 +209,12 @@ body {

#main-div {
width: 99.6%;
height: 88.5%;
position: relative;
top:0;
height: 91.5%;
position: absolute;
top:45px;
/* margin: -130px 0 0 0; */
/* margin: -14.5% 0 0 0; */
margin: -15.5% 0 0 0;
/* margin: -15.5% 0 0 0; */
padding: 0;
}

@@ -497,7 +508,7 @@ input.short-number{
/* Sections */
.section {
position: absolute;
top: 0;
top: 1rem;
left: 0;
right: 0;
bottom: 0;
@@ -506,7 +517,6 @@ input.short-number{
height: 99%;
min-width: 797.3px; /* maybe 800px is too much? */
min-height: 400px;
padding: 0;
/* Hidden by default */
pointer-events: none;
visibility: hidden;
@@ -526,12 +536,13 @@ input.short-number{
.section > div{
position: relative;
width: 87.7%;
max-width: 1280px;
margin: 0 auto;
height: 92.9%;
user-select: none;
}
.section-contents{
padding: 1rem 3rem 0 3rem;
padding: 2rem 3rem 0 3rem;
}
.welcome-box{
width: 80%;
@@ -981,7 +992,7 @@ span.form-help-qr.hidden{
display: inline-block;
background-color: #00632e;
color: #fff;
padding: 0px 8px;
padding: 0px 0px;
margin: 0 4px 0 0;
text-align: center;
line-height: normal !important;
@@ -999,6 +1010,7 @@ span.form-help-qr.hidden{
font-size: 1.2rem;
font-weight: 600;
text-decoration: none;
padding: 0px 8px;

}

@@ -1196,6 +1208,7 @@ padding: 10px 0 0 0;
border: 2px solid #ccc;
border-radius: 4px;
margin-left: 2px;
cursor: pointer;
}

.csort.asc:after,
@@ -1278,6 +1291,7 @@ progress.light{
height: 0.25em;
}

/*
@media only screen and (max-width : 780px) {
.section > div, .section-contents{
width: 81.4%;
@@ -1290,4 +1304,16 @@ progress.light{
.section-contents{
padding: 10% 3rem 0 3rem;
}
}
}
@media only screen and (min-width : 1290px) {
body{
background: #333;
}
.section-contents {
background-image: url("../assets/background.png");
background-size: cover;
}
}
*/
@@ -28,6 +28,7 @@
<body>
<!-- Top navbar -->
<div class="navbar">

<!-- being honest im not sure if this is the best way to do this -->
<div class="idle" id="navbar-div-sync">
<i class="fas fa-pause-circle" id="navbar-icon-sync"></i>
@@ -57,7 +58,7 @@
<button title="Overview" class="form-bt navbar-button navbar-need-connected" data-section="section-overview" id="button-section-overview">
<i class="fas fa-wallet"></i> <span class="navbar-label">Overview</span>
</button>

</div>

<!-- Background Logo -->
@@ -16,7 +16,11 @@
<!-- <progress class="light block-progress-extra"></progress> -->
<div class="transaction-table-wrapper">
<table class="custom-table transaction-list-table" id="transaction-list-table">
<tbody class="list"></tbody>
<tbody class="list">
<tr id="txfiller">
<td colspan="2" class="text-center">No transactions found, yet -:(.</td>
</tr>
</tbody>
</table>
</div>
<ul class="pagination"></ul>

0 comments on commit 433a5f4

Please sign in to comment.
You can’t perform that action at this time.