Wiki source code of XcodeMigration

Version 28.1 by Pascal Robert on 2007/12/08 23:18

Hide last authors
Pascal Robert 22.1 1 = Introduction  =
Pascal Robert 17.1 2
Pascal Robert 28.1 3 XcodeMigration is a tool written by [[Pascal Robert>>~~probert]]to help you migrate multiple WebObjects projects from Xcode to Eclipse/WOLips.  If you have complex or many projects to convert, this is the tool to use.  The tool is written in Java and is a Eclipse project, so you will need to import the project into Eclipse first (you need a functionnal WOLips installation to be able to import the tool). 
Pascal Robert 17.1 4
5 = How to use it =
6
Pascal Robert 24.1 7 * If you want to convert your Java classes from MacRoman to UTF-8, make sure your Eclipse workspace is in UTF-8 (the default is MacRoman).
Pascal Robert 28.1 8 [[image:Image 1.png]]
Pascal Robert 26.1 9 * Make sure that you are in the WOLips perspective
Pascal Robert 28.1 10 [[image:Image 6.png]]
11
12 [[image:Image 7.png]]
13
Pascal Robert 24.1 14 * Download the tool (you don't need to expand the .zip file)
Pascal Robert 26.1 15 * Import the XcodeMigration tool into Eclipse, by selecting File > Import > Existings projects into workspace.  Next.  select archive
Pascal Robert 28.1 16 [[image:Image 2.png]]
17
18 [[image:Image 3.png]]
19
Pascal Robert 26.1 20 * Create two templates, one application, the other framework
Pascal Robert 28.1 21 [[image:Image 8.png]]
22
23 [[image:Image 9.png]]
24
Pascal Robert 26.1 25 * should see 3 projects
Pascal Robert 28.1 26 [[image:Image 10.png]]
Pascal Robert 26.1 27 * open config.xml and change <applicationTemplatePath> and <frameworkTemplatePath>
Pascal Robert 28.1 28 [[image:Image 11.png]]
Pascal Robert 26.1 29 * for each project that you want to import, you need the a <project> node.&nbsp; <path> is the file system path to the Xcode project, <name> is the project name, minus .xcodeproj
30 * open the Run dialog
Pascal Robert 28.1 31 [[image:Image 12.png]]
Pascal Robert 26.1 32 * double-click on Java Application
Pascal Robert 28.1 33 [[image:Image 13.png]]
Pascal Robert 26.1 34 * click on the arguments tab and enter this value as a program arguments&nbsp;
Pascal Robert 17.1 35
36 {{code}}
37
38 ${project_loc}/config.xml
39
40 {{/code}}
41
Pascal Robert 28.1 42 [[image:Image 21.png]]
43
Pascal Robert 26.1 44 * click apply and run
45 * when it's running, you should get a output like this
Pascal Robert 28.1 46 [[image:Image 16.png]]
Pascal Robert 26.1 47 * to import the converted projects, open File > Import > Existings projects into workspace.&nbsp; Next. select root directory
Pascal Robert 28.1 48 [[image:Image 17.png]]
Pascal Robert 26.1 49 * your converted projects will appear in the package explorer
Pascal Robert 28.1 50 [[image:Image 18.png]]
Pascal Robert 26.1 51 * fix all frameworks dependencies and you're done
Pascal Robert 17.1 52
53 = FAQ =
54
55 **Q.**&nbsp; I can't a //Could not find working dir for project// error when I launch my converted application.
56 **A.**&nbsp; Make sure that, in //config.xml//, //<applicationTemplatePath>// is set to a WO application instead of a WO framework.
57
58 **Q.**&nbsp; Some of my resources are missing or in the wrong folder.
Pascal Robert 28.1 59 **A.**&nbsp; The tool detect files that should be marked as //Resources// by file extension or name. If a file is not a Java class or one of the file type in the //Resources// list, the file will be move to the //WebServerResources// folder instead. You just have to move the files to the Resources folder when needed. If you have file types who should be detected as resources, you can add the needed code in the //copyFiles// method.
Pascal Robert 17.1 60
61 **Q.**&nbsp; My application is localized and the content in the components are displaying the wrong caracters.
Pascal Robert 28.1 62 **A.**&nbsp; If you set the //<convertToUTF8>// node to true, your Java classes will be converted from MacRoman to UTF-8, but the tool will NOT modify the .woo file so that they use UTF-8. Either you stay in MacRoman and change the value of //<convertToUTF8>// to //false//, or you will have to modify your components so that they use UTF-8.