Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WIP] Feature/uepr 40 desktop feature parity #461

Draft
wants to merge 2 commits into
base: develop
Choose a base branch
from

Conversation

KManolov3
Copy link

Resolves

Resolves https://scratchfoundation.atlassian.net/browse/UEPR-140

Proposed Changes

  • Allow for test builds on Linux
  • Remove electron-webpack and handle webpack configuration manually

Reason for Changes

  • To be able to upgrade webpack to v5 - the version of GUI - and, consequently, catch up with latest GUI features

@KManolov3 KManolov3 marked this pull request as draft February 10, 2025 18:12
Copy link
Contributor

@cwillisf cwillisf left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wow, there's a lot going on here! There are a couple of things to change, but they're pretty minor... overall this looks good to me. It looks like maybe the development experience is even a little better than before...?

Do you think scratch-webpack-configuration would help here, or would that just complicate things? I'm not suggesting to add it to this PR, just curious about a possible future step.

Comment on lines +17 to +19
"build:dev": "NODE_ENV=production npm run compile && npm run doBuild -- --mode=dev",
"build:dir": "NODE_ENV=production npm run compile && npm run doBuild -- --mode=dir",
"build:dist": "NODE_ENV=production npm run compile && npm run doBuild -- --mode=dist",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is NODE_ENV=production necessary here?

Assuming it is necessary, could you set this up to use crossenv instead? That will allow Windows users to run these commands, too.

shell: true
});

mainProcess.on('exit', async (code) => {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm... can't you do something like await spawn(...)?
(does some web searching)
...nevermind, this looks good. 😅

Comment on lines -23 to +24

const devToolKey = ((process.platform === 'darwin') ?
{ // macOS: command+option+i
const devToolKey = ((process.platform === 'darwin' || process.platform === 'linux') ?
{ // macOS / linux: command+option+i
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think Linux wants the same control+shift+i key combo as Windows here

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think Linux wants the same control+shift+i key combo as Windows here

as a former linux user (and still somewhat uses it), i can confirm

const baseUrl = (isDevelopment ?
`http://localhost:${process.env.ELECTRON_WEBPACK_WDS_PORT}/` :
`file://${__dirname}/`
const baseUrl = (isDevelopment ?
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
const baseUrl = (isDevelopment ?
const baseUrl = (isDevelopment ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants