Re: [hatari-devel] Hatari macOS builds - handover need?

[ Thread Index | Date Index | More lists.tuxfamily.org/hatari-devel Archives ]


Attachment: hatari.diff
Description: Binary data


I appended a patch that makes it possible to automate the build process quite a bit. It might need some refinement, like only copy frameworks, if they were found and add some additional frameworks as mentioned.

The output of the CMake script on my system is below. readline is part of macOS by default. I only added SDL2.framework and png.framework. The latter I had to compile myself.

Libraries summary :
-------------------

  - sdl : using SDL2 2.26.4
  - readline : found, enables history/completion in the debugger
  - zlib : found, allows to use zip/gz files directly
  - png : found, allows to compress screenshot/avi files using png
  - portmidi : not found, install it for MIDI support on Windows / OSX
  - capsimage : v5 not found, install it to use .IPF, .RAW and .CTR disk images
  - python Gtk: not found, install it to enable the python-ui
  - capstone : not found, install it to use extend disassembly options
  - LFS : Large File Support is available (size of off_t = 8),
          AVI recording and HD image files can be bigger than 2 GB


These commands were used from the root directory of the sources to create the distributable executable:
#cmake ..
#make
#install_name_tool -change /opt/local/lib/libz.1.dylib /usr/lib/libz.1.dylib src/hatari.app/Contents/MacOS/hatari
#codesign --force -s - src/hatari.app/Contents/MacOS/hatari

I have no paid developer ID. The command involving install_name_tool is only necessary, if you have a MacPorts version of libz installed. For some reason it prefers linking to that one instead the system installed one.

I made a new executable, which I started once before zipping it. Does this fix the first-start-problem?

https://www.dropbox.com/s/06v0r9bbbj4x59g/hatari_2.4.1b.zip?dl=0



Am 26.04.2023 um 17:16 schrieb Bob Carpenter <hatari@xxxxxxxxxx>:

Chris,

Looking at Andreas’ binary, you would need to add the following frameworks to match what Troed produced for the download and nightly binaries:
- CAPSImage.Framework (I do not know if Mac users would even notice if IPF support was missing. IPF files appear to be much more popular in the Amiga world. When Nicolas added STX support, I feel it eliminated the need for IPF support).
- Portaudio.Framework (I think it is used for the microphone support on the Falcon. I do not emulate a Falcon so I am not sure about this)
- Portmidi.Framework (allows better MIDI support on Hatari which is used by Mac Hatari users)
- libncurses, libreadline (I think these are both used by Hatari’s debugger. Since you have to activate the debugger from Terminal and run the executable and not the application package, I am not sure how many Mac users use the debugger. However, I know Hatari’s debugger is widely used.

Bob C

On Apr 26, 2023, at 2:09 AM, Chris Jenkins <cdpjenkins@xxxxxxxxx> wrote:

Cool, sounds like we are getting the same behaviour then.

I need to find the time to build the binary myself using Andreas's approach. That won't happen until the weekend, though, because I'm travelling for the rest of the week. If I can build it myself then I can try to figure out how to sign the app. (I now have an Apple Developer account... I thought screw it, I'll pay £80 and see if that helps... but I am a massive noob when it comes to this stuff so have to learn how it all works.)


On Wed, 26 Apr 2023 at 01:59, Bob Carpenter <hatari@xxxxxxxxxx> wrote:
Chris,

This binary shows a different message than I usually see for an unsigned application. However, as you mentioned, as soon as I did “xattr -c <app bundle>”. The program only asked me for permission to my Documents folder (where my GEMDOS disk directory is located) once. It also asked for permission to my Downloads folder (where the binary was located).

Hopefully, the automated nightly binary can be made to work like this.

Bob C

On Apr 25, 2023, at 1:39 PM, Chris Jenkins <cdpjenkins@xxxxxxxxx> wrote:

I've tried the right-click open method multiple times on two different Macs. Same result on both, alas. 

On Tue, 25 Apr 2023 at 21:36, Bob Carpenter <hatari@xxxxxxxxxx> wrote:
Chris,

I will try the binary when I get home, but did you try opening the binary twice with the right-click open method? I have had luck doing this in the past with non-developer certificate signed applications. 

Bob C

On Tue, Apr 25, 2023, at 11:59 AM, Chris Jenkins wrote:


Great! Isn‘t it possible to open it using right click - open?
No, if I don't remove the quarantine attribute then it isn't even possible to right click and open :-(


 

Am 25.04.2023 um 20:44 schrieb Chris Jenkins <cdpjenkins@xxxxxxxxx>:

Yes, that launches successfully (on my M1 Mac).

I had to use xattr to remove the com.apple.quarantine attribute before I could run it (MacOS tells me that it's "damaged" if I don't do that!) but it then ran fine.

I don't see repeated requests for permissions either :-)

On Tue, 25 Apr 2023 at 18:17, Andreas Grabher <andreas_g86@xxxxxxxxxx> wrote:


Am 24.04.2023 um 19:59 schrieb Andreas Grabher <andreas_g86@xxxxxxxxxx>:



Am 24.04.2023 um 19:52 schrieb Troed Sångberg <troed@xxxxxxxxxxx>:

Indeed this is why I sponsored Hatari with a cert for my builds.

Let me see how to handle forwards. 



On Mon, Apr 24, 2023 at 19:41, Thomas Huth <th.huth@xxxxxxxxx> wrote:
On 23/04/2023 22.38, Chris Jenkins wrote:
>
> > It works, with caveats:
> > - Hatari starts ok if I right click and click Open. It's unsigned so
> I have
> > to open it that way.
>
> That only happens during the first time you run the app, right? Or does
> that happen every time you try to run the app?
>
>
> This happens every time I run the app.
[...]
> One thing I should add: this Hatari binary asks for permission to use my
> microphone every time that I launch it :-(. So I assume that's another
> permission that has to be granted every time that the unsigned app is launched.

Hmm, this all sounds like providing unsigned apps is too annoying nowadays
on macOS. I guess I should rather stop my experiments with cirrus-CI here
and let somebody else handle the macOS builds instead who has a proper
developer ID from Apple. (And no, I certainly won't get one on my own - I
certainly won't pay 99$ a year for something that I'm not using on my own)

Thomas

You don‘t need a paid ID for signing. Just follow the instructions from my previous message and you will end up with a distributable binary. It will only ask once for every permission (first start, first time microphone used, first access to certain folders). 

Any issues with this binary for macOS (universal binary, macOS 10.13 or later, PNG and SDL2 included)?







Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/