mirror of
https://github.com/h3poteto/whalebird-desktop
synced 2025-01-27 07:46:15 +01:00
commit
9ffb392abb
15
Makefile
15
Makefile
@ -1,17 +1,22 @@
|
|||||||
.PHONY: release-build package
|
.PHONY: install release-build package
|
||||||
VERSION = 0.0.0
|
VERSION = 0.0.0
|
||||||
PLATFORM = linux
|
PLATFORM = linux
|
||||||
|
CERTNAME = ""
|
||||||
|
|
||||||
ICON = ""
|
ICON = ""
|
||||||
|
CERT = ""
|
||||||
ifeq (${PLATFORM}, darwin)
|
ifeq (${PLATFORM}, darwin)
|
||||||
ICON = "--icon=./build/icons/whalebird.icns"
|
ICON = --icon=./build/icons/whalebird.icns
|
||||||
|
CERT = --sign='${CERTNAME}'
|
||||||
endif
|
endif
|
||||||
ifeq (${PLATFORM}, windows)
|
ifeq (${PLATFORM}, windows)
|
||||||
ICON = "--icon=./build/icons/whalebird.ico"
|
ICON = --icon=./build/icons/whalebird.ico
|
||||||
endif
|
endif
|
||||||
|
|
||||||
all: release-build package
|
all: install release-build package
|
||||||
|
install: package.json
|
||||||
|
npm install
|
||||||
release-build: package.json
|
release-build: package.json
|
||||||
npm run pack
|
npm run pack
|
||||||
package: release-build
|
package: release-build
|
||||||
electron-packager ./ whalebird --platform=${PLATFORM} --arch=x64 --electron-version=1.8.3 --build-version=${VERSION} --asar --out=packages --ignore="^/src" --ignore="^/test" --ignore="^/.electron-vue" --ignore="^/.envrc" --prune=true ${ICON}
|
electron-packager ./ whalebird --platform=${PLATFORM} --arch=x64 --electron-version=1.8.3 --build-version=${VERSION} --asar --out=packages --ignore="^/src" --ignore="^/test" --ignore="^/.electron-vue" --ignore="^/.envrc" --prune=true $(ICON) $(CERT)
|
||||||
|
2
package-lock.json
generated
2
package-lock.json
generated
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "whalebird",
|
"name": "whalebird",
|
||||||
"version": "0.0.0",
|
"version": "0.1.0",
|
||||||
"lockfileVersion": 1,
|
"lockfileVersion": 1,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
@ -2,8 +2,12 @@
|
|||||||
"name": "whalebird",
|
"name": "whalebird",
|
||||||
"version": "0.1.0",
|
"version": "0.1.0",
|
||||||
"author": "AkiraFukushima <h3.poteto@gmail.com>",
|
"author": "AkiraFukushima <h3.poteto@gmail.com>",
|
||||||
"description": "A mastodon client",
|
"description": "A desktop mastodon client",
|
||||||
"license": null,
|
"license": "MIT",
|
||||||
|
"repository": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "https://github.com/h3poteto/whalebird-desktop.git"
|
||||||
|
},
|
||||||
"main": "./dist/electron/main.js",
|
"main": "./dist/electron/main.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"build": "node .electron-vue/build.js && electron-builder",
|
"build": "node .electron-vue/build.js && electron-builder",
|
||||||
|
@ -21,8 +21,13 @@ const winURL = process.env.NODE_ENV === 'development'
|
|||||||
? `http://localhost:9080`
|
? `http://localhost:9080`
|
||||||
: `file://${__dirname}/index.html`
|
: `file://${__dirname}/index.html`
|
||||||
|
|
||||||
|
// https://github.com/louischatriot/nedb/issues/459
|
||||||
|
const userData = app.getPath('userData')
|
||||||
|
const databasePath = process.env.NODE_ENV === 'production'
|
||||||
|
? userData + '/db/whalebird.db'
|
||||||
|
: 'whalebird.db'
|
||||||
let db = new Datastore({
|
let db = new Datastore({
|
||||||
filename: 'whalebird.db',
|
filename: databasePath,
|
||||||
autoload: true
|
autoload: true
|
||||||
})
|
})
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user