jziolkowski / tdm

GUI application to discover and monitor devices flashed with https://github.com/arendst/tasmota
GNU General Public License v3.0
667 stars 84 forks source link

MacBook Pro M3 Executable #285

Open alancairns opened 2 months ago

alancairns commented 2 months ago

Is the an executable version of TDM for the MacBook M3? It doesn't appear to be listed on the release page below the Assets tab.

jziolkowski commented 2 months ago

Since I don't have a Mac, I have to rely on volunteers help in testing these releases. I'll update the assets as soon as I have verified that the builds work.

alancairns commented 2 months ago

Hi Jacek, thank you for your prompt reply. I will keep a lookout for the updated assets.

Regards

Alan Cairns

On 17 Sep 2024, at 2:06 PM, Jacek Ziółkowski @.***> wrote:

Since I don't have a Mac, I have to rely on volunteers help in testing these releases. I'll update the assets as soon as I have verified that the builds work.

— Reply to this email directly, view it on GitHub https://github.com/jziolkowski/tdm/issues/285#issuecomment-2355723963, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAX7H47OGK2MGNKFQA43ZMLZXASMNAVCNFSM6AAAAABOK3TZ3KVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGNJVG4ZDGOJWGM. You are receiving this because you authored the thread.

Jason2866 commented 2 months ago

The Mac App binary from release section does work. You can use on the M3 already. Since this is not a native build you have to install Rosetta

@jziolkowski You should tar the Mac binary. Github does not store file rights. So the execute right is lost and has to be set manually to launch the binary. You should provide the builded APP too. This one can directly started with a double click

Mabe using dmg? Like this

...
      - name: Run PyInstaller
        run: |
          python -m PyInstaller tdmgr_mac.spec
          create-dmg tdmgr_Mac_x64.dmg dist
...
jziolkowski commented 2 months ago

I can use whichever format is recommended these days for Macs.

As for the build env, the current macos worker is intel-based. With arm based there are library errors (with pyinstaller afaik).

That create-dmg is already present on mac builder or needs an external install? also are there noticeable differences with the tdmgr mac spec? if possible I want to have a single spec file; I can add (more) conditional checks inside

Jason2866 commented 2 months ago

@jziolkowski You can have a look to my old tdm fork. The GH Actions does build for win and mac. https://github.com/Jason2866/tdm/blob/development/.github/workflows/main.yml

spec file for Mac Intel and Arm is identic. Pyinstaller works fine with both.

alancairns commented 2 months ago

I'm a bit out of my depth here so please bare with me if am asking silly questions. When I go to the webpage https://github.com/jziolkowski/tdm/releases in the assets section there are 5 files listed in the TDM 2024.9.3 section: tdmgr_2024.9.3.exe, tdmgr_2024.9.3_x64 and tdmgr_2024.9.3_x64.exe

I've just noticed that in the TDM 0.2.13 section the are two MacOS files: tdmgr_0.2.13.appImage.zip and tdmgr_0.2.13.macOS.zip. Is it one of these files I should be using?

Jason2866 commented 2 months ago

The Mac binary is tdmgr_2024.9.3_x64

@jziolkowski The naming imho of the released binaries should be more clear.

To build an app for Mac you have to add in the spec file:

app = BUNDLE(exe,
             name='the name of the app',
             icon='tdmgr.icns',
             bundle_identifier='com.tasmota.tdmgr')
alancairns commented 2 months ago

