Re: [hatari-devel] How to include EmuTOS in Hatari.app when building it yourself on macOS? |
[ Thread Index |
Date Index
| More lists.tuxfamily.org/hatari-devel Archives
]
- To: hatari-devel@xxxxxxxxxxxxxxxxxxx
- Subject: Re: [hatari-devel] How to include EmuTOS in Hatari.app when building it yourself on macOS?
- From: Frank Danapfel <frank.danapfel@xxxxxxxxxxxxxx>
- Date: Sun, 29 Jun 2025 16:12:06 +0200
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20230601; t=1751206339; x=1751811139; darn=lists.tuxfamily.org; h=message-id:in-reply-to:to:references:date:subject:mime-version :content-transfer-encoding:from:from:to:cc:subject:date:message-id :reply-to; bh=a91DPCMMqidxtIm1sCvxM4wf29+trNZJ7uFuniKGuzY=; b=f/H+Xwmjuudu7sAAtq0BrcNHF+xpFiT1/0NBcG9hcFPsGXO5lh/TBN3DDo5SUCV9Fl OMkXmdsD9uIiE2PHn30sUNtO2MkchClfD/Kn65UlzPz3ZdnxSvd+Fls6i4YZ/9YgrmxL LwNjIM8c49Qf/kdXMh745i+YeSw/LA45yUtWGEaiQ1N0DW3QPFqeH88O4HzReVeaECax 00GR7G2h/3qSJkwBEU5+SEN/hl22l4QXrWu90ZD3nOAvD5Md4n4RQUtFj/97c6QMUWl1 73t+8f7P/hKmRJ0zDSMrhtEWqf4GCpxhDl9fuk7hJql6Ql7XpZa+p5hNkL86pHxMcmM3 cmCQ==
Hello Thomas,
> On 29. Jun 2025, at 13:57, Thomas Huth <th.huth@xxxxxxxxx> wrote:
>
> Hi Frank,
>
> since tos.img is optional, I think we'd rather need something like this:
Ah, OK. I know next to nothing about CMake and did not know that it would fail if the tos.img wasn’t in the source folder with the way I changed the CMakeLists.txt. Thanks for taking a look at this and updating the patch to make it work.
> diff a/src/CMakeLists.txt b/src/CMakeLists.txt
> --- a/src/CMakeLists.txt
> +++ b/src/CMakeLists.txt
> @@ -18,6 +18,8 @@ endif()
> # Disk image code is shared with the hmsa tool, so we put it into a library:
> add_library(Floppy createBlankImage.c dim.c msa.c st.c zip.c utils.c)
>
> +file(GLOB TOS_IMG_FILE tos.img LIST_DIRECTORIES false)
> +
> # When building for macOS, define specific sources for gui and resources
> if(ENABLE_OSX_BUNDLE)
> set(GUIOSX_SOURCES
> @@ -25,7 +27,8 @@ if(ENABLE_OSX_BUNDLE)
> gui-osx/CreateFloppyController.m gui-osx/SDLMain.m gui-osx/paths.m)
> set_source_files_properties(${GUIOSX_SOURCES} PROPERTIES LANGUAGE C)
> set(GUIOSX_RSRCS
> - Hatari.icns gui-osx/stdisk.png gui-osx/en.lproj gui-osx/fr.lproj)
> + Hatari.icns gui-osx/stdisk.png gui-osx/en.lproj gui-osx/fr.lproj
> + ${TOS_IMG_FILE})
> set(GUIOSX_DOCS
> ${CMAKE_SOURCE_DIR}/doc/manual.html ${CMAKE_SOURCE_DIR}/doc/images
> ${CMAKE_SOURCE_DIR}/doc/compatibility.html ${CMAKE_SOURCE_DIR}/doc/toc.js )
> @@ -271,8 +274,7 @@ if(ENABLE_OSX_BUNDLE)
> else()
> install(TARGETS ${APP_NAME} RUNTIME DESTINATION ${BINDIR})
> install(FILES hatari-icon.bmp DESTINATION ${DATADIR})
> - file(GLOB TOS_IMG_FILE tos.img)
> if(TOS_IMG_FILE)
> - install(FILES tos.img DESTINATION ${DATADIR})
> + install(FILES ${TOS_IMG_FILE} DESTINATION ${DATADIR})
> endif(TOS_IMG_FILE)
> endif(ENABLE_OSX_BUNDLE)
>
> Could you please check whether that works on macOS, too?
Yes, it works.
With your patch it is possible to build Hatari on macOS using CMake with or without having the tos.img in the src directory.
And if the tos.img is in the src directory it is included in the built Hatari.app.
Thanks again for taking a look at this.
Regards,
Frank