On 24-Nov-08, at 2:24 AM, Lachlan Deck wrote:
> On 24/11/2008, at 9:37 AM, David LeBer wrote:
>
>> On 23-Nov-08, at 4:51 PM, David LeBer wrote:
>>
>>> I'm playing with nightly (New Hotness (tm)) in preparation for it
>>> becoming stable.
>>>
>>> When I do an 'everything embedded' install. WOLips generates a
>>> split install copying the WebServerResources for the embedded
>>> frameworks into:
>>>
>>> [SPLIT]/WebObjects/APPNAME.woa/Frameworks/FRAMEWORKNAME.framework/
>>> WebServerResources/
>>>
>>> Which should get moved to the www doc root.
>>>
>>> However, when launching the app it is looking for resources in:
>>> /WebObjects/Frameworks/FRAMEWORKNAME.framework/WebServerResources/
>>> Am I missing a necessary flag somewhere? In my Old Lameness (tm)
>>> build.xml I was setting the 'frameworksBaseURL' property. Do I
>>> need to do that here too?
>>
>> So, adding 'frameworksBaseURL="/WebObjects/${project.name}.woa/
>> Frameworks"' to woapplication in the build.xml file generates the
>> paths I would expect for embedded web resources.
>>
>> Is there a more generic way of doing this (that doesn't require
>> touching every build.xml file)?
>
> Your Wonder app subclass:
>
> public void finishInitialization()
> {
> super.finishInitialization();
>
> // fix frameworks/app webserver resources url.
> LOG.info( "WOApplicationBaseURL:" + applicationBaseURL() );
> if
> ( ERXProperties
> .booleanForKeyWithDefault
> ( "ISHFrameworksBaseURL.relativeToApplicationBaseURL", true ) )
> {
> String realAppName = NSPathUtilities.lastPathComponent( path() );
> NSArray< String > components = new NSArray< String >( new String[] {
> realAppName, "Contents", "Frameworks"
> } );
> String newBaseURL = applicationBaseURL();
> for ( Enumeration< String > en = components.objectEnumerator();
> en.hasMoreElements(); )
> newBaseURL =
> NSPathUtilities.stringByAppendingPathComponent( newBaseURL,
> en.nextElement() );
> ERXProperties.setStringForKey( "WOFrameworksBaseURL", newBaseURL );
> setFrameworksBaseURL( newBaseURL );
> }
> LOG.info( "WOFrameworksBaseURL:" + frameworksBaseURL() );
> ...
> }
Thanks Lachlan.
That looks pretty straight forward, I'll do that.
;david
-- David LeBer Codeferous Software 'co-def-er-ous' adj. Literally 'code-bearing' site: http://codeferous.com blog: http://davidleber.net profile: http://www.linkedin.com/in/davidleber twitter: http://twitter.com/rebeld -- Toronto Area Cocoa / WebObjects developers group: http://tacow.org
This archive was generated by hypermail 2.0.0 : Mon Nov 24 2008 - 08:58:07 EST