I have the app working by downloading tdmgr_0.2.13.macOS.zip which produced a file named dist.tar in the downloads folder. In Terminal I changed directory to the downloads folder the ran tar -xzf list.tar and this created a file tdmgr_0.2.13.app that I was able to run. How I will now try to build the tdmgr_2024.9.3_x64 ( I've never had to build an app before). Once again thank you both for your prompt help.

jziolkowski commented 2 months ago

I should have working CI with updated builds this evening

alancairns commented 2 months ago

Thank you so much!

jziolkowski commented 2 months ago

My investigation shown (proved by various GH issues) that Python3.8 and 3.9 is not available on the latest macos runner (arm Mx). So for now only intel-based builds will be available until I check the implications of moving TDM to python 3.10.

I wanted to go with 3.9 since python 3.8 reaches EoL next month.

However I think it might be possible to build with 3.10 on macos arm only. We'll see.

jziolkowski commented 2 months ago

The naming imho of the released binaries should be more clear.

working on that, agree 100%

jziolkowski commented 2 months ago

ok then. I have a playground repo, I did some mac CI work tests there. Pleae check if the .dmg file works on Mac. Despite TDM name it's just a simple console app that should print 'hello world'

jziolkowski commented 2 months ago

https://github.com/jziolkowski/citest/releases/tag/0.3

alancairns commented 2 months ago

I’ve downloaded the tdmgr_Mac_x64.dmg then copied the tdmgr_Mac_x64.app to my Application folder but the app doesn’t open I’m afraid.

On 17 Sep 2024, at 9:20 PM, Jacek Ziółkowski @.***> wrote:

ok then. I have a playground repo, I did some mac CI work tests there. Pleae check if the .dmg file works on Mac. Despite TDM name it's just a simple console app that should print 'hello world'

— Reply to this email directly, view it on GitHub https://github.com/jziolkowski/tdm/issues/285#issuecomment-2356843254, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAX7H44VRSHKXUYFICOHOTDZXCFHNAVCNFSM6AAAAABOK3TZ3KVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGNJWHA2DGMRVGQ. You are receiving this because you authored the thread.

jziolkowski commented 2 months ago

the docs I've read say that you install the dmg. not copy the app manually. but again, no mac here, can't really test it.

@Jason2866 can you give some input? i've adapted the mac stuff from your old repo fork

Jason2866 commented 2 months ago

@jziolkowski This fork with GH actions build does work https://github.com/Jason2866/tdm/tree/actions_mac For the hell idk why the "if" to exclude Windows to pack as DMG is not working (Line 53) The resulting APP in the DMG container is tested working. Only the Icon is missing. Needs to be added in the build spec...

jziolkowski commented 2 months ago

did you test the one I built? Not sure if you're referring to my build or your build

Jason2866 commented 2 months ago

Your release is working. But it is not an app binary which can be used without modifications. In short not end user ready. The one which is build in my fork is working out of the box.

jziolkowski commented 2 months ago

The only difference I noticed was with my create-dmg invokation in relation to relative paths. I've updated to how you invoke it.

Please check updated dmg in https://github.com/jziolkowski/citest/releases/tag/0.3

Jason2866 commented 2 months ago

@jziolkowski Yours does work. Needs to run from console to see output. If started via double click nothing is shown.

jziolkowski commented 2 months ago

well yes, it's in console mode i'll update the TDM repo and rebuild, we'll see with a proper GUI app

Jason2866 commented 2 months ago

Build in my fork. Both Mac version does work. The Windows X64 is working with Wine too. It is surprisingly fast with Wine!

jziolkowski commented 2 months ago

wine uses the minimum set of libs needed to run a windows application. without the bloat of the entire OS it's fast indeed.

jziolkowski commented 2 months ago

https://github.com/jziolkowski/tdm/releases/tag/2024.9.4.dev8

let's give it a try please

alancairns commented 2 months ago

Sorry for the delay in trying the app but I’ve been away all day today. I’ve just downloaded this version and it doesn’t open. I’m not sure if this is relevant but when in right click on any of my other apps the menu shows “Show Package Contents” just below “Open” but tdmgr_2024.9.4.dev8_mac_x86_64.app does not give this option.

On 18 Sep 2024, at 7:47 PM, Jacek Ziółkowski @.***> wrote:

https://github.com/jziolkowski/tdm/releases/tag/2024.9.4.dev8

let's give it a try please

— Reply to this email directly, view it on GitHub https://github.com/jziolkowski/tdm/issues/285#issuecomment-2359176838, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAX7H436GAK2TFMY3V3ZY4TZXHDERAVCNFSM6AAAAABOK3TZ3KVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGNJZGE3TMOBTHA. You are receiving this because you authored the thread.

jziolkowski commented 2 months ago

we'll need to wait for Jason. I have no idea.

Are you extracting the .app from the .dmg file? is that how you install these apps? no idea...

Jason2866 commented 2 months ago

Sorry for the delay in trying the app but I’ve been away all day today. I’ve just downloaded this version and it doesn’t open. I’m not sure if this is relevant but when in right click on any of my other apps the menu shows “Show Package Contents” just below “Open” but tdmgr_2024.9.4.dev8_mac_x86_64.app does not give this option.

Since the app is not signed (needs a Apple developer account -> $) it can't be just clicked. After the DMG is mounted go in Finder to the APP right click and select open (or start idk don't have english installed) after that a warning window opens (downloaded from Internet security...) accept and it will start. This needs to be done only one time. Next time you can start as usual.

alancairns commented 2 months ago

I followed the normal procedure which is to double-click the dmg file and it ‘mounts’ the dmg and displays an icon with the title of the app in the Finder window.. Then in the Finder window I drag the icon to the Application folder. I do really appreciate the effort from both you.

On 18 Sep 2024, at 8:40 PM, Jacek Ziółkowski @.***> wrote:

we'll need to wait for Jason. I have no idea.

Are you extracting the .app from the .dmg file? is that how you install these apps? no idea...

— Reply to this email directly, view it on GitHub https://github.com/jziolkowski/tdm/issues/285#issuecomment-2359265910, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAX7H47O3EWYBX3EGYULEMTZXHJLZAVCNFSM6AAAAABOK3TZ3KVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGNJZGI3DKOJRGA. You are receiving this because you authored the thread.

jziolkowski commented 2 months ago

I have similar issues with .exe not being signed on windows, they make it more and more difficult to run unsigned apps. It's $100 per year for mac, and 60€ (IIRC) for windows. Yeah, not going to happen anytime soon :D

jziolkowski commented 2 months ago

anyway thank you both, for testing and debugging. Can I close the issue?

alancairns commented 2 months ago

I’ve just tried this but didn’t get the warning and it failed tom open.

On 18 Sep 2024, at 8:56 PM, Jason2866 @.***> wrote:

Sorry for the delay in trying the app but I’ve been away all day today. I’ve just downloaded this version and it doesn’t open. I’m not sure if this is relevant but when in right click on any of my other apps the menu shows “Show Package Contents” just below “Open” but tdmgr_2024.9.4.dev8_mac_x86_64.app does not give this option.

Since the app is not signed (needs a Apple developer account -> $) it can't be just clicked. After the DMG is mounted go in Finder to the APP right click and select open (or start idk don't have english installed) after that a warning window opens (downloaded from Internet security...) accept and it will start. This needs to be done only one time. Next time you can start as usual.

— Reply to this email directly, view it on GitHub https://github.com/jziolkowski/tdm/issues/285#issuecomment-2359292345, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAX7H43V6BQUV676MYZXQBTZXHLF5AVCNFSM6AAAAABOK3TZ3KVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGNJZGI4TEMZUGU. You are receiving this because you authored the thread.

jziolkowski commented 2 months ago

@alancairns any update here? I'd like to resolve the issue.

alancairns commented 1 month ago

I have just tried it again but still doesn’t open. I am using tdmgr_0.2.13.app for the time being

dweston commented 1 month ago

I'm another keen Tasmota user also with an Apple M3 based laptop. I'm also unable to use @Jason2866 's suggestion of right clicking the APP within its DMG mount and selecting 'Open'. However, no Internet security warning window pops up.

The relevant system log entries confirm this due to the Gatekeeper blocking execution:

2024-10-14 18:22:18.170483 (gui/501/application.?.38288397.38288397 [18380]) <Warning>: removing service since it exited with consistent failure - OS_REASON_EXEC | Gatekeeper policy blocked execution
2024-10-14 18:22:18.170499 (gui/501/application.?.38288397.38288397 [18380]) <Notice>: exited with exit reason (namespace: 9 code: 0x8) - OS_REASON_EXEC | Gatekeeper policy blocked execution, ran for 65ms

I've tried the usual gamut of methods to partially disable Gateway or otherwise authorise the tdmgr app (e.g. sudo spctl --master-disable

and xattr -dr com.apple.quarantine /path/to/your/copy/of/tdmgr_2024.10.2.1_mac_x86_64.app)

The only method that came close was by directly starting the app within the Terminal.app, whereupon the GUI came up but otherwise the app was non-functional. This may well be the consequence of the Python version that was present by default in the OS version my laptop came with.