Re: [Cocoa-Java] Building for PowerPC *only* from an Intel-based Mac (ABORTED)
Re: [Cocoa-Java] Building for PowerPC *only* from an Intel-based Mac (ABORTED)
- Subject: Re: [Cocoa-Java] Building for PowerPC *only* from an Intel-based Mac (ABORTED)
- From: Nathan Roberts <email@hidden>
- Date: Thu, 6 Apr 2006 18:09:07 -0500
Frederic,
I haven't gotten my Intel Mac to build only a PowerPC Cocoa-Java app,
but I have gotten it to build a Universal Cocoa-Java app, which it
sounds like is what you really want to do in the end anyway, if I
read your emails correctly.
I took some notes on the process as I did it, because it isn't
documented (but I also found that my intuitions generally worked).
The main trick is splitting the project up into targets appropriately.
Anyway, here were my steps:
Open the Project
In the Groups and Files Pane, right-click on "Targets" and select
"Add > New Target"
For the Target Type, scroll down to the Java targets, and select
"Package"
Name the Target "MyProject Java Archive"
Double-click the new target
Change the base product name to match the name of your application.
Under "General Settings", change the product name to match that of
your application.
Click on your project's name in the Groups & Files listing to show
all files associated with your project.
In the search field, type ".java" to show only the Java files in your
project.
Change your Current Target to "MyProject Java Archive" using the
Target pop-up.
Check all the "Target" checkboxes to include the java files in your
Java Archive target.
Build the Java Archive target. You should have a file in your build
directory named MyApplication.jar.
Change your Current Target to your application ("MyApplication").
Uncheck all the "Target" checkboxes to exclude the java files in your
Java Archive target.
Drag your Java Archive target onto your Application target to make
your Application dependent on the Java Archive.
Right-click on your Application target and select "Add > New Build
Phase > New Copy Files Build Phase".
In the "Destination" pop-up, select "Java Resources."
Pop open your project's "Products" group (under "Groups & Files"),
and drag "MyApplication.jar" to the Copy Files build phase you just
created.
Open your MyApplication target, and select "Cocoa Java specific"
under the Info.plist entries. Needs Java should be checked, and the
Root Directory should be "Contents/Resources/Java", and the path
should be MyApplication.jar. (If you have several java archives that
you depend on, you can add more by clicking the + sign.)
Upgrade your MyApplication target to native. It should do so without
complaint now that you've removed the java files from the target.
Open your Upgraded Target. Click the Build Tab, and click
Architectures.
Click the Edit button. A pane slides down with checkboxes for your
architectures. Select the ones you want.
Hope this helps,
Nate Roberts
On Apr 6, 2006, at 5:43 PM, Frédéric BLANC wrote:
OK… So after some new attempts, I've come to the conclusion that this
(see subject) can't be done. Of course, I'd still love that someone
brings some proof that I'm wrong ("java-dev" list added in Cc: ;) !),
but my Intel-based iMac and me are now really close to give up trying
to build a PowerPC-only executable from a Cocoa-Java project in Xcode
:( !
Thanks for the various helpers, and sorry for the annoyance. I
promise that I won't disturb you anymore with Cocoa-Java-based
questions because my understanding of the situation is *much* clearer
now: my sole exit (not to depend on a PowerPC-based Mac anymore) is to
convert my project to native targets as quick as possible… The users
(2000+) of my li'l product won't appreciate the delay, that's for sure
:( !
[Side Note: I easily understand that Apple resources are better used
on the sole Objective-C side; I also understood—and I'm okay with the
fact—that there won't be any new Cocoa-Java API for *post*-Tiger
frameworks. But IMHO it would have been quite fair, at the same time,
to simply inform Cocoa-Java developers that Tiger's Xcode won't also
get the last needed changes to do an effortless transition to Intel
for those projects. (I searched in the documentation and through the
technotes, but nothing was said re this very topic.) It would have
saved some precious time+efforts to some of us…]
Now, let's all meet up in a few weeks(/months?) with some Objective-C
questions, that's for sure ;) ! The good thing is that I'll certainly
get more materials+support now :P !
Bye, bye, Cocoa-Java…
--
— Frederic BLANC (email@hidden)
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
40spindriftconsulting.com
This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden