User Tools

Site Tools


en:tutorials:orx:mac:xcode4-consoleless-resources

This is an old revision of the document!


Compiling and Building ORX

Orx project uses premake. If you cannot find project files for your favorite IDE you may be able to generate these files with premake. You can find premake in /extern/premake subdirectory of orx project tree.

Console-less Application on OS X

OS X application bundle must be built to run in console-less mode. Application bundle is a directory with .app extension. Here is a directory structure that worked for me:

Sample.app (directory content)
Contents\
Contents\Info.plist
Contents\MacOS\Sample  (executable file)
Contents\MacOS\Sample.ini (orx INI file)
Contents\MacOS\liborxd.dylib (orx dll)
Contents\MacOS\resources\  (app specific resources directory, specified in INI)

You don't have to start from scratch. Simply create a Cocoa application from Xcode. Take its Info.plist file content and modify the content to match your needs.

Some of the parameters like Principal Class don't apply. I removed “Principal Class” and application still worked.

Related: setup_xcode

Converting Console Application to Console-less in XCode

It is probably not the best idea to convert existing target from Console to Cocoa application. The better way is to simply create new Cocoa target and remove Objective-C code references.

The following is a log of steps I had to take to convert the existing target.

The project type has to be changed, so XCode can offer Cocoa specific configuration settings. Expand content of the project package file. Open project.pbxproj in the text editor. Search for productType. Console application's product type is set to productType = “com.apple.product-type.tool”;. Cocoa application is set to productType = “com.apple.product-type.application”;. Change product type to com.apple.product-type.application. Reopen XCode project. It now should have Summary and Info tabs in addition to Build Settings, Build Phases and Build Rules tabs.

Create Info.plist file. For example, file name can be based on target name such as TargetName-Info.plist.

Select Build Target → Summary tab. Click on Choose Info.plist file and select created Info.plist file.

Select build target → Build Settings

In Packaging Section fill preferably at target level

* Info.plist file name * Product name * Wrapper extension is set to app

XCode will now correctly generate the application bundle. However, any additional resources would have to be copied with Build Phases configuration.

en/tutorials/orx/mac/xcode4-consoleless-resources.1369291071.txt.gz · Last modified: 2017/05/30 00:50 (7 years ago) (external edit)