FreeRDP/client/Mac
2012-11-07 18:23:33 -05:00
..
.gitignore xfreerdp: fix compilation on Mac OS X 2012-10-09 13:04:41 -04:00
AppDelegate.h Adding cmake Xcode project generation. 2012-05-10 13:18:29 -07:00
AppDelegate.m macfreerdp: fix compilation 2012-10-09 13:38:42 -04:00
CMakeLists.txt cmake: replace FindOptionalPackage macros with FindFeature macros 2012-11-02 19:27:01 -04:00
Credits.rtf Adding cmake Xcode project generation. 2012-05-10 13:18:29 -07:00
Info.plist xfreerdp: fix compilation on Mac OS X 2012-10-09 13:04:41 -04:00
main.m Adding cmake Xcode project generation. 2012-05-10 13:18:29 -07:00
MainMenu.xib Adding cmake Xcode project generation. 2012-05-10 13:18:29 -07:00
MRDPCursor.h freerdp: change uint8, sint8, uint16, sint16 to BYTE, INT8, UINT16, INT16 2012-10-09 03:01:37 -04:00
MRDPCursor.m In MacFreerdpClient, added support for the following 2012-06-20 09:57:20 -07:00
MRDPRailView.h mfreerdp-server: initial commit 2012-10-31 23:04:31 -04:00
MRDPRailView.m mfreerdp-server: initial commit 2012-10-31 23:04:31 -04:00
MRDPRailWindow.h In MacFreerdpClient, added support for the following 2012-06-20 09:57:20 -07:00
MRDPRailWindow.m In MacFreerdpClient, added support for the following 2012-06-20 09:57:20 -07:00
MRDPView.h macfreerdp: fix Mac OS X build 2012-10-31 21:49:36 -04:00
MRDPView.m libfreerdp-core: rdpSettings refactoring (part 3) 2012-11-07 18:23:33 -05:00
MRDPWindow.h In MacFreerdpClient, added support for the following 2012-06-20 09:57:20 -07:00
MRDPWindow.m client/Mac: changes from LK2000 2012-08-02 10:04:44 -07: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