1
0
mirror of https://github.com/h3poteto/whalebird-desktop synced 2025-01-03 12:30:00 +01:00

refs #78 Create makefile for production release

This commit is contained in:
AkiraFukushima 2018-03-22 14:50:19 +09:00
parent c44dc1f159
commit 94e424f685
4 changed files with 20 additions and 1 deletions

1
.gitignore vendored
View File

@ -8,5 +8,6 @@ node_modules/
npm-debug.log npm-debug.log
npm-debug.log.* npm-debug.log.*
thumbs.db thumbs.db
packages/*
!.gitkeep !.gitkeep
*.db *.db

17
Makefile Normal file
View File

@ -0,0 +1,17 @@
.PHONY: release-build package
VERSION = 0.0.0
PLATFORM = linux
ICON = ""
ifeq (${PLATFORM}, darwin)
ICON = "--icon=./build/icons/whalebird.icns"
endif
ifeq (${PLATFORM}, windows)
ICON = "--icon=./build/icons/whalebird.ico"
endif
all: release-build package
release-build: package.json
npm run pack
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}

0
packages/.gitkeep Normal file
View File

View File

@ -161,7 +161,8 @@ function createWindow () {
mainWindow = new BrowserWindow({ mainWindow = new BrowserWindow({
height: 563, height: 563,
useContentSize: true, useContentSize: true,
width: 1000 width: 1000,
icon: require('path').join(__dirname, '../../build/icons/256x256.png')
}) })
mainWindow.loadURL(winURL) mainWindow.loadURL(winURL)