From 90d7d881622f3596bdf5cf7aa5064241d7e5bf38 Mon Sep 17 00:00:00 2001 From: Akos Kitta Date: Fri, 25 Oct 2019 10:14:18 +0200 Subject: [PATCH] Updated the application name, version to `0.0.2`. Increased the heap size for the packager. Signed-off-by: Akos Kitta --- README.md | 4 +- arduino-ide-extension/package.json | 2 +- .../src/node/arduino-backend-module.ts | 2 +- azure-pipelines.yml | 10 +-- browser-app/package.json | 8 +- electron-app/package.json | 8 +- electron/README.md | 4 +- electron/build/template-package.json | 74 ++++++++++--------- electron/packager/cli | 2 +- electron/packager/index.js | 11 +-- electron/packager/package.json | 2 +- 11 files changed, 66 insertions(+), 61 deletions(-) diff --git a/README.md b/README.md index 3af44b6f..757fd401 100644 --- a/README.md +++ b/README.md @@ -29,10 +29,10 @@ Then you can start the browser example again: yarn --cwd browser-app start ``` -## Arduino-PoC Electron Application +## Arduino Pro IDE Electron Application The project is built on [Azure DevOps](https://dev.azure.com/typefox/Arduino). -Currently, we provide the Arduino-PoC for the following platforms: +Currently, we provide the Arduino Pro IDE for the following platforms: - Windows, - macOS, and - Linux. diff --git a/arduino-ide-extension/package.json b/arduino-ide-extension/package.json index f2b86f57..3294eeb4 100644 --- a/arduino-ide-extension/package.json +++ b/arduino-ide-extension/package.json @@ -1,6 +1,6 @@ { "name": "arduino-ide-extension", - "version": "0.0.1", + "version": "0.0.2", "description": "An extension for Theia building the Arduino IDE", "license": "MIT", "engines": { diff --git a/arduino-ide-extension/src/node/arduino-backend-module.ts b/arduino-ide-extension/src/node/arduino-backend-module.ts index 45dadb82..cd9cfc49 100644 --- a/arduino-ide-extension/src/node/arduino-backend-module.ts +++ b/arduino-ide-extension/src/node/arduino-backend-module.ts @@ -133,7 +133,7 @@ export default new ContainerModule((bind, unbind, isBound, rebind) => { return parentLogger.child('discovery'); }).inSingletonScope().whenTargetNamed('discovery'); - // Default workspace server extension to initialize and use a fallback workspace (`~/Arduino-PoC/workspace/`) + // Default workspace server extension to initialize and use a fallback workspace. // If nothing was set previously. bind(DefaultWorkspaceServerExt).toSelf().inSingletonScope(); rebind(WorkspaceServer).toService(DefaultWorkspaceServerExt); diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 6326f312..b7ac3238 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -52,7 +52,7 @@ jobs: - task: PublishBuildArtifacts@1 inputs: pathtoPublish: electron/build/dist/$(ArduinoPoC.AppName) - artifactName: 'Arduino-PoC - Applications' + artifactName: 'Arduino Pro IDE - Applications' condition: or(in(variables['Agent.OS'], 'Windows_NT'), in(variables['Build.Reason'], 'Manual', 'Schedule')) displayName: Publish - job: Release @@ -65,16 +65,16 @@ jobs: - task: DownloadBuildArtifacts@0 displayName: Download inputs: - artifactName: 'Arduino-PoC - Applications' + artifactName: 'Arduino Pro IDE - Applications' downloadPath: 'gh-release' - task: GithubRelease@0 inputs: gitHubConnection: typefox-service-account1 repositoryName: bcmi-labs/arduino-editor assets: | - gh-release/Arduino-PoC - Applications/*.zip - gh-release/Arduino-PoC - Applications/*.dmg - gh-release/Arduino-PoC - Applications/*.tar.xz + gh-release/Arduino Pro IDE - Applications/*.zip + gh-release/Arduino Pro IDE - Applications/*.dmg + gh-release/Arduino Pro IDE - Applications/*.tar.xz target: $(Build.SourceVersion) action: Edit tagSource: auto diff --git a/browser-app/package.json b/browser-app/package.json index b88ee956..04005803 100644 --- a/browser-app/package.json +++ b/browser-app/package.json @@ -1,10 +1,11 @@ { "private": true, "name": "browser-app", - "version": "0.0.1", + "version": "0.0.2", "license": "MIT", "dependencies": { "@theia/core": "next", + "@theia/cpp": "next", "@theia/editor": "next", "@theia/file-search": "next", "@theia/filesystem": "next", @@ -16,9 +17,8 @@ "@theia/process": "next", "@theia/terminal": "next", "@theia/workspace": "next", - "@theia/cpp": "next", "@theia/textmate-grammars": "next", - "arduino-ide-extension": "0.0.1" + "arduino-ide-extension": "0.0.2" }, "devDependencies": { "@theia/cli": "next" @@ -31,7 +31,7 @@ "theia": { "frontend": { "config": { - "applicationName": "Arduino Editor", + "applicationName": "Arduino Pro IDE", "defaultTheme": "arduino-theme", "preferences": { "editor.autoSave": "on" diff --git a/electron-app/package.json b/electron-app/package.json index 9599d793..cb35a263 100644 --- a/electron-app/package.json +++ b/electron-app/package.json @@ -1,10 +1,11 @@ { "private": true, "name": "electron-app", - "version": "0.0.1", + "version": "0.0.2", "license": "MIT", "dependencies": { "@theia/core": "next", + "@theia/cpp": "next", "@theia/editor": "next", "@theia/electron": "next", "@theia/file-search": "next", @@ -17,9 +18,8 @@ "@theia/process": "next", "@theia/terminal": "next", "@theia/workspace": "next", - "@theia/cpp": "next", "@theia/textmate-grammars": "next", - "arduino-ide-extension": "0.0.1" + "arduino-ide-extension": "0.0.2" }, "devDependencies": { "@theia/cli": "next", @@ -34,7 +34,7 @@ "target": "electron", "frontend": { "config": { - "applicationName": "Arduino Editor", + "applicationName": "Arduino Pro IDE", "defaultTheme": "arduino-theme", "preferences": { "editor.autoSave": "on" diff --git a/electron/README.md b/electron/README.md index fa598e43..65d5bc67 100644 --- a/electron/README.md +++ b/electron/README.md @@ -1,13 +1,13 @@ ## Electron -All-in-one packager producing the `Arduino-PoC` Electron-based application. +All-in-one packager producing the `Arduino Pro IDE` Electron-based application. ## Prerequisites The prerequisites are defined [here](https://github.com/theia-ide/theia/blob/master/doc/Developing.md#prerequisites). ### Build: -To build the Arduino-PoC Electron-based Theia application you have to do the followings: +To build the Arduino Pro IDE application you have to do the followings: ```bash yarn --cwd ./electron/packager/ && yarn --cwd ./electron/packager/ package ``` diff --git a/electron/build/template-package.json b/electron/build/template-package.json index fd9d32fd..3c3c4600 100644 --- a/electron/build/template-package.json +++ b/electron/build/template-package.json @@ -1,14 +1,17 @@ { - "name": "arduino-electron", - "description": "Arduino-PoC Electron", + "name": "arduino.Pro.IDE", + "description": "Arduino Pro IDE", "main": "src-gen/frontend/electron-main.js", "author": "TypeFox", "dependencies": { "google-protobuf": "^3.5.0", "arduino-ide-extension": "file:../working-copy/arduino-ide-extension" }, + "resolutions": { + "**/fs-extra": "^4.0.2" + }, "devDependencies": { - "electron-builder": "^20.36.2" + "electron-builder": "^21.2.0" }, "scripts": { "build": "theia build --mode development", @@ -21,16 +24,17 @@ }, "repository": { "type": "git", - "url": "git+https://github.com/TypeFox/arduino-poc.git" + "url": "git+https://github.com/arduino/arduino-pro-ide.git" }, - "// Notes:" : [ + "// Notes:": [ "The `electronVersion` version was pinned for `@grpc/grpc-js` -> Node.js version constraints.", - "`google-protobuf` was declared as it is not picked up by the `electron-builder` as a runtime dependency." + "`google-protobuf` was declared as it is not picked up by the `electron-builder` as a runtime dependency.", + "The resolution for `fs-extra` was required due to this: https://spectrum.chat/theia/general/our-theia-electron-builder-app-no-longer-starts~f5cf09a0-6d88-448b-8818-24ad0ec2ee7c" ], "build": { - "productName": "Arduino-PoC", - "appId": "arduino.PoC", - "electronVersion": "4.0.0", + "productName": "Arduino Pro IDE", + "appId": "arduino.Pro.IDE", + "electronVersion": "4.2.0", "asar": false, "directories": { "buildResources": "resources" @@ -49,40 +53,40 @@ "!node_modules/onigasm/*" ], "win": { - "target": [ - "zip" - ], - "artifactName": "${productName}-${env.ARDUINO_VERSION}-${os}.${ext}" + "target": [ + "zip" + ], + "artifactName": "${productName}-${env.ARDUINO_VERSION}-${os}.${ext}" }, "mac": { - "target": [ - "dmg" - ], - "artifactName": "${productName}-${env.ARDUINO_VERSION}-${os}.${ext}", - "darkModeSupport": true + "target": [ + "dmg" + ], + "artifactName": "${productName}-${env.ARDUINO_VERSION}-${os}.${ext}", + "darkModeSupport": true }, "linux": { "target": [ - "tar.xz" + "tar.xz" ], "artifactName": "${productName}-${env.ARDUINO_VERSION}-${os}.${ext}" }, "dmg": { - "icon": "resources/icon.icns", - "iconSize": 128, - "contents": [ - { - "x": 380, - "y": 240, - "type": "link", - "path": "/Applications" - }, - { - "x": 122, - "y": 240, - "type": "file" - } - ] + "icon": "resources/icon.icns", + "iconSize": 128, + "contents": [ + { + "x": 380, + "y": 240, + "type": "link", + "path": "/Applications" + }, + { + "x": 122, + "y": 240, + "type": "file" + } + ] } } -} \ No newline at end of file +} diff --git a/electron/packager/cli b/electron/packager/cli index 203ca8db..a92a122e 100755 --- a/electron/packager/cli +++ b/electron/packager/cli @@ -25,7 +25,7 @@ const yargs = require('yargs'); process.stderr.write(`Unexpected platform: ${platform}.`); process.exit(1); } - process.stdout.write(`Arduino-PoC-${versionInfo().version}-${os}.${ext}`); + process.stdout.write(`Arduino Pro IDE-${versionInfo().version}-${os}.${ext}`); process.exit(0); } }) diff --git a/electron/packager/index.js b/electron/packager/index.js index a7cb4af5..6daf4644 100644 --- a/electron/packager/index.js +++ b/electron/packager/index.js @@ -5,7 +5,8 @@ const fs = require('fs'); const join = require('path').join; const shell = require('shelljs'); - shell.env.THEIA_ELECTRON_SKIP_REPLACE_FFMPEG = '1'; + shell.env.THEIA_ELECTRON_SKIP_REPLACE_FFMPEG = '1'; // Do not run the ffmpeg validation for the packager. + shell.env.NODE_OPTIONS = '--max_old_space_size=4096'; // Increase heap size for the CI const utils = require('./utils'); const { version, release } = utils.versionInfo(); @@ -64,7 +65,7 @@ //-------------------------------------------------------------------------------------------------+ // Rebuild the extension with the copied `yarn.lock`. It is a must to use the same Theia versions. | //-------------------------------------------------------------------------------------------------+ - exec(`yarn --network-timeout 1000000 --cwd ${path('..', workingCopy)}`, 'Building the Arduino Theia extensions'); + exec(`yarn --network-timeout 1000000 --cwd ${path('..', workingCopy)}`, 'Building the Arduino Pro IDE extensions'); // Collect all unused dependencies by the backend. We have to remove them from the electron app. // The `bundle.js` already contains everything we need for the frontend. // We have to do it before changing the dependencies to `local-path`. @@ -87,7 +88,7 @@ devDependencies: pkg.devDependencies }, null, 2)); - echo(`📜 Effective 'package.json' for the Arduino-PoC application is: + echo(`📜 Effective 'package.json' for the Arduino Pro IDE application is: ----------------------- ${fs.readFileSync(path('..', 'build', 'package.json')).toString()} ----------------------- @@ -108,7 +109,7 @@ ${fs.readFileSync(path('..', 'build', 'package.json')).toString()} // Install all private and public dependencies for the electron application and build Theia. | //-------------------------------------------------------------------------------------------+ exec(`yarn --network-timeout 1000000 --cwd ${path('..', 'build')}`, 'Installing dependencies'); - exec(`yarn --network-timeout 1000000 --cwd ${path('..', 'build')} build${release ? ':release' : ''}`, 'Building the Arduino-PoC application'); + exec(`yarn --network-timeout 1000000 --cwd ${path('..', 'build')} build${release ? ':release' : ''}`, 'Building the Arduino Pro IDE application'); //------------------------------------------------------------------------------+ // Create a throw away dotenv file which we use to feed the builder with input. | @@ -124,7 +125,7 @@ ${fs.readFileSync(path('..', 'build', 'package.json')).toString()} //-----------------------------------+ // Package the electron application. | //-----------------------------------+ - exec(`yarn --network-timeout 1000000 --cwd ${path('..', 'build')} package`, `Packaging your Arduino-PoC application`); + exec(`yarn --network-timeout 1000000 --cwd ${path('..', 'build')} package`, `Packaging your Arduino Pro IDE application`); echo(`🎉 Success. Your application is at: ${path('..', 'build', 'dist')}`); restore(); diff --git a/electron/packager/package.json b/electron/packager/package.json index a83ab6a0..b6bd619c 100644 --- a/electron/packager/package.json +++ b/electron/packager/package.json @@ -2,7 +2,7 @@ "private": true, "name": "packager", "version": "1.0.0", - "description": "Packager for the Arduino-PoC electron application", + "description": "Packager for the Arduino Pro IDE electron application", "main": "index.js", "scripts": { "package": "node index.js",