diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 43c14ea5c55..cf5de8cc587 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -164,13 +164,15 @@ jobs: # scripts/package.js, but with Arduino Agent's version: it is the version # in the window title and About dialog, and buildDate is what makes the # app load its bundled VS Code plugins (arduino-ide-electron-main.js). + # The name gives the app its own userData folder (and single-instance + # lock), separate from the official Arduino IDE's `arduino-ide`. shell: bash run: | version=$(node -p "require('../arduino-mcp-extension/package.json').version") cli_version=$(node -p "require('../arduino-ide-extension/package.json').arduino['arduino-cli'].version") node ../node_modules/electron-builder/cli.js --dir --publish never \ -c.electronVersion=30.1.2 \ - -c.extraMetadata.name=arduino-ide \ + -c.extraMetadata.name=arduino-agent \ -c.extraMetadata.main=./arduino-ide-electron-main.js \ -c.extraMetadata.version="$version" \ -c.extraMetadata.theia.frontend.config.appVersion="$version" \ @@ -183,7 +185,9 @@ jobs: run: | $src = Get-ChildItem -Directory electron-app/dist | Where-Object { $_.Name -like '*-unpacked' } | Select-Object -First 1 - Compress-Archive -Path "$($src.FullName)/*" -DestinationPath "arduino-ide-mcp-${{ matrix.platform }}.zip" + Compress-Archive -Path "$($src.FullName)/*" -DestinationPath "arduino-agent-${{ matrix.platform }}.zip" + # Pre-0.7.0 asset name, kept so existing download links keep working. + Copy-Item "arduino-agent-${{ matrix.platform }}.zip" "arduino-ide-mcp-${{ matrix.platform }}.zip" - name: Zip artifact (Linux/macOS) if: runner.os != 'Windows' @@ -193,7 +197,9 @@ jobs: src=$(ls -d electron-app/dist/*-unpacked 2>/dev/null | head -1 || true) if [ -z "$src" ]; then src=$(ls -d electron-app/dist/mac* 2>/dev/null | head -1); fi if [ -z "$src" ]; then echo "No build output found under electron-app/dist"; ls -la electron-app/dist; exit 1; fi - ( cd "$src" && zip -ry "$GITHUB_WORKSPACE/arduino-ide-mcp-${{ matrix.platform }}.zip" . ) + ( cd "$src" && zip -ry "$GITHUB_WORKSPACE/arduino-agent-${{ matrix.platform }}.zip" . ) + # Pre-0.7.0 asset name, kept so existing download links keep working. + cp "arduino-agent-${{ matrix.platform }}.zip" "arduino-ide-mcp-${{ matrix.platform }}.zip" - name: Upload to draft release uses: softprops/action-gh-release@v2 @@ -207,10 +213,12 @@ jobs: Not affiliated with or endorsed by Arduino SA. Each archive contains the unpacked application for its platform - unzip and run - `Arduino IDE` (`Arduino IDE.exe` on Windows). The MCP server starts on + `Arduino Agent` (`Arduino Agent.exe` on Windows). The MCP server starts on `http://127.0.0.1:3847`; the connection config (with the auth token) is printed to the IDE console on launch. Artifacts are unsigned; on macOS you may need to allow the app in System Settings > Privacy & Security. - files: arduino-ide-mcp-${{ matrix.platform }}.zip + files: | + arduino-agent-${{ matrix.platform }}.zip + arduino-ide-mcp-${{ matrix.platform }}.zip diff --git a/CLAUDE.md b/CLAUDE.md index 30db39c3f88..1ccf8131a92 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -30,8 +30,8 @@ classes are `any` in our extension: no `override`, no inherited fields. ## Fast backend-only iteration (Windows dev box) The MCP extension is bundled into `electron-app/lib/backend/main.js`. To test -a backend change against the installed app at `C:\Arduino` without full -packaging: +a backend change against an installed app (`` below, the unzipped +release folder) without full packaging: 1. `npm run --prefix arduino-mcp-extension build` 2. In `electron-app/`: `node ../node_modules/@theia/cli/bin/theia build @@ -39,8 +39,9 @@ packaging: file — piping through tail/grep has repeatedly swallowed the real error). If it dies with ENOTEMPTY on `lib/backend/native-webpack-plugin`, delete that directory and rerun (transient Windows file-lock race). -3. Kill "Arduino IDE" processes, copy `electron-app/lib/backend/main.js` over - `C:\Arduino\resources\app\lib\backend\main.js`, relaunch. +3. Kill "Arduino Agent" processes ("Arduino IDE" before 0.7.0), copy + `electron-app/lib/backend/main.js` over + `\resources\app\lib\backend\main.js`, relaunch. 4. Confirm the copy landed by grepping the installed main.js for a distinctive new string, and check `/health` uptime is small (a stale uptime means the old process survived the kill). diff --git a/README.md b/README.md index d04893da6eb..a1c878ead55 100644 --- a/README.md +++ b/README.md @@ -39,20 +39,26 @@ making the IDE a first-class participant in the conversation: Unsigned development builds of the **[latest release](https://github.com/mixelpixx/Arduino-Agent/releases/latest)** — these links always point at the newest version: -- [**Windows x64**](https://github.com/mixelpixx/Arduino-Agent/releases/latest/download/arduino-ide-mcp-windows.zip) -- [**macOS**](https://github.com/mixelpixx/Arduino-Agent/releases/latest/download/arduino-ide-mcp-macos.zip) -- [**Linux x64**](https://github.com/mixelpixx/Arduino-Agent/releases/latest/download/arduino-ide-mcp-linux.zip) - -Unzip and run `Arduino IDE` (`Arduino IDE.exe` on Windows). The window, About -box and icon say **Arduino Agent**; only the executable keeps upstream's name for -now. Arduino Agent doesn't check Arduino's update server; get new versions here. -Release notes and older builds are on the -[Releases](https://github.com/mixelpixx/Arduino-Agent/releases) page. - -> **Have the official Arduino IDE installed too?** Both currently share settings -> and a single-instance lock, so starting one while the other is running hands -> off to the one already open. Close one before starting the other. Separating -> them properly is planned for v0.7.0. +- [**Windows x64**](https://github.com/mixelpixx/Arduino-Agent/releases/latest/download/arduino-agent-windows.zip) +- [**macOS**](https://github.com/mixelpixx/Arduino-Agent/releases/latest/download/arduino-agent-macos.zip) +- [**Linux x64**](https://github.com/mixelpixx/Arduino-Agent/releases/latest/download/arduino-agent-linux.zip) + +Unzip and run **Arduino Agent** (`Arduino Agent.exe` on Windows, +`Arduino Agent.app` on macOS, `arduino-agent` on Linux). Arduino Agent doesn't +check Arduino's update server; get new versions here. Release notes and older +builds are on the [Releases](https://github.com/mixelpixx/Arduino-Agent/releases) +page. + +> **Got the official Arduino IDE too?** They run side by side as separate apps. +> They share what should be shared, your sketchbook, installed boards and +> libraries, and preferences (`~/.arduinoIDE`), but each keeps its own window +> state and opens independently. +> +> **Upgrading from 0.6.x?** The executable was called `Arduino IDE` before 0.7.0. +> Your window layout and per-sketch board selections carry over on first launch, +> and an MCP config whose `ARDUINO_AGENT_PATH` still names `Arduino IDE.exe` +> keeps working (the bridge finds the renamed executable), but update it when +> convenient. > These are unsigned dev builds. On macOS you may need to allow the app under > **System Settings → Privacy & Security**; on Windows, dismiss SmartScreen with @@ -100,7 +106,8 @@ Release notes and older builds are on the > > Releases after v0.6.1 ship the bridge inside the app: `` is the > unzipped folder on Windows/Linux; on macOS the path is - > `Arduino IDE.app/Contents/Resources/mcp-bridge/bridge/arduino-agent-bridge.js`. + > `Arduino Agent.app/Contents/Resources/mcp-bridge/bridge/arduino-agent-bridge.js` + > (`Arduino IDE.app` in 0.6.2). > From a source checkout, use `arduino-mcp-extension/bridge/arduino-agent-bridge.js` > after building the extension. It needs no token configuration (it reads > `~/.arduinoIDE/mcp-token` itself) and no dependencies. See diff --git a/arduino-ide-extension/src/electron-main/theia/electron-main-application.ts b/arduino-ide-extension/src/electron-main/theia/electron-main-application.ts index b6d0ff2941c..234ff55d591 100644 --- a/arduino-ide-extension/src/electron-main/theia/electron-main-application.ts +++ b/arduino-ide-extension/src/electron-main/theia/electron-main-application.ts @@ -84,7 +84,7 @@ function enableFileLogger() { process.env['XDG_CONFIG_HOME'] = xdgConfigHome; } setupFileLog({ - appName: 'Arduino IDE', + appName: 'Arduino Agent', // Arduino Agent: own log folder, not the official IDE's maxSize: 10 * 1024 * 1024, }); for (const name of consoleLogFunctionNames) { @@ -893,7 +893,7 @@ async function updateFrontendApplicationConfigFromPackageJson( } const fallbackFrontendAppConfig: FrontendApplicationConfig = { - applicationName: 'Arduino IDE', + applicationName: 'Arduino Agent', // Arduino Agent defaultTheme: { light: 'arduino-theme', dark: 'arduino-theme-dark', @@ -903,7 +903,7 @@ const fallbackFrontendAppConfig: FrontendApplicationConfig = { defaultLocale: '', electron: { showWindowEarly: true, - uriScheme: 'arduino-ide', + uriScheme: 'arduino-agent', // Arduino Agent }, reloadOnReconnect: true, }; diff --git a/arduino-mcp-extension/README.md b/arduino-mcp-extension/README.md index 0c385c23edb..d60fc28ec3d 100644 --- a/arduino-mcp-extension/README.md +++ b/arduino-mcp-extension/README.md @@ -253,7 +253,7 @@ Expected response: ```json { "status": "ok", - "server": "arduino-ide-mcp", + "server": "arduino-agent", "version": "0.5.0", "uptime": 123, "auth": true diff --git a/arduino-mcp-extension/bridge/README.md b/arduino-mcp-extension/bridge/README.md index 1038ced373f..5cf3d8e6b48 100644 --- a/arduino-mcp-extension/bridge/README.md +++ b/arduino-mcp-extension/bridge/README.md @@ -30,7 +30,7 @@ is closed: "arduino": { "command": "node", "args": ["/path/to/mcp-bridge/bridge/arduino-agent-bridge.js"], - "env": { "ARDUINO_AGENT_PATH": "/path/to/Arduino IDE executable" } + "env": { "ARDUINO_AGENT_PATH": "/path/to/Arduino Agent executable" } } } } @@ -41,7 +41,7 @@ Where to find it: | Running from | Bridge path | |--------------|-------------| | Release, Windows / Linux | `/resources/mcp-bridge/bridge/arduino-agent-bridge.js` | -| Release, macOS | `Arduino IDE.app/Contents/Resources/mcp-bridge/bridge/arduino-agent-bridge.js` | +| Release, macOS | `Arduino Agent.app/Contents/Resources/mcp-bridge/bridge/arduino-agent-bridge.js` (`Arduino IDE.app` in 0.6.2) | | Source checkout | `arduino-mcp-extension/bridge/arduino-agent-bridge.js`, after `yarn build` in `arduino-mcp-extension` | Releases after v0.6.1 include the bridge; earlier zips don't, so use a checkout @@ -60,7 +60,7 @@ All optional, set as environment variables: |----------|---------|---------| | `ARDUINO_MCP_URL` | `http://127.0.0.1:3847/mcp` | MCP endpoint to forward to | | `ARDUINO_MCP_TOKEN` | *(reads the token file)* | Override the auth token | -| `ARDUINO_AGENT_PATH` | *(unset — never launches)* | Path to the IDE executable. When set, a tool call that needs the IDE while it is closed starts it, waits for its MCP server and then runs the call. Concurrent calls share one launch; if the IDE never answers, the bridge doesn't start it again until it has been seen running. | +| `ARDUINO_AGENT_PATH` | *(unset — never launches)* | Path to the IDE executable. When set, a tool call that needs the IDE while it is closed starts it, waits for its MCP server and then runs the call. Concurrent calls share one launch; if the IDE never answers, the bridge doesn't start it again until it has been seen running. A path written for a pre-0.7.0 release (`Arduino IDE.exe`, `Arduino IDE.app/...`) that no longer exists falls back to the renamed `Arduino Agent` executable. | | `ARDUINO_MCP_LAUNCH_TIMEOUT` | `120` | Seconds to wait for a started IDE's MCP server | | `ARDUINO_MCP_WATCH_INTERVAL` | `5` | Seconds between checks for the IDE coming up (a local TCP connect) | | `ARDUINO_MCP_DEBUG` | *(off)* | Set to `1` for verbose logging on stderr | @@ -72,8 +72,8 @@ Example on Windows: "mcpServers": { "arduino": { "command": "node", - "args": ["C:/Arduino/resources/mcp-bridge/bridge/arduino-agent-bridge.js"], - "env": { "ARDUINO_AGENT_PATH": "C:/Arduino/Arduino IDE.exe" } + "args": ["C:/Arduino Agent/resources/mcp-bridge/bridge/arduino-agent-bridge.js"], + "env": { "ARDUINO_AGENT_PATH": "C:/Arduino Agent/Arduino Agent.exe" } } } } diff --git a/arduino-mcp-extension/bridge/arduino-agent-bridge.js b/arduino-mcp-extension/bridge/arduino-agent-bridge.js index 03b8220f549..598a521884c 100644 --- a/arduino-mcp-extension/bridge/arduino-agent-bridge.js +++ b/arduino-mcp-extension/bridge/arduino-agent-bridge.js @@ -62,7 +62,7 @@ const path = require('path'); const { spawn } = require('child_process'); const PROTOCOL_VERSION = '2024-11-05'; -const BRIDGE_VERSION = '0.3.0'; +const BRIDGE_VERSION = '0.3.1'; const ENDPOINT = process.env.ARDUINO_MCP_URL || 'http://127.0.0.1:3847/mcp'; const ARDUINO_DIR = path.join(os.homedir(), '.arduinoIDE'); const TOKEN_FILE = path.join(ARDUINO_DIR, 'mcp-token'); @@ -142,6 +142,25 @@ function sleep(ms) { return new Promise((resolve) => setTimeout(resolve, ms)); } +/** + * ARDUINO_AGENT_PATH, following the 0.7.0 rename of the executable from + * `Arduino IDE` to `Arduino Agent` (`Arduino IDE.exe`, or on macOS + * `Arduino IDE.app/Contents/MacOS/Arduino IDE`). When a path written for an + * older release no longer exists but the renamed one does, use that, so + * existing MCP configs keep working after an upgrade. + */ +function resolveAgentExecutable(exe) { + if (!exe || fs.existsSync(exe) || !exe.includes('Arduino IDE')) return exe; + const candidates = [ + path.join(path.dirname(exe), path.basename(exe).split('Arduino IDE').join('Arduino Agent')), + exe.split('Arduino IDE').join('Arduino Agent'), + ]; + const renamed = candidates.find((p) => fs.existsSync(p)); + if (!renamed) return exe; + warn(`ARDUINO_AGENT_PATH points at ${exe}, which no longer exists; using ${renamed} instead (the executable was renamed in Arduino Agent 0.7.0 - update the setting)`); + return renamed; +} + /** The message shown when a tool needs the IDE and it is not reachable. */ function offlineMessage(detail) { const lines = [ @@ -358,7 +377,7 @@ class Upstream { } async launchAndWaitOnce(onWaiting) { - const exe = process.env.ARDUINO_AGENT_PATH; + const exe = resolveAgentExecutable(process.env.ARDUINO_AGENT_PATH); if (this.launchGaveUp) { return { ok: false, diff --git a/arduino-mcp-extension/src/node/mcp-server.ts b/arduino-mcp-extension/src/node/mcp-server.ts index b72d66c4a90..bd5d444496a 100644 --- a/arduino-mcp-extension/src/node/mcp-server.ts +++ b/arduino-mcp-extension/src/node/mcp-server.ts @@ -666,7 +666,7 @@ export class ArduinoMCPServer { res.end( JSON.stringify({ status: 'ok', - server: 'arduino-ide-mcp', + server: 'arduino-agent', version: EXTENSION_VERSION, uptime: Math.floor((Date.now() - this.startTime) / 1000), auth: this.requireAuth, @@ -802,7 +802,7 @@ export class ArduinoMCPServer { */ private createMCPServerInstance(): Server { const server = new Server( - { name: 'arduino-ide-mcp', version: EXTENSION_VERSION }, + { name: 'arduino-agent', version: EXTENSION_VERSION }, { capabilities: { tools: {}, prompts: {} }, // Workflow guidance delivered to every client at initialize. diff --git a/arduino-mcp-extension/test/bridge/bridge.test.js b/arduino-mcp-extension/test/bridge/bridge.test.js index d93e4d9a24c..939b1c10d99 100644 --- a/arduino-mcp-extension/test/bridge/bridge.test.js +++ b/arduino-mcp-extension/test/bridge/bridge.test.js @@ -278,6 +278,36 @@ test('an IDE that never answers gives a clear error and is not started twice', a } }); +test('an ARDUINO_AGENT_PATH naming the pre-0.7.0 "Arduino IDE" executable finds the renamed one', async () => { + // A renamed node binary stands in for the renamed IDE executable. + const dir = fs.mkdtempSync(path.join(os.tmpdir(), 'arduino-bridge-rename-')); + const ext = process.platform === 'win32' ? '.exe' : ''; + const renamed = path.join(dir, `Arduino Agent${ext}`); + try { + fs.linkSync(process.execPath, renamed); + } catch { + fs.copyFileSync(process.execPath, renamed); + } + const port = await freePort(); + const bridge = startBridge(port, { + ARDUINO_AGENT_PATH: path.join(dir, `Arduino IDE${ext}`), + ARDUINO_MCP_LAUNCH_TIMEOUT: '10', + }); + let ide; + try { + await bridge.init(); + const pending = bridge.request('tools/call', { name: 'execute_tool', arguments: { tool_name: 'arduino_context', params: {} } }, 15000); + await new Promise((r) => setTimeout(r, 1000)); + ide = await fakeIde(port, { tools: [] }); + const res = await pending; + assert.strictEqual(res.result.isError, undefined); + assert.strictEqual(textOf(res), 'ran execute_tool'); + } finally { + bridge.close(); + await ide?.close(); + } +}); + test('a wrong ARDUINO_AGENT_PATH is reported, not waited on', async () => { const bridge = startBridge(await freePort(), { ARDUINO_AGENT_PATH: path.join(os.tmpdir(), 'no-such-dir', 'Arduino IDE.exe'), diff --git a/docs/BUILDING-WINDOWS.md b/docs/BUILDING-WINDOWS.md index cd076647078..94221bc1b00 100644 --- a/docs/BUILDING-WINDOWS.md +++ b/docs/BUILDING-WINDOWS.md @@ -63,12 +63,20 @@ To produce an installable app (unpacked, unsigned): ```bash cd electron-app +# Rebuild native modules against Electron's ABI. This must come BEFORE the +# production build, which bundles whatever pty.node is present (see CLAUDE.md). +yarn exec theia rebuild:electron # Production bundle (bundled backend + minified frontend) yarn exec theia build --config webpack.config.js --mode production -# Rebuild native modules against Electron's ABI -yarn exec theia rebuild:electron -# Package to electron-app/dist/win-unpacked -yarn exec electron-builder --dir --publish never +# Package to electron-app/dist/win-unpacked. Use bash (PowerShell mis-tokenizes +# -c.extraMetadata.main). The metadata matches the "Package (unpacked)" step in +# .github/workflows/release.yml; without `name` and `main` the app gets the +# wrong user-data folder and skips its bundled plugins. +node ../node_modules/electron-builder/cli.js --dir --publish never \ + -c.electronVersion=30.1.2 \ + -c.extraMetadata.name=arduino-agent \ + -c.extraMetadata.main=./arduino-ide-electron-main.js \ + -c.extraMetadata.theia.frontend.config.buildDate="$(date -u +%Y-%m-%dT%H:%M:%SZ)" ``` The MCP server starts automatically at `http://127.0.0.1:3847` when the IDE diff --git a/docs/development.md b/docs/development.md index 84cd32c667a..b6870e8912d 100644 --- a/docs/development.md +++ b/docs/development.md @@ -200,6 +200,6 @@ This project is built on [GitHub Actions](https://github.com/arduino/arduino-ide [Get](https://arduino.github.io/arduino-cli/installation) the desired version of `arduino-cli` for your platform and manually replace the one inside the IDE. The CLI can be found inside the IDE at: - - Windows: `C:\path\to\Arduino IDE\resources\app\lib\backend\resources\arduino-cli.exe`, - - macOS: `/path/to/Arduino IDE.app/Contents/Resources/app/lib/backend/resources/arduino-cli`, and - - Linux: `/path/to/Arduino IDE/resources/app/lib/backend/resources/arduino-cli`. + - Windows: `C:\path\to\Arduino Agent\resources\app\lib\backend\resources\arduino-cli.exe`, + - macOS: `/path/to/Arduino Agent.app/Contents/Resources/app/lib/backend/resources/arduino-cli`, and + - Linux: `/path/to/Arduino Agent/resources/app/lib/backend/resources/arduino-cli`. diff --git a/electron-app/arduino-ide-electron-main.js b/electron-app/arduino-ide-electron-main.js index 68f506e84e4..eca93548e3d 100644 --- a/electron-app/arduino-ide-electron-main.js +++ b/electron-app/arduino-ide-electron-main.js @@ -1,9 +1,60 @@ // @ts-check 'use strict'; +const fs = require('fs'); const os = require('os'); const path = require('path'); const config = require('./package.json').theia.frontend.config; + +/** + * Since 0.7.0 Arduino Agent keeps its Electron user data in its own folder + * (`arduino-agent`, from the package name) instead of the official Arduino + * IDE's (`arduino-ide`), so the two no longer share a single-instance lock or + * window state. On first start, carry over what lived in the shared folder: + * the shell layout and per-sketch board selections (Local Storage, IndexedDB) + * and the sketches to reopen (config.json). Settings, the MCP token and the + * sketchbook are in ~/.arduinoIDE and stay shared on purpose. + * + * Must run before the backend module is required: it takes the + * single-instance lock on the userData folder at load time. + */ +function migrateUserDataFromArduinoIde() { + const { app } = require('electron'); + const userData = app.getPath('userData'); + const legacy = path.join(app.getPath('appData'), 'arduino-ide'); + const marker = path.join(userData, '.migrated-from-arduino-ide'); + if ( + path.resolve(userData) === path.resolve(legacy) || + !fs.existsSync(legacy) || + fs.existsSync(marker) + ) { + return; + } + try { + // A folder that already has its own data is never overwritten. + if (!fs.existsSync(path.join(userData, 'Local Storage'))) { + for (const entry of ['Local Storage', 'IndexedDB', 'config.json']) { + const from = path.join(legacy, entry); + if (fs.existsSync(from)) { + fs.cpSync(from, path.join(userData, entry), { + recursive: true, + // LevelDB lock files belong to whichever app has the store open. + filter: (src) => path.basename(src) !== 'LOCK', + }); + } + } + } + fs.mkdirSync(userData, { recursive: true }); + fs.writeFileSync(marker, `${new Date().toISOString()}\n`); + } catch (err) { + console.error(`Could not migrate user data from ${legacy}:`, err); + } +} + +// Only bundled releases (they have `buildDate`) ever used the shared folder. +if (config.buildDate) { + migrateUserDataFromArduinoIde(); +} // `buildDate` is only available in the bundled application. if (config.buildDate) { // `plugins` folder inside IDE2. IDE2 is shipped with these VS Code extensions. Such as cortex-debug, vscode-cpp, and translations. diff --git a/electron-app/package.json b/electron-app/package.json index 856f641ac3a..302e8d00194 100644 --- a/electron-app/package.json +++ b/electron-app/package.json @@ -69,7 +69,7 @@ "validatePreferencesSchema": false, "electron": { "showWindowEarly": true, - "uriScheme": "arduino-ide" + "uriScheme": "arduino-agent" }, "reloadOnReconnect": true, "preferences": { @@ -106,8 +106,8 @@ "author": "mixelpixx", "description": "Arduino Agent: the Arduino IDE with a built-in MCP server", "build": { - "appId": "cc.arduino.IDE2", - "productName": "Arduino IDE", + "appId": "io.github.mixelpixx.arduino-agent", + "productName": "Arduino Agent", "asar": false, "detectUpdateChannel": false, "generateUpdatesFilesForAllChannels": true, diff --git a/electron-app/resources/installerSidebar.bmp b/electron-app/resources/installerSidebar.bmp index 28887c2a15e..ef5e2a6a009 100644 Binary files a/electron-app/resources/installerSidebar.bmp and b/electron-app/resources/installerSidebar.bmp differ diff --git a/electron-app/scripts/package.js b/electron-app/scripts/package.js index 9e3593e6443..4e036e4a03d 100644 --- a/electron-app/scripts/package.js +++ b/electron-app/scripts/package.js @@ -27,9 +27,9 @@ async function run() { electronVersion, '-c.extraMetadata.version', version, - // overrides the `name` in the `package.json` to keep the `localStorage` location. (https://github.com/arduino/arduino-ide/pull/2144#pullrequestreview-1554005028) + // Arduino Agent: its own `name`, so its userData (localStorage, single-instance lock) is separate from the official IDE. arduino-ide-electron-main.js migrates the old data once. '-c.extraMetadata.name', - 'arduino-ide', + 'arduino-agent', `-c.${platform}.artifactName`, artifactName, '-c.extraMetadata.theia.frontend.config.appVersion', @@ -102,7 +102,7 @@ async function getVersion() { async function getArtifactName(version) { const { platform, arch } = process; version = isNightly ? `nightly-${await timestamp()}` : version; - const name = 'arduino-ide'; + const name = 'arduino-agent'; switch (platform) { case 'win32': { if (arch === 'x64') { diff --git a/electron-app/scripts/post-package.js b/electron-app/scripts/post-package.js index b346f558f85..fd90a7f33f3 100644 --- a/electron-app/scripts/post-package.js +++ b/electron-app/scripts/post-package.js @@ -131,7 +131,7 @@ async function copyFilesToBuildArtifacts() { case 'linux': { filesToCopy.push( ...glob - .sync('**/arduino-ide*.{zip,AppImage}', { cwd }) + .sync('**/arduino-agent*.{zip,AppImage}', { cwd }) .map((p) => path.join(cwd, p)) ); break; @@ -139,7 +139,7 @@ async function copyFilesToBuildArtifacts() { case 'win32': { filesToCopy.push( ...glob - .sync('**/arduino-ide*.{exe,msi,zip}', { cwd }) + .sync('**/arduino-agent*.{exe,msi,zip}', { cwd }) .map((p) => path.join(cwd, p)) ); break; @@ -147,7 +147,7 @@ async function copyFilesToBuildArtifacts() { case 'darwin': { filesToCopy.push( ...glob - .sync('**/arduino-ide*.{dmg,zip}', { cwd }) + .sync('**/arduino-agent*.{dmg,zip}', { cwd }) .map((p) => path.join(cwd, p)) ); break; diff --git a/electron-app/scripts/windowsCustomSign.js b/electron-app/scripts/windowsCustomSign.js index 5e9585bc246..d7600509b5c 100644 --- a/electron-app/scripts/windowsCustomSign.js +++ b/electron-app/scripts/windowsCustomSign.js @@ -18,7 +18,7 @@ exports.default = async function (configuration) { CONTAINER_NAME ) { childProcess.execSync( - `"${SIGNTOOL_PATH}" sign -d "Arduino IDE" -f "${INSTALLER_CERT_WINDOWS_CER}" -csp "eToken Base Cryptographic Provider" -k "[{{${CERT_PASSWORD}}}]=${CONTAINER_NAME}" -fd sha256 -tr http://timestamp.digicert.com -td SHA256 -v "${filePath}"`, + `"${SIGNTOOL_PATH}" sign -d "Arduino Agent" -f "${INSTALLER_CERT_WINDOWS_CER}" -csp "eToken Base Cryptographic Provider" -k "[{{${CERT_PASSWORD}}}]=${CONTAINER_NAME}" -fd sha256 -tr http://timestamp.digicert.com -td SHA256 -v "${filePath}"`, { stdio: 'inherit' } ); } else {