-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
14 changed files
with
365 additions
and
1 deletion.
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 |
---|---|---|
@@ -0,0 +1,45 @@ | ||
FROM ubuntu:bionic as builder | ||
|
||
# Grab dependencies | ||
RUN apt-get update | ||
RUN apt-get dist-upgrade --yes | ||
RUN apt-get install --yes \ | ||
curl \ | ||
jq \ | ||
squashfs-tools | ||
|
||
# Grab the core snap from the stable channel and unpack it in the proper place | ||
RUN curl -L $(curl -H 'X-Ubuntu-Series: 16' 'https://api.snapcraft.io/api/v1/snaps/details/core' | jq '.download_url' -r) --output core.snap | ||
RUN mkdir -p /snap/core | ||
RUN unsquashfs -d /snap/core/current core.snap | ||
|
||
# Grab the snapcraft snap from the stable channel and unpack it in the proper place | ||
RUN curl -L $(curl -H 'X-Ubuntu-Series: 16' 'https://api.snapcraft.io/api/v1/snaps/details/snapcraft?channel=stable' | jq '.download_url' -r) --output snapcraft.snap | ||
RUN mkdir -p /snap/snapcraft | ||
RUN unsquashfs -d /snap/snapcraft/current snapcraft.snap | ||
|
||
# Create a snapcraft runner (TODO: move version detection to the core of snapcraft) | ||
RUN mkdir -p /snap/bin | ||
RUN echo "#!/bin/sh" > /snap/bin/snapcraft | ||
RUN snap_version="$(awk '/^version:/{print $2}' /snap/snapcraft/current/meta/snap.yaml)" && echo "export SNAP_VERSION=\"$snap_version\"" >> /snap/bin/snapcraft | ||
RUN echo 'exec "$SNAP/usr/bin/python3" "$SNAP/bin/snapcraft" "$@"' >> /snap/bin/snapcraft | ||
RUN chmod +x /snap/bin/snapcraft | ||
|
||
# Multi-stage build, only need the snaps from the builder. Copy them one at a | ||
# time so they can be cached. | ||
FROM ubuntu:bionic | ||
COPY --from=builder /snap/core /snap/core | ||
COPY --from=builder /snap/snapcraft /snap/snapcraft | ||
COPY --from=builder /snap/bin/snapcraft /snap/bin/snapcraft | ||
|
||
# Generate locale | ||
RUN apt-get update && apt-get dist-upgrade --yes && apt-get install --yes sudo locales && locale-gen en_US.UTF-8 | ||
|
||
# Set the proper environment | ||
ENV LANG="en_US.UTF-8" | ||
ENV LANGUAGE="en_US:en" | ||
ENV LC_ALL="en_US.UTF-8" | ||
ENV PATH="/snap/bin:$PATH" | ||
ENV SNAP="/snap/snapcraft/current" | ||
ENV SNAP_NAME="snapcraft" | ||
ENV SNAP_ARCH="amd64" |
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 +1,47 @@ | ||
CloudCoinWallet-snap | ||
This is the Snap Packaging for Java-based [CloudCoin Wallet Desktop App](https://cloudcoinconsortium.com/use.html). | ||
|
||
Why to package the app with [Snapcraft](https://snapcraft.io/)? | ||
|
||
- **Snaps are easy to discover and install** | ||
Millions of users can browse and install snaps graphically in the Snap Store or from the command-line. | ||
- **Snaps install and run the same across Linux** | ||
They bundle the exact version of whatever is required, along with all of your app’s dependencies, be they Java modules or system libraries. | ||
- **Snaps automatically update to the latest version** | ||
Four times a day, users’ systems will check for new versions and upgrade in the background. | ||
- **Upgrades are not disruptive** | ||
Because upgrades are not in-place, users can keep your app open as it’s upgraded in the background. | ||
- **Upgrades are safe** | ||
If your app fails to upgrade, users automatically roll back to the previous revision. | ||
|
||
## Install | ||
|
||
Go to the Release page to download the snap file that we built. | ||
|
||
Then, run the following command to install it. | ||
|
||
```bash | ||
sudo snap install cloudcoinwallet_2.1.18_amd64.snap --devmode | ||
``` | ||
|
||
> NOTE: | ||
> | ||
> You need to finish the snapd installation on your Linux desktop first if not found snap command. | ||
## Rebuild (optional) | ||
|
||
To create a snap, you need to finish the installation of the [Snapcraft](https://snapcraft.io/), the snap-building tool. | ||
|
||
Since my Mint Linux desktop isn't supporting for the Snapcraft so I used Docker for Snapcraft. | ||
|
||
Build snapcraft image | ||
|
||
```bash | ||
$ docker build -t snapcraft:core18 . | ||
``` | ||
|
||
Build snap app | ||
|
||
```bash | ||
$ docker run -v "$PWD":/build -w /build snapcraft:core18 snapcraft | ||
``` | ||
|
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,5 @@ | ||
#!/bin/sh | ||
|
||
THEME=${1:-Blue} | ||
export JAVA_TOOL_OPTIONS="-Duser.language=en-US -Dfile.encoding=UTF-8 -Dsun.jnu.encoding=UTF-8" | ||
java -jar $SNAP/cc_wallet/CloudCoinWallet${THEME}_${APP_VER}.jar |
Binary file not shown.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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,8 @@ | ||
[Desktop Entry] | ||
Type=Application | ||
Name=CloudCoinWallet.Blue | ||
Comment=CloudCoin Wallet Desktop App - Blue Theme | ||
Icon=${SNAP}/meta/gui/cc_blue.png | ||
Exec=cloudcoinwallet.blue | ||
Terminal=false | ||
Categories=Finance;Network; |
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,8 @@ | ||
[Desktop Entry] | ||
Type=Application | ||
Name=CloudCoinWallet.Dark | ||
Comment=CloudCoin Wallet Desktop App - Dark Theme | ||
Icon=${SNAP}/meta/gui/cc_dark.png | ||
Exec=cloudcoinwallet.dark | ||
Terminal=false | ||
Categories=Finance;Network; |
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,50 @@ | ||
name: cloudcoinwallet | ||
version: "2.1.18" | ||
summary: CloudCoin Wallet Desktop Application | ||
description: | | ||
CloudCoin is a digital currency. That cannot be counterfeited, controlled, | ||
tracked or stolen. CloudCoins cannot be double-spent, mined or lost. | ||
It is 100% private and requires no public ledgers, accounts, or encryption. | ||
CloudCoin is a completely fair and ethical monetary system. | ||
confinement: devmode | ||
grade: stable | ||
|
||
apps: | ||
blue: | ||
command: bin/CloudCoinWallet.sh Blue | ||
environment: | ||
LC_ALL: "C" | ||
JAVA_HOME: "$SNAP/usr/lib/jvm/java-8-openjdk-amd64" | ||
PATH: "$JAVA_HOME/jre/bin:$PATH" | ||
XDG_DATA_HOME: "$SNAP/usr/share" | ||
FONTCONFIG_PATH: "$SNAP/etc/fonts/config.d" | ||
FONTCONFIG_FILE: "$SNAP/etc/fonts/fonts.conf" | ||
dark: | ||
command: bin/CloudCoinWallet.sh Dark | ||
environment: | ||
LC_ALL: "C" | ||
JAVA_HOME: "$SNAP/usr/lib/jvm/java-8-openjdk-amd64" | ||
PATH: "$JAVA_HOME/jre/bin:$PATH" | ||
XDG_DATA_HOME: "$SNAP/usr/share" | ||
FONTCONFIG_PATH: "$SNAP/etc/fonts/config.d" | ||
FONTCONFIG_FILE: "$SNAP/etc/fonts/fonts.conf" | ||
|
||
plugs: | ||
unity7: | ||
network: | ||
home: | ||
x11: | ||
desktop: | ||
desktop-legacy: | ||
|
||
parts: | ||
cloudcoinwallet: | ||
source: . | ||
plugin: dump | ||
organize: | ||
CloudCoinWallet.sh: bin/CloudCoinWallet.sh | ||
stage-packages: | ||
- fonts-dejavu-core | ||
- libfontconfig1 | ||
- openjdk-8-jre | ||
- ca-certificates-java |
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,52 @@ | ||
name: cloudcoinwallet | ||
version: "2.1.18" | ||
summary: CloudCoin Wallet Desktop Application | ||
description: | | ||
CloudCoin is a digital currency. That cannot be counterfeited, controlled, | ||
tracked or stolen. CloudCoins cannot be double-spent, mined or lost. | ||
It is 100% private and requires no public ledgers, accounts, or encryption. | ||
CloudCoin is a completely fair and ethical monetary system. | ||
confinement: devmode | ||
grade: stable | ||
|
||
apps: | ||
blue: | ||
command: desktop-launch $SNAP/bin/CloudCoinWallet.sh Blue | ||
environment: | ||
LC_ALL: "C" | ||
JAVA_HOME: "$SNAP/usr/lib/jvm/java-8-openjdk-amd64" | ||
PATH: "$JAVA_HOME/jre/bin:$PATH" | ||
XDG_DATA_HOME: "$SNAP/usr/share" | ||
FONTCONFIG_PATH: "$SNAP/etc/fonts/config.d" | ||
FONTCONFIG_FILE: "$SNAP/etc/fonts/fonts.conf" | ||
dark: | ||
command: desktop-launch $SNAP/bin/CloudCoinWallet.sh Dark | ||
environment: | ||
LC_ALL: "C" | ||
JAVA_HOME: "$SNAP/usr/lib/jvm/java-8-openjdk-amd64" | ||
PATH: "$JAVA_HOME/jre/bin:$PATH" | ||
XDG_DATA_HOME: "$SNAP/usr/share" | ||
FONTCONFIG_PATH: "$SNAP/etc/fonts/config.d" | ||
FONTCONFIG_FILE: "$SNAP/etc/fonts/fonts.conf" | ||
|
||
plugs: | ||
unity7: | ||
network: | ||
home: | ||
x11: | ||
desktop: | ||
desktop-legacy: | ||
|
||
parts: | ||
cloudcoinwallet: | ||
after: [desktop-gtk3] | ||
source: . | ||
plugin: dump | ||
organize: | ||
CloudCoinWallet.sh: bin/CloudCoinWallet.sh | ||
stage-packages: | ||
- fonts-dejavu-core | ||
- libfontconfig1 | ||
- openjdk-8-jre | ||
- ca-certificates-java | ||
|
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,50 @@ | ||
name: cloudcoinwallet | ||
version: "2.1.18" | ||
summary: CloudCoin Wallet Desktop Application | ||
base: core18 | ||
description: | | ||
CloudCoin is a digital currency. That cannot be counterfeited, controlled, | ||
tracked or stolen. CloudCoins cannot be double-spent, mined or lost. | ||
It is 100% private and requires no public ledgers, accounts, or encryption. | ||
CloudCoin is a completely fair and ethical monetary system. | ||
confinement: devmode | ||
grade: stable | ||
|
||
apps: | ||
blue: | ||
command: bin/CloudCoinWallet.sh Blue | ||
environment: | ||
LC_ALL: "C.UTF-8" | ||
JAVA_HOME: "$SNAP/usr/lib/jvm/java-11-openjdk-amd64" | ||
PATH: "$JAVA_HOME/bin:$PATH" | ||
XDG_DATA_HOME: "$SNAP/usr/share" | ||
FONTCONFIG_PATH: "$SNAP/etc/fonts/config.d" | ||
FONTCONFIG_FILE: "$SNAP/etc/fonts/fonts.conf" | ||
dark: | ||
command: bin/CloudCoinWallet.sh Dark | ||
environment: | ||
LC_ALL: "C.UTF-8" | ||
JAVA_HOME: "$SNAP/usr/lib/jvm/java-11-openjdk-amd64" | ||
PATH: "$JAVA_HOME/bin:$PATH" | ||
XDG_DATA_HOME: "$SNAP/usr/share" | ||
FONTCONFIG_PATH: "$SNAP/etc/fonts/config.d" | ||
FONTCONFIG_FILE: "$SNAP/etc/fonts/fonts.conf" | ||
|
||
plugs: | ||
unity7: | ||
network: | ||
home: | ||
x11: | ||
|
||
parts: | ||
cloudcoinwallet: | ||
source: app/ | ||
plugin: dump | ||
organize: | ||
CloudCoinWallet.sh: bin/CloudCoinWallet.sh | ||
stage-packages: | ||
- fonts-dejavu-core | ||
- libfontconfig1 | ||
- openjdk-11-jre-headless | ||
- ca-certificates-java | ||
|
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,48 @@ | ||
name: cloudcoinwallet | ||
version: "2.1.18" | ||
summary: CloudCoin Wallet Desktop Application (openjdk-8) | ||
description: | | ||
CloudCoin is a digital currency. That cannot be counterfeited, controlled, | ||
tracked or stolen. CloudCoins cannot be double-spent, mined or lost. | ||
It is 100% private and requires no public ledgers, accounts, or encryption. | ||
CloudCoin is a completely fair and ethical monetary system. | ||
confinement: devmode | ||
grade: stable | ||
|
||
apps: | ||
blue: | ||
command: bin/CloudCoinWallet.sh Blue | ||
environment: | ||
LC_ALL: "C" | ||
JAVA_HOME: "$SNAP/usr/lib/jvm/java-8-openjdk-amd64" | ||
PATH: "$JAVA_HOME/jre/bin:$PATH" | ||
XDG_DATA_HOME: "$SNAP/usr/share" | ||
FONTCONFIG_PATH: "$SNAP/etc/fonts/config.d" | ||
FONTCONFIG_FILE: "$SNAP/etc/fonts/fonts.conf" | ||
dark: | ||
command: bin/CloudCoinWallet.sh Dark | ||
environment: | ||
LC_ALL: "C" | ||
JAVA_HOME: "$SNAP/usr/lib/jvm/java-8-openjdk-amd64" | ||
PATH: "$JAVA_HOME/jre/bin:$PATH" | ||
XDG_DATA_HOME: "$SNAP/usr/share" | ||
FONTCONFIG_PATH: "$SNAP/etc/fonts/config.d" | ||
FONTCONFIG_FILE: "$SNAP/etc/fonts/fonts.conf" | ||
|
||
plugs: | ||
unity7: | ||
network: | ||
home: | ||
x11: | ||
|
||
parts: | ||
cloudcoinwallet: | ||
source: app/ | ||
plugin: dump | ||
organize: | ||
CloudCoinWallet.sh: bin/CloudCoinWallet.sh | ||
stage-packages: | ||
- fonts-dejavu-core | ||
- libfontconfig1 | ||
- openjdk-8-jre-headless | ||
- ca-certificates-java |
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,52 @@ | ||
name: cloudcoinwallet | ||
version: "2.1.20" | ||
summary: CloudCoin Wallet Desktop Application (openjdk-11) | ||
base: core18 | ||
description: | | ||
CloudCoin is a digital currency. That cannot be counterfeited, controlled, | ||
tracked or stolen. CloudCoins cannot be double-spent, mined or lost. | ||
It is 100% private and requires no public ledgers, accounts, or encryption. | ||
CloudCoin is a completely fair and ethical monetary system. | ||
confinement: devmode | ||
grade: stable | ||
|
||
apps: | ||
blue: | ||
command: bin/CloudCoinWallet.sh Blue | ||
environment: | ||
APP_VER: "2.1.20" | ||
LC_ALL: "C.UTF-8" | ||
JAVA_HOME: "$SNAP/usr/lib/jvm/java-11-openjdk-amd64" | ||
PATH: "$JAVA_HOME/bin:$PATH" | ||
XDG_DATA_HOME: "$SNAP/usr/share" | ||
FONTCONFIG_PATH: "$SNAP/etc/fonts/config.d" | ||
FONTCONFIG_FILE: "$SNAP/etc/fonts/fonts.conf" | ||
dark: | ||
command: bin/CloudCoinWallet.sh Dark | ||
environment: | ||
APP_VER: "2.1.20" | ||
LC_ALL: "C.UTF-8" | ||
JAVA_HOME: "$SNAP/usr/lib/jvm/java-11-openjdk-amd64" | ||
PATH: "$JAVA_HOME/bin:$PATH" | ||
XDG_DATA_HOME: "$SNAP/usr/share" | ||
FONTCONFIG_PATH: "$SNAP/etc/fonts/config.d" | ||
FONTCONFIG_FILE: "$SNAP/etc/fonts/fonts.conf" | ||
|
||
plugs: | ||
unity7: | ||
network: | ||
home: | ||
x11: | ||
|
||
parts: | ||
cloudcoinwallet: | ||
source: app/ | ||
plugin: dump | ||
organize: | ||
CloudCoinWallet.sh: bin/CloudCoinWallet.sh | ||
stage-packages: | ||
- fonts-dejavu-core | ||
- libfontconfig1 | ||
- openjdk-11-jre-headless | ||
- ca-certificates-java | ||
|