bugGNUstep - Bugs: bug #24613, make overwrites bundles...

Group
 
 

bug #24613: make overwrites bundles Info-gnustep.plist

Submitter:  Michael Johnston <mjohnston>
Submitted:  Mon 20 Oct 2008 10:44:02 AM UTC
   
 
Category:  Makefiles Severity:  3 - Normal
Item Group:  Bug Status:  None
Privacy:  Public Assigned to:  nico
Open/Closed:  Closed
* Mandatory Fields

Add a New Comment Rich Markup
   

Tue 21 Oct 2008 11:14:22 AM UTC, comment #5: 

Thanks Michael

we definitely need to improve the documentation

I'll start by adding a comment in bundle.make

Maybe we could add a bundle.texi in the documentation explaining
the various options and things for bundles and frameworks and
application bundles ?  Not sure people look into the .texi
documentation, but at least there would be a full explanation
somewhere for people who look for it ... at the moment
there is none. :-(

Thanks

Nicola Pero <nico>
Group Member
Tue 21 Oct 2008 11:00:27 AM UTC, comment #4: 

Suddenly everything becomes clear ;-). I was using Info-gnustep.plist since thats what NSBundles infoDictionary method reads - I had no idea about the official method.
I guess I should have paid more attention to those 'DO NOT EDIT' messages ;-)

Thanks for your help.

Michael Johnston <mjohnston>
Mon 20 Oct 2008 09:01:27 PM UTC, comment #3: 

Hi Michael

let me explain - it's not documented that well ;-)

In theory, you should have a EnergyConverterInfo.plist file
containing the custom entries for your bundle.  gnustep-make
will automatically read it, and merge it with the auto
configured fields, and create Info-gnustep.plist. ;-)

So one option you have is to reorganize to follow that schema:
so, you'd remove the lines

EnergyConverter_RESOURCE_FILES = \
Resources/Info-gnustep.plist

from your GNUmakefile, and you'd rename your Resources/Info-gnustep.plist into EnergyConverterInfo.plist.  Then, do
a 'make clean' and a 'make' and the file
EnergyConverter.bundle/Resources/Info-gnustep.plist
should be automatically generated containing your entries.

That is the "official" way of adding new entries to
Info-gnustep.plist, so it should obviously work both with
2.0.4 and 2.0.6. :-)

Of course, I do understand what you are trying to do ...
ie, to completely override this system and just overwrite
the generated Info-gnustep.plist file altogether
with your own. :-)

If you want to do that, you should use your own rules to shield
yourself from changes in the internal gnustep-make rules.  You
could remove the lines

EnergyConverter_RESOURCE_FILES = \
Resources/Info-gnustep.plist

from your GNUmakefile, and instead add a GNUmakefile.postamble
with the following code:

after-build:
        cp Resources/Info-gnustep.plist EnergyConverter.bundle/Resources/Info-gnustep.plist

(there is a TAB before the 'cp')

In other words, you do the overwriting yourself in your own
rule after the bundle has been built.  Then you're safe that
no matter how the gnustep-make internals change, your code
does not depend on them and should always work :-)

The solution you choose would depend on your taste obviously :-)

The problem you are having with your current code depends
on the fact that there are two internal parts of gnustep-make
trying to generate the same Info-gnustep.plist file: the
xxx_RESOURCE_FILES and the code that generates
Info-gnustep.plist.
In 2.0.4, the xxx_RESOURCE_FILES copy happened after creating
the file, in 2.0.6 it happens before.  That's just down to
chance ... that order is not part of the public API. :-(

None of the two solutions I proposed above are down to chance
though - they should work reliably on all past, present and
future versions of gnustep-make :-)

Thanks

Nicola Pero <nico>
Group Member
Mon 20 Oct 2008 12:51:09 PM UTC, comment #2: 

Here you go.

(file #16709, file #16710)

Michael Johnston <mjohnston>
Mon 20 Oct 2008 10:59:48 AM UTC, comment #1: 

Hi Michael

thanks for your report :-)

I'll have a look today (give me a few hours to get to the
office).  Can you attach the GNUmakefile and Info-gnustep.plist
you are using ?

Thanks

Nicola Pero <nico>
Group Member
Mon 20 Oct 2008 10:44:02 AM UTC, original submission:  

I have a number of bundles with Info-gnustep.plist files which contain extra information used by my app. Previous to gnustep-make 2.0.6 these were installed without a problem. However now they are replaced with a default plist on bundle creation. I compared the output of make messasges=yes for 2.0.4 and 2.0.6 and it appears a final set of commands is no longer run.

V 2.0.4

echo "OLD_GNUSTEP_STAMP_ASTRING = _EnergyConverter-" > ./EnergyConverter/stamp.make
(echo "{"; echo '  NOTE = "Automatically generated, do not edit!";'; \
  echo "  NSExecutable = \"EnergyConverter\";"; \
  echo "  NSMainNibFile = \"\";"; \
  echo "  NSPrincipalClass = \"EnergyConverter\";"; \
  echo "}") >EnergyConverter/Resources/Info-gnustep.plist
if [ -r "EnergyConverterInfo.plist" ]; then \
  plmerge EnergyConverter/Resources/Info-gnustep.plist EnergyConverterInfo.plist; \
fi
for f in Resources/Info-gnustep.plist; do \
  if [ -f $f -o -d $f ]; then \
    cp -fr $f ./EnergyConverter/Resources/; \
  else \
    echo "Warning: $f not found - ignoring"; \
  fi; \
done


v 2.0.6

(echo "{"; echo '  NOTE = "Automatically generated, do not edit!";'; \
  echo "  NSExecutable = \"EnergyConverter\";"; \
  echo "  NSMainNibFile = \"\";"; \
  echo "  NSPrincipalClass = \"EnergyConverter\";"; \
  echo "}") >EnergyConverter/Resources/Info-gnustep.plist
if [ -r "EnergyConverterInfo.plist" ]; then \
  plmerge EnergyConverter/Resources/Info-gnustep.plist EnergyConverterInfo.plist; \
fi





Michael Johnston <mjohnston>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

Attached Files
file #16709:  GNUmakefile added by mjohnston (690B - application/octet-stream)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by nico (Posted a comment)
  • -email is unavailable- added by mjohnston (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

    Follow 4 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2008-10-21 nico Open/ClosedOpen Closed
    2008-10-20 mjohnston Attached File- Added GNUmakefile, #16709
        Attached File- Added Info-gnustep.plist, #16710
    2008-10-20 nico Assigned toNone nico

    Back to the top

    Powered by Savane 3.13-4448.
    Corresponding source code