FreeRDP/client/Mac
2013-03-15 20:03:48 +01:00
..
.gitignore xfreerdp: fix compilation on Mac OS X 2012-10-09 13:04:41 -04:00
AppDelegate.h mfreerdp: fix headers 2013-02-21 23:42:36 -05:00
AppDelegate.m mfreerdp: fix headers 2013-02-21 23:52:51 -05:00
CMakeLists.txt mfreerdp: fix icon file 2013-03-11 00:35:15 -04:00
Credits.rtf Adding cmake Xcode project generation. 2012-05-10 13:18:29 -07:00
FreeRDP.icns mfreerdp: fix icon file 2013-03-11 00:35:15 -04:00
Info.plist mfreerdp: fix icon file 2013-03-11 00:35:15 -04:00
main.m mfreerdp: fix headers 2013-02-21 23:52:51 -05:00
MainMenu.xib MacFreeRDP: use CoreGraphics for drawing 2013-03-11 03:01:07 +01:00
MRDPCursor.h mfreerdp: code style cleanup 2013-03-11 12:14:44 -04:00
MRDPCursor.m mfreerdp: code style cleanup 2013-03-11 12:14:44 -04:00
MRDPRailView.h mfreerdp: fix headers 2013-02-21 23:42:36 -05:00
MRDPRailView.m Fixed formating build warnings (-Wformat) 2013-03-15 20:03:48 +01:00
MRDPRailWindow.h mfreerdp: fix headers 2013-02-21 23:42:36 -05:00
MRDPRailWindow.m mfreerdp: fix headers 2013-02-21 23:52:51 -05:00
MRDPView.h mfreerdp: fix pointer function declarations 2013-03-11 19:51:07 +01:00
MRDPView.m Fixed formating build warnings (-Wformat) 2013-03-15 20:03:48 +01:00
MRDPWindow.h mfreerdp: fix headers 2013-02-21 23:52:51 -05:00
MRDPWindow.m mfreerdp: fix headers 2013-02-21 23:52:51 -05:00
PasswordDialog.h mfreerdp: cleanup PasswordDialog 2013-03-11 20:19:18 +01:00
PasswordDialog.m mfreerdp: PasswordDialog should release it's resources 2013-03-11 20:35:43 +01:00
PasswordDialog.xib mfreerdp: cleanup PasswordDialog 2013-03-11 20:19:18 +01:00
README.txt mfreerdp-server: cleanup binaries 2012-10-31 23:30:52 -04:00

          
-------------------------------------------------------------------------
                      Building FreeRDP on Mac OS X
-------------------------------------------------------------------------

Platform: Lion with Xcode 4.3.2

------------------
 installing cmake
------------------

first install macports by googling for it, the run the following command
sudo port install cmake

----------------
 installing gcc 
----------------
Click on Xcode->Preferences->Downloads
Click on Components
Click on Install Command line tools

You will be prompted for your Apple Developer userid and password

----------------------------------------
 download FreeRDP source code using git
----------------------------------------

mkdir ~/projects/A8
cd ~/projects/A8
git clone git://github.com/FreeRDP/FreeRDP.git

------------------
 building FreeRDP
------------------

cd ~projects/A8/FreeRDP
cmake -DWITH_MACAUDIO=ON -DCMAKE_INSTALL_PREFIX="</path/to/your/staging/dir>"
make
make install

------------------------
 creating Xcode project
------------------------

Start xcode
Select 'Create a new xcode project'
In 'Choose a template for your new project', click on Mac OS X -> application
Click on 'Cocoa Application'
Click on next
I used the following:
Product Name: Mac
Company Identifier: com.freerdp
Check 'Automatic Reference Counting'
Create the project in your directory of choice

-------------------------------
 Adding files to your projects
-------------------------------

Add the following files to your project:

cd ~/projects/A8/FreeRDP/client/Mac/MRDPCursor.h
cd ~/projects/A8/FreeRDP/client/Mac/MRDPCursor.m
cd ~/projects/A8/FreeRDP/client/Mac/MRDPView.h
cd ~/projects/A8/FreeRDP/client/Mac/MRDPView.m

This is what your AppDelegate.h file should like like

#import <Cocoa/Cocoa.h>
#import "MRDPView.h"

@interface AppDelegate : NSObject <NSApplicationDelegate>

@property (assign) IBOutlet NSWindow *window;
@property (assign) IBOutlet MRDPView *mrdpView;

int rdp_connect();

@end

This is what your AppDelegate.m file should like like

#import "AppDelegate.h"

@implementation AppDelegate

@synthesize window = _window;
@synthesize mrdpView;

- (void)applicationDidFinishLaunching:(NSNotification *)aNotification
{
    rdp_connect();
}

- (void) applicationWillTerminate:(NSNotification *)notification
{
    [mrdpView releaseResources];
}

@end

----------------------------------
 Modifying your MainMenu.xib file
----------------------------------

In your project select MainMenu.xib and drag a NSView  object into the main window
Name the class MRDPView
In Interface Builder, select the Application Delegate and tie the mrdpview outlet to the NSView 
Set the default size of the main window to 1024x768. This is FreeRDP's default resolution

----------------------------
 Configuring build settings
----------------------------

In Project Navigator, click on Mac
Click on Targets -> Mac
Click on Build Phases
Click on 'Link Binary With Libraries' and click on the + button, then click on the 'Add Other' button to add the following dynamic libraries
~/projects/A8/FreeRDP/libfreerdp-core/libfreerdp-core.dylib
~/projects/A8/FreeRDP/libfreerdp-channels/libfreerdp-channels.dylilb
~/projects/A8/FreeRDP/libfreerdp-utils/libfreerdp-utils.dylib
~/projects/A8/FreeRDP/libfreerdp-codec/libfreerdp-codec.dylib
~/projects/A8/FreeRDP/libfreerdp-cache/libfreerdp-cache.dylib
~/projects/A8/FreeRDP/libfreerdp-gdi/libfreerdp-gdi.dylib

Click on 'Build Settings'
In 'Search Paths -> Library Search Paths' set the following 
    Header Search Path Debug:    ~/projects/A8/FreeRDP/include
    Header Search Path Release:  ~/projects/A8/FreeRDP/include

TODO: in build settings, set strip build product to yes when done debugging

---------------------------
 To deploy the application
---------------------------

in xcode, click on Product->Archive
Click on Distribute button
Select Export As -> application