Updated mac build.

This commit is contained in:
Armin Novak 2018-11-29 15:46:37 +01:00
parent 8c7f8eb395
commit c8938c357a
9 changed files with 33 additions and 23 deletions

View File

@ -15,18 +15,20 @@ find_library(FOUNDATION_LIBRARY Foundation)
find_library(COCOA_LIBRARY Cocoa)
find_library(APPKIT_LIBRARY AppKit)
find_library(IOKIT_LIBRARY IOKit)
find_library(COREGRAPHICS_LIBRARY CoreGraphics)
mark_as_advanced(COCOA_LIBRARY FOUNDATION_LIBRARY APPKIT_LIBRARY)
set(EXTRA_LIBS ${COCOA_LIBRARY} ${FOUNDATION_LIBRARY} ${APPKIT_LIBRARY} ${IOKIT_LIBRARY})
string(TIMESTAMP VERSION_YEAR "%Y")
set(MACOSX_BUNDLE_INFO_STRING "${MODULE_OUTPUT_NAME}")
set(MACOSX_BUNDLE_GUI_IDENTIFIER "com.freerdp.mac")
set(MACOSX_BUNDLE_BUNDLE_IDENTIFIER "FreeRDP-library.Mac")
set(MACOSX_BUNDLE_LONG_VERSION_STRING "MacFreeRDP library Version 1.1")
set(MACOSX_BUNDLE_LONG_VERSION_STRING "MacFreeRDP library Version ${FREERDP_VERSION}")
set(MACOSX_BUNDLE_BUNDLE_NAME "${MODULE_OUTPUT_NAME}")
set(MACOSX_BUNDLE_SHORT_VERSION_STRING 1.1.0)
set(MACOSX_BUNDLE_BUNDLE_VERSION 1.1.0)
set(MACOSX_BUNDLE_COPYRIGHT "Copyright 2013. All Rights Reserved.")
set(MACOSX_BUNDLE_SHORT_VERSION_STRING ${FREERDP_VERSION})
set(MACOSX_BUNDLE_BUNDLE_VERSION ${FREERDP_VERSION})
set(MACOSX_BUNDLE_COPYRIGHT "Copyright 2013-${VERSION_YEAR}. All Rights Reserved.")
set(${MODULE_PREFIX}_XIBS PasswordDialog.xib)
@ -79,9 +81,9 @@ set_target_properties(${MODULE_NAME} PROPERTIES
set_target_properties(${MODULE_NAME} PROPERTIES
FRAMEWORK TRUE
MACOSX_FRAMEWORK_IDENTIFIER com.awakecoding.${MODULE_NAME}
FRAMEWORK_VERSION 1.1.0
MACOSX_FRAMEWORK_SHORT_VERSION_STRING 1.1.0
MACOSX_FRAMEWORK_BUNDLE_BUNDLE_VERSION 1.1.0
FRAMEWORK_VERSION ${FREERDP_VERSION}
MACOSX_FRAMEWORK_SHORT_VERSION_STRING ${FREERDP_VERSION}
MACOSX_FRAMEWORK_BUNDLE_BUNDLE_VERSION ${FREERDP_VERSION}
INSTALL_NAME_DIR "@executable_path/../Frameworks"
MACOSX_BUNDLE_INFO_PLIST ${CMAKE_CURRENT_BINARY_DIR}/Info.plist)

View File

@ -24,4 +24,4 @@ enum APPLE_KEYBOARD_TYPE
APPLE_KEYBOARD_TYPE_JIS
};
enum APPLE_KEYBOARD_TYPE mac_detect_keyboard_type();
enum APPLE_KEYBOARD_TYPE mac_detect_keyboard_type(void);

View File

