Gkiokan / ps4-remote-pkg-sender

286 stars 24 forks source link

[Feature Request] Native Arm build for macOS #85

Open shinra-electric opened 1 month ago

shinra-electric commented 1 month ago

This feature request is for one of two possibilities:

Currently there are two Mac releases: PS4.Remote.PKG.Sender.V2-2.10.4-mac.zip PS4.Remote.PKG.Sender.V2-2.10.4.dmg They seem like identical x86 builds, the only difference being the delivery method (zip vs dmg). This seems a bit superfluous.

Gkiokan commented 1 month ago

Hi there. Thanks for the Issue.

Indeed, a non technical User may get confused with all the different releases, even though there is a Support for all Architectures.

The Mac Releases are exactly the same, just with the difference for the People who like the DMG Installer, they can pick it over the zip file which has the Single Executable file.

I think for covering the confusion, it will be worth to make a little Landingpage to guide the User on what to pick.

I am still on mac intel version, but the new arm processors of Mac should be capable of running x86 and x64 builds without hassle - at this scale there is no special x64 coding involved. Maybe even the Linux ones?

shinra-electric commented 1 month ago

I am still on mac intel version, but the new arm processors of Mac should be capable of running x86 and x64 builds without hassle - at this scale there is no special x64 coding involved.

The M-series Macs can certainly handle running the x86 versions through Rosetta, but it's extra overhead on top of Electron (which is notorious for being a slow resource hog).

How are you building the releases? Do you have any build instructions anywhere so people who would prefer a native version could build it themselves?

I don't think you use Github Actions, but this might be a good option for creating releases automatically...

Gkiokan commented 1 week ago

Sorry for the delay, I was on vacation.

Sure you can build it yourself. You might use nvm use 14 first.
Install the node modules first with npm i and then build the release by running npm run build:mac or even simpler npm run build as it will build the release file based on your OS with it's dependencies.

Not remembering right now if required, but you may need to install npm i pkg -g, too.

shinra-electric commented 5 days ago

Thanks for the reply.

I wasn't able to get this to build, I got a ton of errors about deprecated or unsupported packages.

I'm sure I'm not doing something right. Could you provide build instructions in a step-by-step list?

Gkiokan commented 2 days ago

I never tried my build on a M Series mac but I've heard that not all x86 instructions can be build on arm.
There are a couple deprecated packages yes, but there are good reason to stay there where the versions are.
Mental moral of the principe: Never change a running System.

What you have to do is basically, make sure you are on node 14.x, install the npm deps and then build.
If you have nvm installed, you can swap over with nvm use 14.

Check your node version with
node -v

Install the dependencies npm install

Build for your machine npm run build

If you still have trouble, get in touch with me over Discord or Telegram.

It should look something like this with a bunch of logging but in the end must succeed the build.

image