LaunchAPPLServer: use navservices on 68K

This commit is contained in:
Wolfgang Thaller 2019-01-24 17:39:10 +01:00
parent 693abc1998
commit c915b2d011
3 changed files with 16 additions and 14 deletions

View File

@ -84,6 +84,9 @@ endif()
if(CMAKE_SYSTEM_NAME MATCHES RetroPPC)
target_link_libraries(LaunchAPPLServer -lOpenTransportAppPPC -lOpenTransportLib -lOpenTptInternetLib -lNavigationLib)
endif()
if(CMAKE_SYSTEM_NAME MATCHES Retro68)
target_link_libraries(LaunchAPPLServer -lNavigation.far)
endif()
if(FALSE)
add_application(tcptest

View File

@ -14,5 +14,9 @@ SEGMENT Launcher
*/AppLauncher.*
*/ToolLauncher.*
SEGMENT Preferences
*/Preferences.*
*/libNavigation.far.a:*
SEGMENT libstdc++
*/libstdc++.a:*

View File

@ -70,9 +70,6 @@ static void ConvertToPathName(const FSSpec& spec)
WritePrefs();
}
#if !TARGET_CPU_68K
// TODO: need to properly link to Navigation.far.o on 68K
static pascal void NavEventProc(NavEventCallbackMessage callBackSelector, NavCBRecPtr callBackParms, void *callBackUD)
{
if(callBackSelector == kNavCBEvent)
@ -125,7 +122,6 @@ static bool ChooseSharedDirectoryNav(FSSpec& spec)
}
return success;
}
#endif
#if !TARGET_API_MAC_CARBON
static bool choosePressed = false;
@ -223,17 +219,16 @@ void ChooseSharedDirectory()
bool ok = false;
#if TARGET_API_MAC_CARBON
ok = ChooseSharedDirectoryNav(spec);
#else
#if !TARGET_CPU_68K
if(NavServicesAvailable())
ok = ChooseSharedDirectoryNav(spec);
#else
#if TARGET_CPU_68K
if(!hasSys7StdFile)
ok = ChooseSharedDirectory6(spec);
else
#endif
#if !TARGET_API_MAC_CARBON
if(NavServicesAvailable())
#endif
ok = ChooseSharedDirectoryNav(spec);
#if !TARGET_API_MAC_CARBON
else
ok = ChooseSharedDirectory7(spec);
#endif