From 5f303ba4c7f924023209233f6cb8a0cc7005ad0e Mon Sep 17 00:00:00 2001 From: dob205 Date: Fri, 19 Nov 2021 17:38:42 +0100 Subject: [PATCH 1/4] Cleaning up some things k --- src/CMakeLists.txt | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 0b1ec7712..a1566ac07 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -32,17 +32,11 @@ set_source_files_properties(${APP_ICON_MACOSX} PROPERTIES MACOSX_PACKAGE_LOCATION "Resources") endif() -#Adding the macOS glue for ROM paths -set(MAC_GLUE) -if (APPLE) - set(MAC_GLUE ${CMAKE_CURRENT_SOURCE_DIR}/mac/macOSXGlue.m) -endif() - # WIN32 marks us as a GUI app on Windows # MACOSX_BUNDLE prepares a macOS application bundle including with the app icon add_executable(86Box WIN32 MACOSX_BUNDLE 86box.c config.c log.c random.c timer.c io.c acpi.c apm.c dma.c ddma.c nmi.c pic.c pit.c port_6x.c port_92.c ppi.c pci.c mca.c usb.c - device.c nvr.c nvr_at.c nvr_ps2.c ${APP_ICON_MACOSX} ${MAC_GLUE}) + device.c nvr.c nvr_at.c nvr_ps2.c ${APP_ICON_MACOSX}) if(APPLE) target_link_libraries(86Box "-framework AppKit") @@ -95,8 +89,6 @@ endif() #some macOS specific configuration steps if(APPLE) - find_library(COCOA_LIBRARY Cocoa) - target_link_libraries (86Box ${COCOA_LIBRARY} ) # Force using the newest library if it's installed by homebrew set(CMAKE_FIND_FRAMEWORK LAST) @@ -113,10 +105,10 @@ if(APPLE) set(MACOSX_BUNDLE_BUNDLE_NAME 86Box) set(MACOSX_BUNDLE_BUNDLE_VERSION 3.0) set(MACOSX_BUNDLE_SHORT_VERSION_STRING "3.0") - set(MACOSX_BUNDLE_LONG_VERSION_STRING "3.0.0") + set(MACOSX_BUNDLE_LONG_VERSION_STRING "3.0.{$EMU_BUILD_NUM}") set(MACOSX_BUNDLE_ICON_FILE 86Box.icns) set(MACOSX_BUNDLE_INFO_STRING "A emulator of old computers") - set(MACOSX_BUNDLE_COPYRIGHT "© 2007-2021 Sarah Walker, Miran Grča, Fred N. van Kempen (waltje), SA1988, MoochMcGee, reenigne, leilei, JohnElliott, greatpsycho, and others") + set(MACOSX_BUNDLE_COPYRIGHT "© 2007-{$EMU_COPYRIGHT_YEAR} 86Box contributors") # preparing the code signing for easier distribution, Apple dev certificate needed at one point From 6f9d4e5bb37f33f2a9eabfa57ceb9adfaefd994e Mon Sep 17 00:00:00 2001 From: dob205 Date: Fri, 19 Nov 2021 17:40:28 +0100 Subject: [PATCH 2/4] slight fixes for that file Makes the macOS bundle display the proper copyright and version numbers --- src/CMakeLists.txt | 28 +++++++++++++++------------- 1 file changed, 15 insertions(+), 13 deletions(-) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index a1566ac07..52d2390cd 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -87,6 +87,17 @@ if(MINGW) set(CMAKE_FIND_LIBRARY_SUFFIXES ".a" ".dll.a") endif() +# Variables introduced by richardg867 for versioning stuff +if(NOT CMAKE_PROJECT_VERSION_PATCH) + set(CMAKE_PROJECT_VERSION_PATCH 0) +endif() +if(NOT EMU_BUILD_NUM) + set(EMU_BUILD_NUM 0) +endif() +if(NOT EMU_COPYRIGHT_YEAR) + set(EMU_COPYRIGHT_YEAR 2021) +endif() + #some macOS specific configuration steps if(APPLE) # Force using the newest library if it's installed by homebrew @@ -96,7 +107,7 @@ if(APPLE) # prepare stuff for macOS app bundles set(CMAKE_MACOSX_BUNDLE 1) - # setting our compilation target to macOS Mojave (macOS version 10.14), can be eventually changed to macOS 10.13 High Sierra + # setting our compilation target to macOS 10.13 High Sierra set(CMAKE_OSX_DEPLOYMENT_TARGET "10.13") # set the Info.plist properly @@ -104,11 +115,11 @@ if(APPLE) set(MACOSX_BUNDLE_GUI_IDENTIFIER net.86Box.86Box) set(MACOSX_BUNDLE_BUNDLE_NAME 86Box) set(MACOSX_BUNDLE_BUNDLE_VERSION 3.0) - set(MACOSX_BUNDLE_SHORT_VERSION_STRING "3.0") - set(MACOSX_BUNDLE_LONG_VERSION_STRING "3.0.{$EMU_BUILD_NUM}") + set(MACOSX_BUNDLE_SHORT_VERSION_STRING "3.0.${EMU_BUILD_NUM}") + set(MACOSX_BUNDLE_LONG_VERSION_STRING "3.0.${EMU_BUILD_NUM}") set(MACOSX_BUNDLE_ICON_FILE 86Box.icns) set(MACOSX_BUNDLE_INFO_STRING "A emulator of old computers") - set(MACOSX_BUNDLE_COPYRIGHT "© 2007-{$EMU_COPYRIGHT_YEAR} 86Box contributors") + set(MACOSX_BUNDLE_COPYRIGHT "© 2007-${EMU_COPYRIGHT_YEAR} 86Box contributors") # preparing the code signing for easier distribution, Apple dev certificate needed at one point @@ -146,15 +157,6 @@ find_package(PNG REQUIRED) include_directories(${PNG_INCLUDE_DIRS}) target_link_libraries(86Box PNG::PNG) -if(NOT CMAKE_PROJECT_VERSION_PATCH) - set(CMAKE_PROJECT_VERSION_PATCH 0) -endif() -if(NOT EMU_BUILD_NUM) - set(EMU_BUILD_NUM 0) -endif() -if(NOT EMU_COPYRIGHT_YEAR) - set(EMU_COPYRIGHT_YEAR 2021) -endif() configure_file(include/86box/version.h.in include/86box/version.h @ONLY) include_directories(${CMAKE_CURRENT_BINARY_DIR}/include) From 5357cea1bc5fdcef5604b0237210a04fc0a5a4da Mon Sep 17 00:00:00 2001 From: dob205 Date: Fri, 19 Nov 2021 17:42:48 +0100 Subject: [PATCH 3/4] Showing the build number in the user viewable bundle version --- src/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 52d2390cd..7e9e24e89 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -114,7 +114,7 @@ if(APPLE) set_target_properties(86Box PROPERTIES MACOSX_BUNDLE_INFO_PLIST ${CMAKE_CURRENT_SOURCE_DIR}/mac/Info.plist.in) set(MACOSX_BUNDLE_GUI_IDENTIFIER net.86Box.86Box) set(MACOSX_BUNDLE_BUNDLE_NAME 86Box) - set(MACOSX_BUNDLE_BUNDLE_VERSION 3.0) + set(MACOSX_BUNDLE_BUNDLE_VERSION 3.0.${EMU_BUILD_NUM}) set(MACOSX_BUNDLE_SHORT_VERSION_STRING "3.0.${EMU_BUILD_NUM}") set(MACOSX_BUNDLE_LONG_VERSION_STRING "3.0.${EMU_BUILD_NUM}") set(MACOSX_BUNDLE_ICON_FILE 86Box.icns) From 6bcc8c6ca041d881fb4f1f5051600c9430f798f9 Mon Sep 17 00:00:00 2001 From: dob205 Date: Fri, 19 Nov 2021 18:04:30 +0100 Subject: [PATCH 4/4] Cleaning up things --- src/86box.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/86box.c b/src/86box.c index bbb97368c..6e90598dd 100644 --- a/src/86box.c +++ b/src/86box.c @@ -18,6 +18,7 @@ * Copyright 2016-2020 Miran Grca. * Copyright 2017-2020 Fred N. van Kempen. * Copyright 2021 Laci bá' + * Copyright 2021 dob205 */ #include #include @@ -418,9 +419,6 @@ pc_init(int argc, char *argv[]) */ plat_getcwd(usr_path, sizeof(usr_path) - 1); plat_getcwd(rom_path, sizeof(rom_path) - 1); - - printf("JV:usr_path %s\n",usr_path); - printf("JV:rom_path %s\n",usr_path); memset(path, 0x00, sizeof(path)); memset(path2, 0x00, sizeof(path));