mirror of
https://github.com/autc04/Retro68.git
synced 2025-02-05 19:32:29 +00:00
LaunchAPPLServer: check for "optional" headers (for MultiversalInterfaces)
This commit is contained in:
parent
878a21d741
commit
59e1127b5c
@ -1,16 +1,24 @@
|
||||
include(CheckIncludeFile)
|
||||
|
||||
CHECK_INCLUDE_FILE(Navigation.h HAVE_NAVIGATION_H)
|
||||
CHECK_INCLUDE_FILE(OpenTransport.h HAVE_OPENTRANSPORT_H)
|
||||
CHECK_INCLUDE_FILE(MacTCP.h HAVE_MACTCP_H)
|
||||
|
||||
set(HAVE_OPENTRANSPORT NO)
|
||||
if(CMAKE_SYSTEM_NAME MATCHES RetroPPC)
|
||||
find_library(OPENTRANSPORT_LIBRARY NAMES libOpenTransportLib.a)
|
||||
if(OPENTRANSPORT_LIBRARY)
|
||||
if(HAVE_OPENTRANSPORT_H)
|
||||
if(CMAKE_SYSTEM_NAME MATCHES RetroPPC)
|
||||
find_library(OPENTRANSPORT_LIBRARY NAMES libOpenTransportLib.a)
|
||||
if(OPENTRANSPORT_LIBRARY)
|
||||
set(HAVE_OPENTRANSPORT YES)
|
||||
endif()
|
||||
elseif(CMAKE_SYSTEM_NAME MATCHES Retro68)
|
||||
find_library(OPENTRANSPORT_LIBRARY NAMES libOpenTransport.a)
|
||||
if(OPENTRANSPORT_LIBRARY)
|
||||
set(HAVE_OPENTRANSPORT YES)
|
||||
endif()
|
||||
elseif(CMAKE_SYSTEM_NAME MATCHES RetroCarbon)
|
||||
set(HAVE_OPENTRANSPORT YES)
|
||||
endif()
|
||||
elseif(CMAKE_SYSTEM_NAME MATCHES Retro68)
|
||||
find_library(OPENTRANSPORT_LIBRARY NAMES libOpenTransport.a)
|
||||
if(OPENTRANSPORT_LIBRARY)
|
||||
set(HAVE_OPENTRANSPORT YES)
|
||||
endif()
|
||||
elseif(CMAKE_SYSTEM_NAME MATCHES RetroCarbon)
|
||||
set(HAVE_OPENTRANSPORT YES)
|
||||
endif()
|
||||
|
||||
set(CONNECTION_SOURCES
|
||||
@ -27,12 +35,16 @@ else()
|
||||
SerialConnectionProvider.cc
|
||||
MacSerialStream.h
|
||||
MacSerialStream.cc
|
||||
|
||||
MacTCPStream.h
|
||||
MacTCPStream.cc
|
||||
TCPConnectionProvider.h
|
||||
TCPConnectionProvider.cc
|
||||
)
|
||||
|
||||
if(HAVE_MACTCP_H)
|
||||
list(APPEND CONNECTION_SOURCES
|
||||
MacTCPStream.h
|
||||
MacTCPStream.cc
|
||||
TCPConnectionProvider.h
|
||||
TCPConnectionProvider.cc
|
||||
)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
option(LAUNCHAPPLSERVER_DEBUG_CONSOLE "Add a debug console to LaunchAPPLServer" FALSE)
|
||||
@ -80,6 +92,12 @@ endif()
|
||||
if(HAVE_OPENTRANSPORT)
|
||||
target_compile_definitions(LaunchAPPLServer PRIVATE HAVE_OPENTRANSPORT)
|
||||
endif()
|
||||
if(HAVE_NAVIGATION_H)
|
||||
target_compile_definitions(LaunchAPPLServer PRIVATE HAVE_NAVIGATION)
|
||||
endif()
|
||||
if(HAVE_MACTCP_H AND NOT CMAKE_SYSTEM_NAME MATCHES RetroCarbon)
|
||||
target_compile_definitions(LaunchAPPLServer PRIVATE HAVE_MACTCP)
|
||||
endif()
|
||||
|
||||
target_link_libraries(LaunchAPPLServer LaunchAPPLCommon)
|
||||
set_target_properties(LaunchAPPLServer PROPERTIES
|
||||
|
@ -44,6 +44,8 @@
|
||||
#include "ConnectionProvider.h"
|
||||
#if !TARGET_API_MAC_CARBON
|
||||
#include "SerialConnectionProvider.h"
|
||||
#endif
|
||||
#if HAVE_MACTCP
|
||||
#include "TCPConnectionProvider.h"
|
||||
#endif
|
||||
#ifdef HAVE_OPENTRANSPORT
|
||||
@ -573,9 +575,11 @@ void ConnectionChanged()
|
||||
switch(gPrefs.port)
|
||||
{
|
||||
#if !TARGET_API_MAC_CARBON
|
||||
#ifdef HAVE_MACTCP
|
||||
case Port::macTCP:
|
||||
connection = std::make_unique<TCPConnectionProvider>(statusDisplay.get());
|
||||
break;
|
||||
#endif
|
||||
case Port::modemPort:
|
||||
connection = std::make_unique<SerialConnectionProvider>(0, gPrefs.baud, statusDisplay.get());
|
||||
break;
|
||||
|
@ -140,9 +140,9 @@ resource 'STR#' (129, purgeable) {
|
||||
};
|
||||
|
||||
resource 'SIZE' (-1) {
|
||||
dontSaveScreen,
|
||||
reserved,
|
||||
acceptSuspendResumeEvents,
|
||||
enableOptionSwitch,
|
||||
reserved,
|
||||
canBackground,
|
||||
multiFinderAware,
|
||||
backgroundAndForeground,
|
||||
|
@ -18,7 +18,10 @@
|
||||
*/
|
||||
|
||||
#include "Preferences.h"
|
||||
|
||||
#ifdef HAVE_NAVIGATION
|
||||
#include <Navigation.h>
|
||||
#endif
|
||||
#include <StandardFile.h>
|
||||
#include <LowMem.h>
|
||||
#include <stdio.h>
|
||||
@ -70,6 +73,7 @@ static void ConvertToPathName(const FSSpec& spec)
|
||||
WritePrefs();
|
||||
}
|
||||
|
||||
#ifdef HAVE_NAVIGATION
|
||||
static pascal void NavEventProc(NavEventCallbackMessage callBackSelector, NavCBRecPtr callBackParms, void *callBackUD)
|
||||
{
|
||||
if(callBackSelector == kNavCBEvent)
|
||||
@ -122,6 +126,7 @@ static bool ChooseSharedDirectoryNav(FSSpec& spec)
|
||||
}
|
||||
return success;
|
||||
}
|
||||
#endif
|
||||
|
||||
#if !TARGET_API_MAC_CARBON
|
||||
static bool choosePressed = false;
|
||||
@ -240,6 +245,7 @@ void ChooseSharedDirectory()
|
||||
ok = ChooseSharedDirectory6(spec);
|
||||
else
|
||||
#endif
|
||||
#ifdef HAVE_NAVIGATION
|
||||
#if !TARGET_API_MAC_CARBON
|
||||
if(NavServicesAvailable())
|
||||
#endif
|
||||
@ -248,7 +254,9 @@ void ChooseSharedDirectory()
|
||||
else
|
||||
ok = ChooseSharedDirectory7(spec);
|
||||
#endif
|
||||
|
||||
#else
|
||||
ok = ChooseSharedDirectory7(spec);
|
||||
#endif
|
||||
if(ok)
|
||||
ConvertToPathName(spec);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user