Framework

[ Start > PikeDevel > Framework ] [ Edit this Page | Viewing Version 2 ]


Creating the framework

after successfully building pike from 7.7 CVS, enter the build directory (build/platform_name) and run "make framework".

successful completeion of this should leave Pike.framework in the current directory.

the framework is designed to be located within a "Cocoa" application's Frameworks directory (@executable_dir/../Frameworks), so if you want to install the framework within a standard location, like /Library/Frameworks, you'll need to use the install_name_tool utility to change that location.

A small sample program is included in comments at the end of src/OCPikeInterpreter.m.

Building a Universal Framework

The framework built by "make framework" places any platform specific modules in the Resources/platform directory, and the master is able to accomodate this. Therefore, the only file that needs to be made Universal is Pike.framework/Versions/Current/Pike. Use the "lipo" tool to make a fat binary of this file from versions of the file compiled for the desired platforms (currently, this should be Power_Macintosh and i386).

Assuming you have made frameworks for both platforms, the following commands should yield a Universal framework in the build/Frameworks directory:

cd build
mkdir Frameworks
cp -rf darwin-8.9.1-i386/Pike.framework Frameworks
cp -rf darwin-8.9.1-power-macintosh/Pike.framework/Versions/Current/Resources/Power_Macintosh Frameworks/Pike.framework/Versions/Current/Resources
lipo darwin-8.9.1-i386/Pike.framework/Versions/Current/Pike darwin-8.9.1-power-macintosh/Pike.framework/Versions/Current/Resources/Pike -output Frameworks/Pike.framework/Versions/Current/Pike

Powered by PikeWiki2

 
gotpike.org | Copyright © 2004 - 2009 | Pike is a trademark of Department of Computer and Information Science, Linköping University