Skip to content

Commit

Permalink
Merge pull request #5 from KomodoPlatform/dev
Browse files Browse the repository at this point in the history
Dev
  • Loading branch information
siulynot authored Oct 21, 2018
2 parents 215c4e5 + 3a7453f commit 1490c6f
Show file tree
Hide file tree
Showing 103 changed files with 10,303 additions and 6,910 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ pids
*.pid
*.seed

#ide
/.idea

# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov

Expand Down
2 changes: 1 addition & 1 deletion .gitmodules
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
[submodule "gui/EasyDEX-GUI"]
path = gui/EasyDEX-GUI
url = https://github.com/SuperNETorg/EasyDEX-GUI.git
url = https://github.com/KomodoPlatform/EasyDEX-GUI.git
28 changes: 16 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,16 @@
Desktop App for SuperNET DAPPs

#### For Developers
You must have `node.js` and `npm` installed on your machine.
You must have `node.js`, `npm` and `webpack` (npm install webpack@3.0.0) installed on your machine.

Use install.sh script or

Clone Agama Desktop App with EasyDEX-GUI submodule
```shell
1) git clone https://github.com/supernetorg/agama --recursive --branch pkg_automation_electrum --single-branch
with this command you git clone agama - but explicitly just the pkg_automation_electrum branch (therefore --single-branch) which we also use for the release packages.
1) git clone https://github.com/komodoplatform/agama --recursive --branch dev --single-branch
with this command you git clone agama - but explicitly just the dev branch (therefore --single-branch) which we also use for the release packages.
2) cd agama && cd gui/EasyDEX-GUI/
3) git checkout electrum && git pull origin electrum
3) git checkout dev && git pull origin dev
4) npm install && npm install webpack
5) ./binary_artifacts.sh
6) npm start in project root folder
Expand Down Expand Up @@ -40,27 +42,29 @@ npm install electron-prebuilt -g
```

#### **Build the Wallet-App**
You need to install webpack and webpack-cli first.

