Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Userfriendly installation #5

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 2 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,10 @@
"mkdirp": "^0.5.1"
},
"build": {
"nwVersion": "0.35.5",
"targets": [
"zip"
]
"nwVersion": "0.35.5"
},
"scripts": {
"dist": "build --tasks win-x64,linux-x64,mac-x64 --mirror https://dl.nwjs.io/ . --concurrent",
"mac": "build --tasks mac-x64 --mirror https://dl.nwjs.io/ . --concurrent"
"dist": "./scripts/build.sh"
},
"devDependencies": {
"nwjs-builder-phoenix": "^1.15.0"
Expand Down
18 changes: 18 additions & 0 deletions scripts/build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
#!/bin/bash
build --tasks win-x64,linux-x64,mac-x64 --mirror https://dl.nwjs.io/ . --concurrent
cp ./scripts/memex-backup-helper.desktop ./dist/memex-backup-helper-*-linux-x64/
cd ./dist/memex-backup-helper-*-linux-x64/
mkdir src
# allow ! by setting dotglob in optional shell behavior
shopt -s extglob dotglob
mv !(src) ./src/
# unset dotglob for default bash behavior
shopt -u dotglob
cd ./../../
cp ./scripts/linux-installer.sh ./dist/memex-backup-helper-*-linux-x64/
chmod +x ./dist/memex-backup-helper-*-linux-x64/linux-installer.sh
echo ./dist/memex-backup-helper-*-x64 | xargs -n 1 cp ./scripts/readme.URL
cd ./dist
# zip the dist directories
# disabled because of super huge filesize using zip for the mac folder
# find . -iname "memex-backup-helper-*-x64" -print0 -maxdepth 1 | xargs -0 -I folder zip -r ./folder.zip ./folder
6 changes: 6 additions & 0 deletions scripts/linux-installer.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/bin/sh
mkdir -p ~/.memex-backup-helper
cd ./src
sed -e "s/%%user%%/$USER/g" ./memex-backup-helper.desktop > ~/.local/share/applications/memex-backup-helper.desktop
\cp -r ./* ~/.memex-backup-helper/
rm ~/.memex-backup-helper/memex-backup-helper.desktop
9 changes: 9 additions & 0 deletions scripts/memex-backup-helper.desktop
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
[Desktop Entry]
Version=1.0
Type=Application
Terminal=false
Exec=/home/%%user%%/.memex-backup-helper/memex-backup-helper
Name=Memex Backup Helper
Comment=Memex Local Backup Helper
Icon=/home/%%user%%/.memex-backup-helper/img/appIcon.png
Categories=Application;
2 changes: 2 additions & 0 deletions scripts/readme.URL
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[InternetShortcut]
URL=https://www.notion.so/worldbrain/Download-Memex-Backup-App-7dacad9e95b44c5db681033fc264fb59