@ -21,7 +21,8 @@
#include <CoreFoundation/CoreFoundation.h>
#include <IOKit/hid/IOHIDLib.h>
#include <IOKit/IOKitLib.h>
#include <IOKit/hid/IOHIDManager.h>
struct _APPLE_KEYBOARD_DESC
{
@ -158,7 +159,7 @@ static enum APPLE_KEYBOARD_TYPE mac_identify_keyboard_type(uint32_t vendorID,
return type;
}
enum APPLE_KEYBOARD_TYPE mac_detect_keyboard_type()
enum APPLE_KEYBOARD_TYPE mac_detect_keyboard_type(void)
{
CFSetRef deviceCFSetRef = NULL;
IOHIDDeviceRef inIOHIDDeviceRef = NULL;

View File

@ -26,6 +26,8 @@
#import "mf_client.h"
#import "Keyboard.h"
#import <CoreGraphics/CoreGraphics.h>
@interface MRDPView : NSView
{
mfContext* mfc;

View File

@ -44,6 +44,8 @@
#import "freerdp/client/cmdline.h"
#import "freerdp/log.h"
#import <CoreGraphics/CoreGraphics.h>
#define TAG CLIENT_TAG("mac")
static BOOL mf_Pointer_New(rdpContext* context, rdpPointer* pointer);
@ -60,7 +62,7 @@ static BOOL mac_desktop_resize(rdpContext* context);
static void update_activity_cb(freerdp* instance);
static void input_activity_cb(freerdp* instance);
static DWORD mac_client_thread(void* param);
static DWORD WINAPI mac_client_thread(void* param);
@implementation MRDPView
@ -106,7 +108,7 @@ static DWORD mac_client_thread(void* param);
return 0;
}
static DWORD mac_client_update_thread(void* param)
static DWORD WINAPI mac_client_update_thread(void* param)
{
int status;
wMessage message;
@ -164,7 +166,7 @@ static DWORD WINAPI mac_client_input_thread(LPVOID param)
return 0;
}
DWORD mac_client_thread(void* param)
DWORD WINAPI mac_client_thread(void* param)
{
@autoreleasepool
{

View File

@ -20,6 +20,8 @@
#import "PasswordDialog.h"
#import <freerdp/client/cmdline.h>
#import <CoreGraphics/CoreGraphics.h>
@interface PasswordDialog()
@property BOOL modalCode;

View File

@ -10,15 +10,16 @@ find_library(FOUNDATION_LIBRARY Foundation)
find_library(COCOA_LIBRARY Cocoa)
find_library(APPKIT_LIBRARY AppKit)
string(TIMESTAMP VERSION_YEAR "%Y")
set(MACOSX_BUNDLE_INFO_STRING "MacFreeRDP")
set(MACOSX_BUNDLE_ICON_FILE "FreeRDP.icns")
set(MACOSX_BUNDLE_GUI_IDENTIFIER "com.freerdp.mac")
set(MACOSX_BUNDLE_BUNDLE_IDENTIFIER "FreeRDP-client.Mac")
set(MACOSX_BUNDLE_LONG_VERSION_STRING "MacFreeRDP Client Version 1.1.0")
set(MACOSX_BUNDLE_LONG_VERSION_STRING "MacFreeRDP Client Version ${FREERDP_VERSION}")
set(MACOSX_BUNDLE_BUNDLE_NAME "MacFreeRDP")
set(MACOSX_BUNDLE_SHORT_VERSION_STRING 1.1.0)
set(MACOSX_BUNDLE_BUNDLE_VERSION 1.1.0)
set(MACOSX_BUNDLE_COPYRIGHT "Copyright 2013. All Rights Reserved.")
set(MACOSX_BUNDLE_SHORT_VERSION_STRING ${FREERDP_VERSION})
set(MACOSX_BUNDLE_BUNDLE_VERSION ${FREERDP_VERSION})
set(MACOSX_BUNDLE_COPYRIGHT "Copyright 2013-${VERSION_YEAR}. All Rights Reserved.")
set(MACOSX_BUNDLE_NSMAIN_NIB_FILE "MainMenu")
set(MACOSX_BUNDLE_NSPRINCIPAL_CLASS "NSApplication")

View File

@ -30,13 +30,13 @@
* Client Interface
*/
static BOOL mfreerdp_client_global_init()
static BOOL mfreerdp_client_global_init(void)
{
freerdp_handle_signals();
return TRUE;
}
static void mfreerdp_client_global_uninit()
static void mfreerdp_client_global_uninit(void)
{
}
@ -98,7 +98,6 @@ static BOOL mfreerdp_client_new(freerdp* instance, rdpContext* context)
static void mfreerdp_client_free(freerdp* instance, rdpContext* context)
{
mfContext* mfc;
rdpSettings* settings;
if (!instance || !context)
return;
@ -110,7 +109,7 @@ static void mfreerdp_client_free(freerdp* instance, rdpContext* context)
static void freerdp_client_mouse_event(rdpContext* cfc, DWORD flags, int x,
int y)
{
int width, height;
UINT32 width, height;
rdpInput* input = cfc->instance->input;
rdpSettings* settings = cfc->instance->settings;
width = settings->DesktopWidth;
@ -119,7 +118,8 @@ static void freerdp_client_mouse_event(rdpContext* cfc, DWORD flags, int x,
if (x < 0)
x = 0;
x = width - 1;
if (x >= width)
x = width - 1;
if (y < 0)
y = 0;

View File

@ -28,7 +28,7 @@ typedef struct mf_context mfContext;
#include "MRDPView.h"
#include "Keyboard.h"
#include <AppKit/NSView.h>
#include <CoreGraphics/CoreGraphics.h>
struct mf_context
{