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

fix: intel mac proxy #467

Merged
merged 5 commits into from
Feb 13, 2025
Merged

fix: intel mac proxy #467

merged 5 commits into from
Feb 13, 2025

Conversation

Llandy3d
Copy link
Member

@Llandy3d Llandy3d commented Feb 11, 2025

Description

Fix #460
Fix #486

The build for both mac architectures is done on an arm machine and that would make the packager packager only the arm64 folder even on an x86_64 architecture, this PR fixes that by including both folders on mac with a small cost of 71~MB increase of application size

How to Test

Checklist

  • I have performed a self-review of my code.
  • I have added tests for my changes.
  • I have run linter locally (npm run lint) and all checks pass.
  • I have run tests locally (npm test) and all tests pass.
  • I have commented on my code, particularly in hard-to-understand areas.

Screenshots (if appropriate):

Related PR(s)/Issue(s)

@Llandy3d Llandy3d requested a review from a team as a code owner February 11, 2025 14:39
@Llandy3d Llandy3d marked this pull request as draft February 11, 2025 14:39
forge.config.ts Outdated
Comment on lines 12 to 21
let resources = [
'./resources/' + getPlatform() + '/' + getArch(),
]

if (getPlatform() === 'mac') {
resources = [
'./resources/mac/arm64',
'./resources/mac/x86_64',
]
}
Copy link
Collaborator

Choose a reason for hiding this comment

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

Nit: I'm not a big fan of reassigning variables, so wanted to suggest an alternative:

function getPlatformSpecificResources() {
  if (getPlatform() === 'mac') {
    return ['./resources/mac/arm64', './resources/mac/x86_64']
  }

  return ['./resources/' + getPlatform() + '/' + getArch()]
}

const config: ForgeConfig = {
  // ...
  extraResource: [
    // ...
    ...getPlatformSpecificResources()
  ]
}

forge.config.ts Outdated
@@ -9,6 +9,17 @@ import { FusesPlugin } from '@electron-forge/plugin-fuses'
import { FuseV1Options, FuseVersion } from '@electron/fuses'
import { getPlatform, getArch } from './src/utils/electron'

let resources = [
'./resources/' + getPlatform() + '/' + getArch(),
Copy link
Collaborator

Choose a reason for hiding this comment

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

Can we use path.join('./resources', getPlatform(), getArch())?

Copy link
Member Author

Choose a reason for hiding this comment

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

makes absolutely more sense :D

package.json Outdated
@@ -1,7 +1,7 @@
{
"name": "k6-studio",
"productName": "k6 Studio",
"version": "0.12.0",
"version": "0.13.0",
Copy link
Collaborator

Choose a reason for hiding this comment

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

This doesn't seem right 👀

Copy link
Member Author

Choose a reason for hiding this comment

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

this is just for testing and will be reverted before the PR gets merged 🙇

@Llandy3d Llandy3d marked this pull request as ready for review February 12, 2025 17:06
Copy link
Collaborator

@cristianoventura cristianoventura left a comment

Choose a reason for hiding this comment

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

🍎

Copy link
Collaborator

@going-confetti going-confetti left a comment

Choose a reason for hiding this comment

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

LGTM

@Llandy3d Llandy3d merged commit a38c757 into main Feb 13, 2025
5 checks passed
@Llandy3d Llandy3d deleted the fix_intel_mac branch February 13, 2025 10:37
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.

Browser does not start Error on startup in macOS: Javascript error has occured in the browser process
3 participants