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: Thomas Huth <th.huth@xxxxxxxxx>
- Date: Sun, 29 Jun 2025 11:57:39 +0000
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=posteo.de; s=2017; t=1751198262; bh=yFoaqrdiTztwVNfdmZQnxQkuOV91+DfwSetLB6Nxcjs=; h=Date:From:To:Subject:Message-ID:MIME-Version:Content-Type: Content-Transfer-Encoding:From; b=FbKOZdmbQTpeg+tHc9tQcpGx3nmkoBo2ArTnRwWxDsBWCl6Pz5ZvxTUInEqxVU5Ff J9nmIe7DAaKw1Oac0HPdkSlGrPvELQDkybrXmr5HbNbTQMBX/QlJttwGsG4oGIa788 uz0/+sADaSyBPZ4IULeXa6Efd9x5l6BXpc0dp3hOSCYyeTmFpf89fJ9q2n6AXZX9nY vHbVtUx112XzMhOH9+zEcSiBB9l/UCb7Mt1Ia4Zh5Acbmn89qQSUju1o5jazirBGgh vVqZ7tkrHjMJrlBxJc4oV0n+bygiom0vaogIqlIojijjmwhqRPG3+k2nchXfyeR4/D jOAbB6hf7faAA==
Am Fri, 27 Jun 2025 20:08:32 +0200
schrieb Frank Danapfel <frank.danapfel@xxxxxxxxxxxxxx>:
> Hi all,
>
> I’ve now managed to figure this out myself.
>
> All that is needed is one small change in the src/CMakeLists.txt file to include tos.img in the list of files that should be included in the app bundle:
>
> --- CMakeLists.txt.orig 2025-06-27 19:52:06
> +++ CMakeLists.txt 2025-06-27 19:52:26
> @@ -25,7 +25,7 @@
> 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 tos.img gui-osx/stdisk.png gui-osx/en.lproj gui-osx/fr.lproj)
> 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 )
>
> And the tos.img file has to be copied to the main src directory from which Hatari is built.
>
> Maybe somebody can include this change in the official repo, so that others who want to built Hatari on macOS themselves can also get a version of the Hatari.app that inclused the tos.img.
Hi Frank,
since tos.img is optional, I think we'd rather need something like this:
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?
Thomas