diff --git a/.travis.yml b/.travis.yml index c5bc3b92..11e72043 100644 --- a/.travis.yml +++ b/.travis.yml @@ -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: diff --git a/assets/icons/icon.png b/assets/icons/icon.png deleted file mode 100644 index e049678d..00000000 Binary files a/assets/icons/icon.png and /dev/null differ diff --git a/build.js b/build.js index 43db26ec..ace8cc33 100644 --- a/build.js +++ b/build.js @@ -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.*" ] } }) @@ -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 = []; diff --git a/build/icons/128x128.png b/build/icons/128x128.png new file mode 100644 index 00000000..217457f8 Binary files /dev/null and b/build/icons/128x128.png differ diff --git a/build/icons/16x16.png b/build/icons/16x16.png new file mode 100644 index 00000000..854e1cce Binary files /dev/null and b/build/icons/16x16.png differ diff --git a/build/icons/24x24.png b/build/icons/24x24.png new file mode 100644 index 00000000..cfde7694 Binary files /dev/null and b/build/icons/24x24.png differ diff --git a/build/icons/256x256.png b/build/icons/256x256.png new file mode 100644 index 00000000..e6bff2ca Binary files /dev/null and b/build/icons/256x256.png differ diff --git a/build/icons/32x32.png b/build/icons/32x32.png new file mode 100644 index 00000000..f6941c9f Binary files /dev/null and b/build/icons/32x32.png differ diff --git a/build/icons/48x48.png b/build/icons/48x48.png new file mode 100644 index 00000000..c05ab914 Binary files /dev/null and b/build/icons/48x48.png differ diff --git a/build/icons/512x512.png b/build/icons/512x512.png new file mode 100644 index 00000000..98853305 Binary files /dev/null and b/build/icons/512x512.png differ diff --git a/build/icons/64x64.png b/build/icons/64x64.png new file mode 100644 index 00000000..7621a6d8 Binary files /dev/null and b/build/icons/64x64.png differ diff --git a/build/icons/96x96.png b/build/icons/96x96.png new file mode 100644 index 00000000..24fde478 Binary files /dev/null and b/build/icons/96x96.png differ diff --git a/build/icons/icon.icns b/build/icons/icon.icns new file mode 100644 index 00000000..9288519b Binary files /dev/null and b/build/icons/icon.icns differ diff --git a/build/icons/icon.ico b/build/icons/icon.ico new file mode 100644 index 00000000..38cf883a Binary files /dev/null and b/build/icons/icon.ico differ diff --git a/build/icons/icon.png b/build/icons/icon.png new file mode 100644 index 00000000..78c3bc7f Binary files /dev/null and b/build/icons/icon.png differ diff --git a/src/main.js b/src/main.js index c9d75449..d1b5f6a9 100755 --- a/src/main.js +++ b/src/main.js @@ -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'),