Refer to the original [electron-packager](https://github.com/electron-userland/electron-packager) repository for more detailed information.

##### Linux
Change directory to iguana and execute the following command to build the Linux app
Change directory to agama and execute the following command to build the Linux app
```shell
cd iguana
cd agama
electron-packager . --platform=linux --arch=x64 --icon=assets/icons/agama_icons/128x128.png --out=build/ --buildVersion=VERSION_NUMBER_HERE --ignore=assets/bin/win64 --ignore=assets/bin/osx --overwrite
```
change architecture build parameter to ```--arch=x32``` for 32 bit build

##### OSX
Change directory to iguana and execute the following command to build the OSX app
Change directory to agama and execute the following command to build the OSX app
```shell
cd iguana
cd agama
electron-packager . --platform=darwin --arch=x64 --icon=assets/icons/agama_icons/agama_app_icon.icns --out=build/ --buildVersion=VERSION_NUMBER_HERE --ignore=assets/bin/win64 --ignore=assets/bin/linux64 --overwrite
```

##### Windows
Change directory to iguana and execute the following command to build the Windows app
Change directory to agama and execute the following command to build the Windows app
```shell
dir iguana
dir agama
electron-packager . --platform=win32 --arch=x64 --icon=assets/icons/agama_icons/agama_app_icon.ico --out=build/ --buildVersion=VERSION_NUMBER_HERE --ignore=assets/bin/osx --ignore=assets/bin/linux64 --overwrite

# If generating 32bit desktop package
Expand All @@ -75,7 +79,7 @@ change architecture build parameter to ```--arch=x64``` for 64 bit build
## Troubleshooting Instructions

### Windows DLL issues
On Windows it's noticed iguana.exe complains about `VCRUNTIME140D.DLL` and `ucrtbased.dll` file.
On Windows it's noticed agama.exe complains about `VCRUNTIME140D.DLL` and `ucrtbased.dll` file.

Please see **windeps** directory and README file for instructions to install the required DLL files on Windows, and then try again running Agama App.

Expand All @@ -85,4 +89,4 @@ electron-installer-debian

electron-installer-redhat

refer to ./make-deb.js and ./make-rpm.js
refer to ./make-deb.js and ./make-rpm.js
77 changes: 48 additions & 29 deletions binary_artifacts.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
echo Refreshing binaries from artifacts.supernet.org
echo Refreshing binaries from github releases [https://github.com/komodoplatform/komodo]
echo =========================================
echo Step: Removing old binaries
echo Step: Cleaning up working dir
pwd
[ ! -d assets ] && \
mkdir -p assets
Expand All @@ -9,46 +9,65 @@ cd assets
echo Removing old artifacts. && \
rm -rvf artifacts.supernet.org
echo
echo Step: Cloning latest binaries for build
wget --recursive --no-parent https://artifacts.supernet.org/latest/
echo =========================================
echo Step: Downloading latest LINUX komodo binaries from github
curl -s https://api.github.com/repos/KomodoPlatform/komodo/releases/latest \
| grep browser_download_url \
| grep linux_master \
| cut -d '"' -f 4 \
| wget -qi -
tar xvfz komodo_linux_master.tar.gz
mv src bins_linux/
echo =========================================
echo Step: Downloading latest WIN komodo binaries from github
curl -s https://api.github.com/repos/KomodoPlatform/komodo/releases/latest \
| grep browser_download_url \
| grep win_master \
| cut -d '"' -f 4 \
| wget -qi -
unzip komodo_win_master.zip
mv komodo_win_master bins_win/
cd ..
echo =========================================
echo
pwd
echo =========================================
echo Step: Permission +x for OSX binaries from artifacts to assets/bin/osx/
echo
rm assets/artifacts.supernet.org/latest/osx/iguana
chmod +x assets/artifacts.supernet.org/latest/osx/komodo*

mkdir assets/bin
mv assets/artifacts.supernet.org/latest/osx assets/bin/osx

echo Moving legacy libs to assets/bin
wget https://supernetorg.bintray.com/misc/libs_legacy_osx.zip
checksum=`shasum -a 256 libs_legacy_osx.zip | awk '{ print $1 }'`
if [ "$checksum" = "e9474aa243694a2d4c87fccc443e4b16a9a5172a24da76af9e5ecddd006649bb" ]; then
mkdir assets/bin/osx
echo Moving OSX komodo bins to assets/bin/osx
wget https://supernetorg.bintray.com/binaries/kmd_osx_bins.zip
checksum=`shasum -a 256 kmd_osx_bins.zip | awk '{ print $1 }'`
if [ "$checksum" = "4bb33149e4322d6d4a4c9ea41c3baa33ce125c4f2ccb7e7336fcd4f295ea5351" ]; then
echo "Checksum is correct."
unzip libs_legacy_osx.zip
cp -rvf libs_legacy_osx/* assets/bin/osx/.
unzip kmd_osx_bins.zip
cp -rvf kmd_osx_bins/* assets/bin/osx/.
else
echo "Checksum is incorrect!"
exit 0
fi

# echo Moving legacy libs to assets/bin
# wget https://supernetorg.bintray.com/misc/libs_legacy_osx.zip
# checksum=`shasum -a 256 libs_legacy_osx.zip | awk '{ print $1 }'`
# if [ "$checksum" = "e9474aa243694a2d4c87fccc443e4b16a9a5172a24da76af9e5ecddd006649bb" ]; then
# echo "Checksum is correct."
# unzip libs_legacy_osx.zip
# cp -rvf libs_legacy_osx/* assets/bin/osx/.
# else
# echo "Checksum is incorrect!"
# exit 0
# fi

echo =========================================
echo Step: Moving Windows binaries from artifacts to assets/bin/win64/
#echo
rm assets/artifacts.supernet.org/latest/windows/iguana
mv assets/artifacts.supernet.org/latest/windows assets/bin/win64
echo Moving Windows binaries to assets/bin/win64/
mv assets/bins_win assets/bin/win64/
echo
echo =========================================
echo Step: Permissions +x for linux64 binaries from artifacts to assets/bin/linux64
echo
rm assets/artifacts.supernet.org/latest/linux/iguana
chmod +x assets/artifacts.supernet.org/latest/linux/komodo*
echo Moving Linux bins to assets/bin
mv assets/artifacts.supernet.org/latest/linux assets/bin/linux64/
echo Set permission +x for linux64 binaries
chmod +x assets/bins_linux/komodo*
echo Moving Linux komodo bins to assets/bin
mv assets/bins_linux assets/bin/linux64/
echo
echo =========================================
echo Step: Finished Updating binaries from artifacts
echo
echo Finished Updating binaries from github
echo
30 changes: 30 additions & 0 deletions build-linux.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
#!/bin/bash
# example ./build-linux.sh 0.2.42

rm -rf build

[ -z $1 ] && echo "AGAMA_VERSION variable is not set." && exit 0
[ ! -d build ] && mkdir build

echo
echo "Build script for Iguana application for Linux x64 platform."
echo "Preparing electron package $1"

npm run make-patch
electron-packager . --platform=linux --arch=x64 \
--icon=assets/icons/agama_icons/128x128.png \
--out=build/ \
--buildVersion=$1 \
--ignore=assets/bin/win64 \
--ignore=assets/bin/osx \
--ignore=react/node_modules \
--ignore=react/src \
--ignore=react/www \
--overwrite
cd build/Agama-linux-x64/resources/app
rm -rf gui
unzip -o patch.zip
rm patch.zip
cd ../../../
zip -r Agama-linux-x64 Agama-linux-x64
mv Agama-linux-x64.zip Agama-linux-x64-v$1.zip
4 changes: 2 additions & 2 deletions buildscripts/easydex-build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ echo "Building EasyDEX-GUI"
echo "Actual directory is: ${PWD}"

echo "Checkout to redux branch."
git checkout electrum
git pull origin electrum
git checkout v0.25
git pull origin v0.25

[ -d react ] && cd react || echo "!!! I can't find react"
echo "Actual directory is: ${PWD}"
Expand Down
71 changes: 0 additions & 71 deletions gui/startup/app-settings.html

This file was deleted.

Loading

0 comments on commit 1490c6f

Please sign in to comment.