Updated mac build.
This commit is contained in:
parent
8c7f8eb395
commit
c8938c357a
@ -15,18 +15,20 @@ find_library(FOUNDATION_LIBRARY Foundation)
|
|||||||
find_library(COCOA_LIBRARY Cocoa)
|
find_library(COCOA_LIBRARY Cocoa)
|
||||||
find_library(APPKIT_LIBRARY AppKit)
|
find_library(APPKIT_LIBRARY AppKit)
|
||||||
find_library(IOKIT_LIBRARY IOKit)
|
find_library(IOKIT_LIBRARY IOKit)
|
||||||
|
find_library(COREGRAPHICS_LIBRARY CoreGraphics)
|
||||||
|
|
||||||
mark_as_advanced(COCOA_LIBRARY FOUNDATION_LIBRARY APPKIT_LIBRARY)
|
mark_as_advanced(COCOA_LIBRARY FOUNDATION_LIBRARY APPKIT_LIBRARY)
|
||||||
set(EXTRA_LIBS ${COCOA_LIBRARY} ${FOUNDATION_LIBRARY} ${APPKIT_LIBRARY} ${IOKIT_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_INFO_STRING "${MODULE_OUTPUT_NAME}")
|
||||||
set(MACOSX_BUNDLE_GUI_IDENTIFIER "com.freerdp.mac")
|
set(MACOSX_BUNDLE_GUI_IDENTIFIER "com.freerdp.mac")
|
||||||
set(MACOSX_BUNDLE_BUNDLE_IDENTIFIER "FreeRDP-library.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_BUNDLE_NAME "${MODULE_OUTPUT_NAME}")
|
||||||
set(MACOSX_BUNDLE_SHORT_VERSION_STRING 1.1.0)
|
set(MACOSX_BUNDLE_SHORT_VERSION_STRING ${FREERDP_VERSION})
|
||||||
set(MACOSX_BUNDLE_BUNDLE_VERSION 1.1.0)
|
set(MACOSX_BUNDLE_BUNDLE_VERSION ${FREERDP_VERSION})
|
||||||
set(MACOSX_BUNDLE_COPYRIGHT "Copyright 2013. All Rights Reserved.")
|
set(MACOSX_BUNDLE_COPYRIGHT "Copyright 2013-${VERSION_YEAR}. All Rights Reserved.")
|
||||||
|
|
||||||
set(${MODULE_PREFIX}_XIBS PasswordDialog.xib)
|
set(${MODULE_PREFIX}_XIBS PasswordDialog.xib)
|
||||||
|
|
||||||
@ -79,9 +81,9 @@ set_target_properties(${MODULE_NAME} PROPERTIES
|
|||||||
set_target_properties(${MODULE_NAME} PROPERTIES
|
set_target_properties(${MODULE_NAME} PROPERTIES
|
||||||
FRAMEWORK TRUE
|
FRAMEWORK TRUE
|
||||||
MACOSX_FRAMEWORK_IDENTIFIER com.awakecoding.${MODULE_NAME}
|
MACOSX_FRAMEWORK_IDENTIFIER com.awakecoding.${MODULE_NAME}
|
||||||
FRAMEWORK_VERSION 1.1.0
|
FRAMEWORK_VERSION ${FREERDP_VERSION}
|
||||||
MACOSX_FRAMEWORK_SHORT_VERSION_STRING 1.1.0
|
MACOSX_FRAMEWORK_SHORT_VERSION_STRING ${FREERDP_VERSION}
|
||||||
MACOSX_FRAMEWORK_BUNDLE_BUNDLE_VERSION 1.1.0
|
MACOSX_FRAMEWORK_BUNDLE_BUNDLE_VERSION ${FREERDP_VERSION}
|
||||||
INSTALL_NAME_DIR "@executable_path/../Frameworks"
|
INSTALL_NAME_DIR "@executable_path/../Frameworks"
|
||||||
MACOSX_BUNDLE_INFO_PLIST ${CMAKE_CURRENT_BINARY_DIR}/Info.plist)
|
MACOSX_BUNDLE_INFO_PLIST ${CMAKE_CURRENT_BINARY_DIR}/Info.plist)
|
||||||
|
|
||||||
|
@ -24,4 +24,4 @@ enum APPLE_KEYBOARD_TYPE
|
|||||||
APPLE_KEYBOARD_TYPE_JIS
|
APPLE_KEYBOARD_TYPE_JIS
|
||||||
};
|
};
|
||||||
|
|
||||||
enum APPLE_KEYBOARD_TYPE mac_detect_keyboard_type();
|
enum APPLE_KEYBOARD_TYPE mac_detect_keyboard_type(void);
|
||||||
|
@ -21,7 +21,8 @@
|
|||||||
|
|
||||||
#include <CoreFoundation/CoreFoundation.h>
|
#include <CoreFoundation/CoreFoundation.h>
|
||||||
|
|
||||||
#include <IOKit/hid/IOHIDLib.h>
|
#include <IOKit/IOKitLib.h>
|
||||||
|
#include <IOKit/hid/IOHIDManager.h>
|
||||||
|
|
||||||
struct _APPLE_KEYBOARD_DESC
|
struct _APPLE_KEYBOARD_DESC
|
||||||
{
|
{
|
||||||
@ -158,7 +159,7 @@ static enum APPLE_KEYBOARD_TYPE mac_identify_keyboard_type(uint32_t vendorID,
|
|||||||
return type;
|
return type;
|
||||||
}
|
}
|
||||||
|
|
||||||
enum APPLE_KEYBOARD_TYPE mac_detect_keyboard_type()
|
enum APPLE_KEYBOARD_TYPE mac_detect_keyboard_type(void)
|
||||||
{
|
{
|
||||||
CFSetRef deviceCFSetRef = NULL;
|
CFSetRef deviceCFSetRef = NULL;
|
||||||
IOHIDDeviceRef inIOHIDDeviceRef = NULL;
|
IOHIDDeviceRef inIOHIDDeviceRef = NULL;
|
||||||
|
@ -26,6 +26,8 @@
|
|||||||
#import "mf_client.h"
|
#import "mf_client.h"
|
||||||
#import "Keyboard.h"
|
#import "Keyboard.h"
|
||||||
|
|
||||||
|
#import <CoreGraphics/CoreGraphics.h>
|
||||||
|
|
||||||
@interface MRDPView : NSView
|
@interface MRDPView : NSView
|
||||||
{
|
{
|
||||||
mfContext* mfc;
|
mfContext* mfc;
|
||||||
|
@ -44,6 +44,8 @@
|
|||||||
#import "freerdp/client/cmdline.h"
|
#import "freerdp/client/cmdline.h"
|
||||||
#import "freerdp/log.h"
|
#import "freerdp/log.h"
|
||||||
|
|
||||||
|
#import <CoreGraphics/CoreGraphics.h>
|
||||||
|
|
||||||
#define TAG CLIENT_TAG("mac")
|
#define TAG CLIENT_TAG("mac")
|
||||||
|
|
||||||
static BOOL mf_Pointer_New(rdpContext* context, rdpPointer* pointer);
|
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 update_activity_cb(freerdp* instance);
|
||||||
static void input_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
|
@implementation MRDPView
|
||||||
|
|
||||||
@ -106,7 +108,7 @@ static DWORD mac_client_thread(void* param);
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static DWORD mac_client_update_thread(void* param)
|
static DWORD WINAPI mac_client_update_thread(void* param)
|
||||||
{
|
{
|
||||||
int status;
|
int status;
|
||||||
wMessage message;
|
wMessage message;
|
||||||
@ -164,7 +166,7 @@ static DWORD WINAPI mac_client_input_thread(LPVOID param)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
DWORD mac_client_thread(void* param)
|
DWORD WINAPI mac_client_thread(void* param)
|
||||||
{
|
{
|
||||||
@autoreleasepool
|
@autoreleasepool
|
||||||
{
|
{
|
||||||
|
@ -20,6 +20,8 @@
|
|||||||
#import "PasswordDialog.h"
|
#import "PasswordDialog.h"
|
||||||
#import <freerdp/client/cmdline.h>
|
#import <freerdp/client/cmdline.h>
|
||||||
|
|
||||||
|
#import <CoreGraphics/CoreGraphics.h>
|
||||||
|
|
||||||
@interface PasswordDialog()
|
@interface PasswordDialog()
|
||||||
|
|
||||||
@property BOOL modalCode;
|
@property BOOL modalCode;
|
||||||
|
@ -10,15 +10,16 @@ find_library(FOUNDATION_LIBRARY Foundation)
|
|||||||
find_library(COCOA_LIBRARY Cocoa)
|
find_library(COCOA_LIBRARY Cocoa)
|
||||||
find_library(APPKIT_LIBRARY AppKit)
|
find_library(APPKIT_LIBRARY AppKit)
|
||||||
|
|
||||||
|
string(TIMESTAMP VERSION_YEAR "%Y")
|
||||||
set(MACOSX_BUNDLE_INFO_STRING "MacFreeRDP")
|
set(MACOSX_BUNDLE_INFO_STRING "MacFreeRDP")
|
||||||
set(MACOSX_BUNDLE_ICON_FILE "FreeRDP.icns")
|
set(MACOSX_BUNDLE_ICON_FILE "FreeRDP.icns")
|
||||||
set(MACOSX_BUNDLE_GUI_IDENTIFIER "com.freerdp.mac")
|
set(MACOSX_BUNDLE_GUI_IDENTIFIER "com.freerdp.mac")
|
||||||
set(MACOSX_BUNDLE_BUNDLE_IDENTIFIER "FreeRDP-client.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_BUNDLE_NAME "MacFreeRDP")
|
||||||
set(MACOSX_BUNDLE_SHORT_VERSION_STRING 1.1.0)
|
set(MACOSX_BUNDLE_SHORT_VERSION_STRING ${FREERDP_VERSION})
|
||||||
set(MACOSX_BUNDLE_BUNDLE_VERSION 1.1.0)
|
set(MACOSX_BUNDLE_BUNDLE_VERSION ${FREERDP_VERSION})
|
||||||
set(MACOSX_BUNDLE_COPYRIGHT "Copyright 2013. All Rights Reserved.")
|
set(MACOSX_BUNDLE_COPYRIGHT "Copyright 2013-${VERSION_YEAR}. All Rights Reserved.")
|
||||||
|
|
||||||
set(MACOSX_BUNDLE_NSMAIN_NIB_FILE "MainMenu")
|
set(MACOSX_BUNDLE_NSMAIN_NIB_FILE "MainMenu")
|
||||||
set(MACOSX_BUNDLE_NSPRINCIPAL_CLASS "NSApplication")
|
set(MACOSX_BUNDLE_NSPRINCIPAL_CLASS "NSApplication")
|
||||||
|
@ -30,13 +30,13 @@
|
|||||||
* Client Interface
|
* Client Interface
|
||||||
*/
|
*/
|
||||||
|
|
||||||
static BOOL mfreerdp_client_global_init()
|
static BOOL mfreerdp_client_global_init(void)
|
||||||
{
|
{
|
||||||
freerdp_handle_signals();
|
freerdp_handle_signals();
|
||||||
return TRUE;
|
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)
|
static void mfreerdp_client_free(freerdp* instance, rdpContext* context)
|
||||||
{
|
{
|
||||||
mfContext* mfc;
|
mfContext* mfc;
|
||||||
rdpSettings* settings;
|
|
||||||
|
|
||||||
if (!instance || !context)
|
if (!instance || !context)
|
||||||
return;
|
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,
|
static void freerdp_client_mouse_event(rdpContext* cfc, DWORD flags, int x,
|
||||||
int y)
|
int y)
|
||||||
{
|
{
|
||||||
int width, height;
|
UINT32 width, height;
|
||||||
rdpInput* input = cfc->instance->input;
|
rdpInput* input = cfc->instance->input;
|
||||||
rdpSettings* settings = cfc->instance->settings;
|
rdpSettings* settings = cfc->instance->settings;
|
||||||
width = settings->DesktopWidth;
|
width = settings->DesktopWidth;
|
||||||
@ -119,7 +118,8 @@ static void freerdp_client_mouse_event(rdpContext* cfc, DWORD flags, int x,
|
|||||||
if (x < 0)
|
if (x < 0)
|
||||||
x = 0;
|
x = 0;
|
||||||
|
|
||||||
x = width - 1;
|
if (x >= width)
|
||||||
|
x = width - 1;
|
||||||
|
|
||||||
if (y < 0)
|
if (y < 0)
|
||||||
y = 0;
|
y = 0;
|
||||||
|
@ -28,7 +28,7 @@ typedef struct mf_context mfContext;
|
|||||||
|
|
||||||
#include "MRDPView.h"
|
#include "MRDPView.h"
|
||||||
#include "Keyboard.h"
|
#include "Keyboard.h"
|
||||||
#include <AppKit/NSView.h>
|
#include <CoreGraphics/CoreGraphics.h>
|
||||||
|
|
||||||
struct mf_context
|
struct mf_context
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user