Re: Building Java App, can't copy all resources to proper directories
Re: Building Java App, can't copy all resources to proper directories
- Subject: Re: Building Java App, can't copy all resources to proper directories
- From: Dmitry Markman <email@hidden>
- Date: Wed, 18 May 2005 13:36:22 -0400
if you put your project file near you source root
(I think it's not convenient)
your Destination Subdirectory content should be ok
if I need to edit more than 5-10 entries
I'm using manual (BBEdit find/replace) editing of some internal
project's file project.pbxproj
(because "Destination Subdirectory" isn't scriptable yet)
and edit JAVA_ARCHIVE_SUBDIR properties value
however be sure that XCode isn't open
On May 17, 2005, at 9:06 PM, Paul Archibald wrote:
Just to let everyone else know what happened, Dave was right. You
double-click on the right hand column to edit the destination
directory. It worked fine. Still don't know why some resources got
copied in a different way than others, but, what the heck, its
working now.
Thanks Dave.
On May 16, 2005, at 12:34 PM, David Ewing wrote:
You should be able to double-click to edit.
Dave
On May 16, 2005, at 12:14 PM, Paul Archibald wrote:
Thanks for the response.
I tried that. The information there does confirm that my images
are being copied to the wrong place. I see something like :
File
Destination Subdirectory
--------------------------------------------------------------------
-------------
<bunches of files >
src/apples/resource/jon.gif src/apples/
resource
src/oranges/resource/nav.gif oranges/resource
<many more files>
Note that the "apples" destination starts with "src", but
"oranges" does not. In fact, Xcode has created a "src/apples/
resource" directory in the build/Fruit/JavaClasses/ directory,
but the "oranges/resource" dir is in the proper place: build/
Fruit/JavaClasses/ oranges/resource/.
Your suggestion would be great if I could edit the settings in
the Target>Java Build Resource panel, but it seems to be read-only.
Paul
On May 16, 2005, at 10:14 AM, David Ewing wrote:
Dbl-click your target and go to the Java Resources build phase.
Confirm the settings in "destination subdirectory" column.
Dave
On May 15, 2005, at 6:17 PM, Paul Archibald wrote:
I am trying to build an all-java application with xcode. I have
a bunch of java source files, and a bunch of image files. The
way the files are organized in the directory looks a bit like:
Fruit
- Fruit.xcode <project file
- src
- - apples << the apples module
- - - resource
- - - - jon.gif
- - - - grav.gif
- - - - del.gif
- - - jonathan.java
- - - gravenstien.java
- - - delicious.java
- - oranges << the oranges module
- - - resource
- - - - nav.gif
- - - - sev.gif
- - - - sat.gif
- - - navel.java
- - - seville.java
- - - satsuma.java
My problem is that I can't get all the gif files copied into
all the right places during the build phase. For example, the
gravenstien.java file has a call to getClass.getResource
("grav.gif") which fails because the Build Java Resources phase
did not move the grav.gif file into the /build/..JavaClasses/
apples/resource directory (In fact it did not even create the
directory). The seville.java file has a similar call to
getResource("sev.gif"), but this call succeeds, because the
"oranges/resource" directory was properly copied into its
proper place in the build structure.
The build folder looks something like:
Fruit.app
- Fruit.build
- - JavaClasses
- - - apples
- - - - < no resource folder, this is the problem!!! >
- - - - gravenstien.class
- - - - jonathan.class
- - - - delicious.class
- - - oranges
- - - - resource
- - - - - nav.gif
- - - - - sev.gif
- - - - - sat.gif
- - - - navel.class
- - - - seville.class
- - - - satsuma.class
< plus pkg, javafiles, info, etc >
So, what gives? Why do some of my resources get properly copied
during the build, and some of them not? I have compared all the
project settings I can find, but can't figure whats going on.
If I just copy the apples/resource folder into the build
directory where it belongs (using th eFinder), the calls to
getResource() all succeed and the app works fine. Its just
gettting the xcode project to do that copying that is driving
me nuts.
(In my real project, there are ten src folders, of which 3
contain image resource folders, and 2 of those image folders
are correctly copied; just one set of images fails to get
copied. Also, I inherited this project, and I think it was
originally a Project Builder project file.)
Paul
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
40apple.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
Dmitry Markman
_______________________________________________
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