diff --git a/.travis.yml b/.travis.yml index 41415a89..792162df 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,6 +1,7 @@ os: - - osx + - windows - linux + - osx language: node_js node_js: - '10.15.2' @@ -9,7 +10,20 @@ before_deploy: - npm install electron-builder -g - cd app - npm install - - npm run build + - if [ "$TRAVIS_OS_NAME" = "osx" ]; npm run build ; fi + - if [ "$TRAVIS_OS_NAME" = "linux" ]; electron-builder --linux --x64 --ia32 ; fi + - if [ "$TRAVIS_OS_NAME" = "linux" ]; mv ../build/thedesk-*-ia32.zip ../build/thedesk-ia32.zip ; fi + - if [ "$TRAVIS_OS_NAME" = "linux" ]; mv ../build/thedesk-*.zip ../build/thedesk.zip ; fi + - if [ "$TRAVIS_OS_NAME" = "windows" ]; electron-builder --win --ia32 ; fi + - if [ "$TRAVIS_OS_NAME" = "windows" ]; electron-builder --win --ia32 ; fi + - if [ "$TRAVIS_OS_NAME" = "windows" ]; mv ../build/TheDesk-setup.exe ../TheDesk-setup-ia32.exe ; fi + - if [ "$TRAVIS_OS_NAME" = "windows" ]; mv ../build/TheDesk*.exe ../TheDesk-ia32.exe ; fi + - if [ "$TRAVIS_OS_NAME" = "windows" ]; electron-builder --win --ia32 ; fi + - if [ "$TRAVIS_OS_NAME" = "windows" ]; mv ../build/TheDesk-setup.exe ../build/TheDesk-setup-ia32.exe ; fi + - if [ "$TRAVIS_OS_NAME" = "windows" ]; mv ../build/TheDesk*.exe ../build/TheDesk-ia32.exe ; fi + - if [ "$TRAVIS_OS_NAME" = "windows" ]; electron-builder --win --x64 ; fi + - if [ "$TRAVIS_OS_NAME" = "windows" ]; mv ../build/TheDesk-setup.exe ../build/TheDesk-setup.exe ; fi + - if [ "$TRAVIS_OS_NAME" = "windows" ]; mv ../build/TheDesk*.exe ../build/TheDesk.exe ; fi - cd ../ - ls build deploy: diff --git a/app/build.js b/app/build.js index d694c143..dd0f4407 100644 --- a/app/build.js +++ b/app/build.js @@ -83,6 +83,10 @@ builder.build({ fs.renameSync('../build/TheDesk ' + version + '.exe', '../build/TheDesk-ia32.exe'); fs.renameSync('../build/TheDesk Setup ' + version + '.exe', '../build/TheDesk-setup-ia32.exe'); retry() + }else if (os == "linux") { + console.log("Linux") + fs.renameSync('../build/thedesk-' + version + '.zip', '../build/TheDesk.zip'); + fs.renameSync('../build/TheDesk Setup ' + version + '.exe', '../build/TheDesk-setup-ia32.exe'); } }) .catch((error) => { diff --git a/app/package.json b/app/package.json index 9f65f9a8..c4216ae2 100644 --- a/app/package.json +++ b/app/package.json @@ -7,7 +7,10 @@ "scripts": { "test": "echo \"Error: no test specified\" && exit 1", "dist": "build --linux snap", - "build": "node build.js" + "build:js": "node build.js", + "build": "electron-builder", + "build:all": "electron-builder --win --linux", + "build:win": "electron-builder --win" }, "keywords": [ "mastodon", @@ -59,5 +62,55 @@ "devDependencies": { "electron": "^5.0.1", "electron-builder": "^20.40.2" + }, + "build": { + "productName": "TheDesk", + "appId": "top.thedesk", + "asarUnpack": [ + "node_modules/itunes-nowplaying-mac" + ], + "directories": { + "output": "../build" + }, + "win": { + "icon": "build/thedesk.ico", + "target": [ + "nsis", + "portable", + "appx" + ] + }, + "appx": { + "identityName": "53491Cutls.TheDesk", + "applicationId": "Cutls.TheDesk", + "publisherDisplayName": "Cutls", + "publisher": "CN=629757F5-A5EE-474F-9562-B304A89A9FD1", + "languages": [ + "JA-JP", + "EN-US" + ] + }, + "nsis": { + "oneClick": false, + "allowToChangeInstallationDirectory": true, + "artifactName": "TheDesk-setup.${ext}" + }, + "linux": { + "icon": "build/icons", + "target": [ + "zip" + ], + "category": "Network" + }, + "mac": { + "target": [ + "dmg", + "zip" + ] + }, + "electronDownload": { + "version": "5.0.1" + }, + "electronVersion": "5.0.1" } }