From 8578d603114d37718f7d81fb0061bb7ffe67d202 Mon Sep 17 00:00:00 2001 From: Christopher Willis-Ford Date: Tue, 4 Aug 2020 10:43:27 -0700 Subject: [PATCH 1/2] Revert "Revert "Merge pull request #131 from cwillisf/rename-to-scratch"" This reverts commit 0817fddce1dbae9aefffab17b3bab959bd95890e. --- README.md | 6 +++--- electron-builder.yaml | 2 +- package.json | 2 +- src/main/index.js | 5 +++-- src/renderer/about.jsx | 22 ++++++++++++---------- src/renderer/index.html | 2 +- 6 files changed, 21 insertions(+), 18 deletions(-) diff --git a/README.md b/README.md index 7abefa5..5f158ac 100644 --- a/README.md +++ b/README.md @@ -8,7 +8,7 @@ Scratch 3.0 as a standalone desktop application This step is temporary: eventually, the `scratch-desktop` branch of the Scratch GUI repository will be merged with that repository's main development line. For now, though, the `scratch-desktop` branch holds a few changes that are -necessary for Scratch Desktop to function correctly but are not yet merged into the main development branch. +necessary for the Scratch app to function correctly but are not yet merged into the main development branch. #### Prepare `scratch-gui`: Quick Start @@ -23,7 +23,7 @@ necessary for Scratch Desktop to function correctly but are not yet merged into 2. `npm link scratch-gui` 3. `npm run build-gui` or `npm run watch-gui` -Your copy of `scratch-gui` should now be ready for use with Scratch Desktop. +Your copy of `scratch-gui` should now be ready for use with the `scratch-desktop` build process. #### Prepare `scratch-gui`: Detailed Version @@ -85,7 +85,7 @@ Sometimes the macOS build process will result in a build which crashes on startu for an entry similar to this: ```text -failed to parse entitlements for Scratch Desktop[12345]: OSUnserializeXML: syntax error near line 1 +failed to parse entitlements for Scratch[12345]: OSUnserializeXML: syntax error near line 1 ``` This appears to be an issue with `codesign` itself. Rebooting your computer and trying to build again might help. Yes, diff --git a/electron-builder.yaml b/electron-builder.yaml index fc32724..7e05c42 100644 --- a/electron-builder.yaml +++ b/electron-builder.yaml @@ -2,7 +2,7 @@ directories: buildResources: buildResources output: dist appId: edu.mit.scratch.scratch-desktop -productName: "Scratch Desktop" +productName: "Scratch" publish: # empty provider list = don't publish mac: category: public.app-category.education diff --git a/package.json b/package.json index d84d2d0..02cea5f 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "scratch-desktop", - "productName": "Scratch Desktop", + "productName": "Scratch", "description": "Scratch 3.0 as a self-contained desktop application", "author": "Scratch Foundation", "version": "3.13.0", diff --git a/src/main/index.js b/src/main/index.js index f7bfd5f..fdae67e 100644 --- a/src/main/index.js +++ b/src/main/index.js @@ -7,6 +7,7 @@ import {getFilterForExtension} from './FileFilters'; import telemetry from './ScratchDesktopTelemetry'; import MacOSMenu from './MacOSMenu'; import log from '../common/log.js'; +import {productName, version} from '../../package.json'; // suppress deprecation warning; this will be the default in Electron 9 app.allowRendererProcessReuse = true; @@ -172,7 +173,7 @@ const createAboutWindow = () => { height: 400, parent: _windows.main, search: 'route=about', - title: 'About Scratch Desktop' + title: `About ${productName}` }); return window; }; @@ -189,7 +190,7 @@ const createMainWindow = () => { const window = createWindow({ width: defaultSize.width, height: defaultSize.height, - title: 'Scratch Desktop' + title: `${productName} ${version}` // something like "Scratch 3.14" }); const webContents = window.webContents; diff --git a/src/renderer/about.jsx b/src/renderer/about.jsx index 8906fe3..9b121bc 100644 --- a/src/renderer/about.jsx +++ b/src/renderer/about.jsx @@ -26,16 +26,18 @@ const AboutElement = () => ( maxHeight: '10rem' }} /> -

{productName}

-
Version {version}
- - { - ['Electron', 'Chrome'].map(component => { - const componentVersion = process.versions[component.toLowerCase()]; - return ; - }) - } -
{component}{componentVersion}
+
+

{productName}

+
Version {version}
+ + { + ['Electron', 'Chrome'].map(component => { + const componentVersion = process.versions[component.toLowerCase()]; + return ; + }) + } +
{component}{componentVersion}
+
); diff --git a/src/renderer/index.html b/src/renderer/index.html index a9665fa..7efeb1d 100644 --- a/src/renderer/index.html +++ b/src/renderer/index.html @@ -20,6 +20,6 @@ -

Scratch Desktop is loading...

+

Scratch is loading...

From 809164880337ed722d5fb84195def89851b765d8 Mon Sep 17 00:00:00 2001 From: Christopher Willis-Ford <7019101+cwillisf@users.noreply.github.com> Date: Thu, 17 Sep 2020 12:07:08 -0700 Subject: [PATCH 2/2] use 'Scratch 3' for external product name also tweak artifact names to get the "3" part from the version number --- electron-builder.yaml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/electron-builder.yaml b/electron-builder.yaml index 7e05c42..e52e662 100644 --- a/electron-builder.yaml +++ b/electron-builder.yaml @@ -2,7 +2,7 @@ directories: buildResources: buildResources output: dist appId: edu.mit.scratch.scratch-desktop -productName: "Scratch" +productName: "Scratch 3" publish: # empty provider list = don't publish mac: category: public.app-category.education @@ -16,9 +16,12 @@ mac: hardenedRuntime: true icon: buildResources/ScratchDesktop.icns provisioningProfile: embedded.provisionprofile + artifactName: "Scratch ${version}.${ext}" target: - dmg - mas +dmg: + title: "Scratch ${version}" mas: category: public.app-category.education entitlements: buildResources/entitlements.mas.plist @@ -37,5 +40,7 @@ appx: identityName: ScratchFoundation.ScratchDesktop publisherDisplayName: "Scratch Foundation" publisher: "CN=2EC43DF1-469A-4119-9AB9-568A0A1FF65F" + artifactName: "Scratch ${version}.${ext}" nsis: oneClick: false # allow user to choose per-user or per-machine + artifactName: "Scratch ${version} Setup.${ext}"