Skip to content

Commit

Permalink
Build snap (fixes #14) and deb (fixes #13), and fix icons
Browse files Browse the repository at this point in the history
  • Loading branch information
mariogrip committed Sep 13, 2017
1 parent 9812cac commit 0dcc599
Show file tree
Hide file tree
Showing 16 changed files with 16 additions and 8 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ install:
script:
- npm run dist:$([ "$TRAVIS_OS_NAME" == "linux" ] && echo "linux" || echo "mac")
before_deploy:
- export FILE_TO_UPLOAD=$(ls dist/ubports-installer-*)
- export FILE_TO_UPLOAD=$(ls dist/ubports-installer*)
deploy:
provider: releases
api_key:
Expand Down
Binary file removed assets/icons/icon.png
Binary file not shown.
17 changes: 12 additions & 5 deletions build.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,24 +44,30 @@ const setEvents = (downloadEvent) => {
}

function build() {
var linuxTargets = cli.appimageOnly ? "AppImage" : ["AppImage", "deb"];
var linuxTargets = cli.appimageOnly ? "AppImage" : ["AppImage", "deb", "snap"];
if (cli.snapOnly)
linuxTargets = "snap"
builder.build({
targets: builder.createTargets(targets),
config: {
"appId": "com.ubports.installer",
"linux": {
"target": linuxTargets
"target": linuxTargets,
"icon": "build/icons"
},
"mac": {
"target": "dmg"
"target": "dmg",
"icon": "build/icons/icon.icns"
},
"win": {
"target": ["portable"]
"target": ["portable"],
"icon": "build/icons/icon.ico"
},
"files": [
"src/**/*",
"node_modules/**/*",
"platform-tools/${os}/**/*"
"platform-tools/${os}/**/*",
"build/icons/icon.*"
]
}
})
Expand Down Expand Up @@ -128,6 +134,7 @@ cli
.option('-w, --windows', 'Build for Windows')
.option('-m, --mac', 'Build for Mac')
.option('-d, --download-only', 'Only download platformTools')
.option('-s, --snap-only', "Build only snap")
.parse(process.argv);

var targets = [];
Expand Down
Binary file added build/icons/128x128.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added build/icons/16x16.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added build/icons/24x24.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added build/icons/256x256.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added build/icons/32x32.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added build/icons/48x48.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added build/icons/512x512.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added build/icons/64x64.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added build/icons/96x96.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added build/icons/icon.icns
Binary file not shown.
Binary file added build/icons/icon.ico
Binary file not shown.
Binary file added build/icons/icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 3 additions & 2 deletions src/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,10 @@ let mainWindow

function createWindow () {
if (process.env.DEBUG)
mainWindow = new BrowserWindow({width: 1600, height: 600})
mainWindow = new BrowserWindow({width: 1600, height: 600, icon: path.join(__dirname, "../build/icons/icon.png")})
else
mainWindow = new BrowserWindow({width: 800, height: 600})
mainWindow = new BrowserWindow({width: 800, height: 600, icon: path.join(__dirname, "../build/icons/icon.png")})


mainWindow.loadURL(url.format({
pathname: path.join(__dirname, 'html/index.ejs'),
Expand Down

0 comments on commit 0dcc599

Please sign in to comment.