automatic-mouse-mover icon indicating copy to clipboard operation
automatic-mouse-mover copied to clipboard

updated dependency for M1 support

Open cnpog opened this issue 3 years ago • 19 comments

  • set the go version to 1.16 which is the first version to support M1
  • updated all the dependencies to get rid of compile errors On an additional note you can combine an arm and an x86 binary with "lipo" to get a universal binary.

cnpog avatar Oct 27 '22 12:10 cnpog

Thanks for the PR! Will take a look asap

prashantgupta24 avatar Oct 27 '22 16:10 prashantgupta24

thanks for looking at it, I guess the version needs to be 1.18 at least if I understand that pipeline error correctly

cnpog avatar Oct 28 '22 07:10 cnpog

Will probably need to edit the workflow file which mentions 1.17

prashantgupta24 avatar Oct 28 '22 22:10 prashantgupta24

Hmm, seems to be some issues with the new robotgo lib?

prashantgupta24 avatar Nov 01 '22 16:11 prashantgupta24

I cannot replicate this on my machine, do you know how?

cnpog avatar Nov 03 '22 07:11 cnpog

no :(

prashantgupta24 avatar Nov 15 '22 20:11 prashantgupta24

Better go directly with robotGo v1.0.0 which is in RC1(https://github.com/go-vgo/robotgo/releases/tag/v1.0.0-rc1), which seems to bring not retro-compatible change

Resousse avatar Aug 28 '23 15:08 Resousse

this PR can be closed I presume

Resousse avatar Oct 15 '23 08:10 Resousse

Newest release still uses Rosetta 2 on my M1

longgiangp avatar Oct 15 '23 08:10 longgiangp

Newest release still uses Rosetta 2 on my M1

I think it's more a matter of compilation because on my side (compiled from source), I have it running as Apple (not Intel) image

Resousse avatar Oct 17 '23 11:10 Resousse

Should I add something to the build to build one for Apple macs?

prashantgupta24 avatar Oct 17 '23 16:10 prashantgupta24

may be it depends on the system you used to compile, because I didn't add anything, to make "Apple" appear :/

Resousse avatar Oct 17 '23 16:10 Resousse

@Resousse how did you get to the view where it says Apple ?

prashantgupta24 avatar Oct 17 '23 17:10 prashantgupta24

Activity monitor > processes

Resousse avatar Oct 17 '23 18:10 Resousse

Let me compile it with my m1 and add it to the release. Right now the one I have added was compiled on my x86

prashantgupta24 avatar Oct 17 '23 18:10 prashantgupta24

Should I add something to the build to build one for Apple macs?

Setting Architecture variables should work. I haven't tried yet.

   GOOS=darwin
   BINARY_NAME=amm_universal

   build:
       mkdir -p -v ./bin/amm.app/Contents/Resources
       mkdir -p -v ./bin/amm.app/Contents/MacOS
       cp ./appInfo/*.plist ./bin/amm.app/Contents/Info.plist
       cp ./appInfo/*.icns ./bin/amm.app/Contents/Resources/icon.icns
       GOARCH=amd64 go build -o ./bin/amm.app/Contents/MacOS/amm_amd64 cmd/main.go
       GOARCH=arm64 go build -o ./bin/amm.app/Contents/MacOS/amm_arm64 cmd/main.go
       lipo -create -output $(BINARY_NAME) amm_amd64 amm_arm64

longgiangp avatar Oct 17 '23 20:10 longgiangp

When you compiled it it goes with rosetta/intel?

Resousse avatar Oct 17 '23 20:10 Resousse

When you compiled it it goes with rosetta/intel?

Yep. I see intel instead of Apple in Activity monitor > processes

prashantgupta24 avatar Oct 17 '23 21:10 prashantgupta24

on my side, I do not find how to compile an "Intel" version :) My go version is : go1.21.3 darwin/arm64 Same on your side?

Finally I'm able to generate an intel version : CGO_ENABLED=1 GOARCH=amd64 make

Resousse avatar Oct 18 '23 07:10 Resousse