-
Notifications
You must be signed in to change notification settings - Fork 57
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #279 from DeFiCh/ci/master
release: 2.1.7
- Loading branch information
Showing
148 changed files
with
12,438 additions
and
2,232 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,71 +1,62 @@ | ||
on: | ||
push: | ||
branches: | ||
- ci/master | ||
- 'ci/**' | ||
- master | ||
- code-refactoring | ||
jobs: | ||
build_linux_version: | ||
runs-on: ubuntu-latest | ||
env: | ||
GH_TOKEN: ${{ secrets.GH_TOKEN}} | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Get App Version | ||
uses: nyaayaya/package-version@v1 | ||
- name: install dependencies | ||
run: npm cache clean --force && npm run init | ||
- name: Build app | ||
run: npm run build:linux | ||
- uses: actions/upload-artifact@v2 | ||
with: | ||
name: linux-build | ||
path: 'dist/defi-app-2.1.6.AppImage' | ||
path: 'dist/defi-app-${{ env.PACKAGE_VERSION}}.AppImage' | ||
|
||
build_mac_version: | ||
runs-on: macos-latest | ||
env: | ||
GH_TOKEN: ${{ secrets.GH_TOKEN}} | ||
CSC_LINK: ${{ secrets.CSC_LINK}} | ||
CSC_KEY_PASSWORD: ${{ secrets.CSC_KEY_PASSWORD}} | ||
CI: true | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Get App Version | ||
uses: nyaayaya/package-version@v1 | ||
- name: install dependencies | ||
run: npm cache clean --force && npm run init | ||
- name: Build app | ||
run: npm run build:mac | ||
- uses: actions/upload-artifact@v2 | ||
with: | ||
name: mac-build | ||
path: 'dist/defi-app-2.1.6.dmg' | ||
path: 'dist/defi-app-${{ env.PACKAGE_VERSION}}.dmg' | ||
|
||
build_windows_version: | ||
runs-on: windows-latest | ||
env: | ||
GH_TOKEN: ${{ secrets.GH_TOKEN}} | ||
CSC_LINK: ${{ secrets.CSC_LINK}} | ||
CSC_KEY_PASSWORD: ${{ secrets.CSC_KEY_PASSWORD}} | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Get App Version | ||
uses: nyaayaya/package-version@v1 | ||
- name: install dependencies | ||
run: npm cache clean --force && npm run init | ||
- name: Build app | ||
run: | | ||
mkdir binary -ea 0 | ||
cd binary | ||
rm -r -fo win, mac, linux -ErrorAction Ignore | ||
mkdir win | ||
cd .. | ||
mkdir temp -ea 0 | ||
cd temp | ||
rm -r -fo win -ErrorAction Ignore | ||
mkdir win | ||
cd win | ||
curl https://github.com/DeFiCh/ain/releases/download/v1.3.17rc3/defichain-1.3.17rc3-x86_64-w64-mingw32.zip -O defichain-1.3.17rc3-x86_64-w64-mingw32.zip | ||
Expand-Archive -LiteralPath .\defichain-1.3.17rc3-x86_64-w64-mingw32.zip -DestinationPath . | ||
Copy-Item .\defichain-1.3.17rc3\bin\defid.exe . | ||
cd ..\.. | ||
Copy-Item temp\win\defid.exe binary\win\defid.exe | ||
icacls binary\win\defid.exe /grant everyone:F | ||
npm run build:win | ||
run: npm run build:win | ||
shell: powershell | ||
- uses: actions/upload-artifact@v2 | ||
with: | ||
name: win-build | ||
path: 'dist/defi-app Setup 2.1.6.exe' | ||
path: 'dist/defi-app Setup ${{ env.PACKAGE_VERSION}}.exe' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,52 +1,73 @@ | ||
# DeFi app | ||
# DeFi App | ||
|
||
![Image](https://i.imgur.com/F7tpKU5.png) | ||
Use DeFi app to interact with DeFiChain. It is a wallet for \$DFI, wrapped BTC, ETH, USDT. Liquidity mine, use the DEX, create masternodes, and more. | ||
![Image](https://defichain.com/img/app/liquidity@2x.png) | ||
|
||
For direct download, check the [Releases](https://github.com/DeFiCh/app/releases) for latest downloadable binaries for Windows, Mac and Linux. | ||
# Documentation | ||
- [Getting started](#getting-started) | ||
- [Development](#development) | ||
- [About Us](https://defichain.com/) | ||
|
||
## Scripts | ||
# Getting Started | ||
[Download the desktop app](https://defichain.com/downloads/) or [check releases](https://github.com/DeFiCh/app/releases) for latest downloadable installers for Windows, Mac and Linux. | ||
|
||
`npm run init` initialize and install npm dependency for electron and webapp | ||
# Development | ||
|
||
## Setup binary | ||
## Initial Setup | ||
|
||
Fetch and extract binary file | ||
##### Install all dependencies for both Electron and WebApp | ||
|
||
Mac: `sh ./pre-build-mac.sh` | ||
Linux: `sh ./pre-build-linux.sh` | ||
Windows: `sh ./pre-build-win.sh` | ||
```bash | ||
npm run init | ||
``` | ||
|
||
### Run Electron desktop app with webapp | ||
##### Setup the required binary | ||
|
||
`npm start` | ||
To connect to the node, you need to setup the binary. Run the command below that matches your Operating System. | ||
|
||
### Run Electron desktop app with webapp in dev mode | ||
| Operating System | Command | | ||
| ---------------- | ------------------------- | | ||
| Windows | `npm run pre:build:win` | | ||
| Mac | `npm run pre:build:mac` | | ||
| Linux | `npm run pre:build:linux` | | ||
|
||
`npm run start:dev` | ||
## Running Apps (Electron and WebApp) | ||
|
||
### Run webapp | ||
##### To run both apps in Dev Mode | ||
|
||
`npm run start:react` | ||
```bash | ||
npm run start:dev | ||
``` | ||
|
||
### Build react app | ||
##### To run WebApp only | ||
|
||
`npm run build:react` | ||
```bash | ||
npm run start:react | ||
``` | ||
|
||
### Build electron app for native platform | ||
##### To run Electron only | ||
|
||
`npm run build` | ||
```bash | ||
npm run start:electron | ||
``` | ||
|
||
### Build electron app for all platform | ||
## Building Apps | ||
|
||
`npm run build:all` | ||
##### To build the app using native platform | ||
|
||
## Electron configuration | ||
```bash | ||
npm run build | ||
``` | ||
|
||
Electron config is in [electron-app/index.ts](electron-app/index.ts) | ||
##### To build the app for all platforms | ||
|
||
## License | ||
```bash | ||
npm run build:all | ||
``` | ||
|
||
The DeFi Blockchain App is released under the terms of the MIT license. For more | ||
information see https://opensource.org/licenses/MIT. | ||
## Licenses | ||
|
||
QR scanner shutter audio `webapp/src/assets/audio/shutter.mp3` is licensed by [Soundsnap](https://www.soundsnap.com). Commercial redistribution of the audio is prohibited. For full Soundsnap license, visit [https://www.soundsnap.com/licence](https://www.soundsnap.com/licence). | ||
The DeFi Blockchain App is released under the terms of the MIT license. For more information see https://opensource.org/licenses/MIT. | ||
|
||
QR scanner shutter audio `webapp/src/assets/audio/shutter.mp3` is licensed by [Soundsnap](https://www.soundsnap.com). | ||
Commercial redistribution of the audio is prohibited. For full Soundsnap license, visit [https://www.soundsnap.com/licence](https://www.soundsnap.com/licence). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | ||
<plist version="1.0"> | ||
<dict> | ||
<key>com.apple.security.cs.allow-unsigned-executable-memory</key> | ||
<true/> | ||
<key>com.apple.security.cs.allow-jit</key> | ||
<true/> | ||
<key>com.apple.security.cs.disable-library-validation</key> | ||
<true/> | ||
<key>com.apple.security.files.user-selected.read-write</key> | ||
<true/> | ||
<key>com.apple.developer.aps-environment</key> | ||
<true/> | ||
<key>com.apple.security.device.camera</key> | ||
<true/> | ||
</dict> | ||
</plist> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
const { notarize } = require('electron-notarize'); | ||
const { build } = require('../../package.json'); | ||
|
||
exports.default = async function notarizeMacOS(context) { | ||
const { electronPlatformName, appOutDir } = context; | ||
if (electronPlatformName !== 'darwin') { | ||
return; | ||
} | ||
|
||
if (!process.env.CI) { | ||
console.warn('Skipping notarizing step. Packaging is not running in CI'); | ||
return; | ||
} | ||
|
||
if (!('APPLE_ID' in process.env && 'APPLE_ID_PASS' in process.env)) { | ||
console.warn( | ||
'Skipping notarizing step. APPLE_ID and APPLE_ID_PASS env variables must be set' | ||
); | ||
return; | ||
} | ||
|
||
const appName = context.packager.appInfo.productFilename; | ||
|
||
await notarize({ | ||
appBundleId: build.appId, | ||
appPath: `${appOutDir}/${appName}.app`, | ||
appleId: process.env.APPLE_ID, | ||
appleIdPassword: process.env.APPLE_ID_PASS, | ||
}); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,2 @@ | ||
export * from './app'; | ||
export * from './dirpath'; | ||
export * from './ipcevents'; | ||
export * from './uiconfig'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.