顯示具有 apple xcode 標籤的文章。 顯示所有文章
顯示具有 apple xcode 標籤的文章。 顯示所有文章

2008年6月25日 星期三

build java project from eclipse in xcode

prepare:
change Java template in Xcode
edit  /Developer/Library/Xcode/Project Templates/Java/Java Applicationex/build.xml
       source="1.5"  target="1.5"

(1)check out project "Test" from cvs
(2)create the Java project named "Test"
(3)now xcode create build.xml to compile your Java project 

include external jars
place jars in   Test/lib/

set main function:
in Info.plist,  set value = packageName.className  for key = MainClass
in Manifest,  set  Main-Class: packageName.MainClass

set image files:
place them in Test/bin

set VMOptions
in info.plist,  set  "-Xmx512m"  for key  "VMOptions"

set class path for app:
In Info.plist, set the value of  ClassPath
ex:

<key>ClassPath</key>

<array>

<string>$JAVAROOT/test1.jar</string>

<string>$JAVAROOT/test2.jar</string>

</array>


not including other jars when creating jar
comment  zipgroupfileset refid="lib.jars"

when the resource is the same location as execution file, how to set resource:
1. if execution file is jar(in jars/) , put resource in jars/ and use "java -jar" to run program
2. if execution file is App(in dist/), put resource in dist/  and run from xcode
3. place them in the bin/packageName/  


2008年6月24日 星期二

define macro in xcode

ex:
configuration: Debug
gcc 4.0 processing-> preprocessor macros:   _DEBUG

2008年6月18日 星期三

fileMerge

the GUI software to compare two files

compare two files
the two files compared are on the two top windows

use action to create merged file
the merged file is on the bottom window
(1) do action
(2) save file

2008年6月10日 星期二

xcode debug

step over:
execute the function and move to the line after function

step into:
execute the function and move to the body of the function

step out:
originally in the function, execute the function and move to the line after function

continue:
continue program execution

2008年5月13日 星期二

xcode

compile files in xcode
做完改變後,
若要在local端儲存改變,
按file,然後按住option,
然後選save a copy as ,
然後檔名選local端file的檔名,
如此就會覆蓋local端原本的檔案。

set parameter for running
in Excutables-> executable_name-> arguments