This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: Bundlebuilder needs to pre-convert resource files
Type: Stage:
Components: macOS Versions:
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: jackjansen Nosy List: jackjansen, jvr
Priority: normal Keywords:

Created on 2003-02-17 14:21 by jackjansen, last changed 2022-04-10 16:06 by admin. This issue is now closed.

Messages (10)
msg14639 - (view) Author: Jack Jansen (jackjansen) * (Python committer) Date: 2003-02-17 14:21
If bundlebuilder encounters an applesingle-encoded resource file it should pre-convert this to a datafork-based resource file.

At the moment the file is copied to the Resources directory verbatim, and this can cause problems if you use "sudo make frameworkinstall" to install Python: the resource folder will be mode 755 owned by root, and any normal user trying to run the applet will get a crash when the applet tries to unpack the applesingle .rsrc file into the datafork resource file .rsrc.df.rsrc.
msg14640 - (view) Author: Jack Jansen (jackjansen) * (Python committer) Date: 2003-02-17 16:56
Logged In: YES 
user_id=45365

Fixed in bundlebuilder.py rev 1.8, macresource rev. 1.3.

Just, I'm assigning this to you because I'm not sure whether you still keep bundlebuilder 2.2-compatible. If so you may need to disable this bit of magic if macresource.install isn't available. Please close the report when you're happy.
msg14641 - (view) Author: Just van Rossum (jvr) * (Python triager) Date: 2003-02-18 12:32
Logged In: YES 
user_id=92689

Yes, it must be compatible with 2.2 (it also ships with PyObjC). bundlebuilder.py was deliberately written to have very few dependencies: plistlib.py is the only dependency outside the std lib.

I'm not sure I like this patch to begin with: for one it seems it's doing this resource processing at the wrong abstraction level, it adds a special case for something that I don't like being treated specially within bundlebuilder. It would be much better if this preprocessing was done elsewhere.

In other words: I think the bug is in attempting to write the converted file to begin with, not with bundlebuilder not doing the conversion.
msg14642 - (view) Author: Jack Jansen (jackjansen) * (Python committer) Date: 2003-02-18 14:04
Logged In: YES 
user_id=45365

I agree on a theoretical level, but not on a practical one. The .rsrc files in the CVS repository are AppleSingle encoded, and I can't think of another way to keep them useable on both MacOS9 and MacOSX.

Any suggestions?
msg14643 - (view) Author: Just van Rossum (jvr) * (Python triager) Date: 2003-02-18 15:08
Logged In: YES 
user_id=92689

Aren't datafork res files supported in OS9? If so, this might be an opportunity to get rid of dataforks (as well as macresource.py) altogether...
msg14644 - (view) Author: Jack Jansen (jackjansen) * (Python committer) Date: 2003-02-18 15:50
Logged In: YES 
user_id=45365

The FSRef APIs for data fork stuff is available under OS9, but (a) this won't work for applets, (b) ResEdit and Resorcerer don't understand this and (c) I don't think CodeWarrior handles it. So until OS9 support is deprecated wer're stuck with resource forks:-(
msg14645 - (view) Author: Just van Rossum (jvr) * (Python triager) Date: 2003-02-18 19:17
Logged In: YES 
user_id=92689

Ok, next try: can't BuildApplet and/or buildtools.py do the conversion?
msg14646 - (view) Author: Jack Jansen (jackjansen) * (Python committer) Date: 2003-02-18 23:42
Logged In: YES 
user_id=45365

With some hacking, yes. buildtools would have to create the datafork-based resource file, but it would have to keep its original name, so it should be copied to a temp directory somewhere....

Can this wait until after 2.3a2?
msg14647 - (view) Author: Jack Jansen (jackjansen) * (Python committer) Date: 2003-02-24 16:41
Logged In: YES 
user_id=45365

I'll pick this up again. Now I know about the (src, dst) possibility of bundlebuilder it should be easy to do the conversion in buildtools.
msg14648 - (view) Author: Jack Jansen (jackjansen) * (Python committer) Date: 2003-02-25 23:12
Logged In: YES 
user_id=45365

Finally fixed in buildtools rev. 1.8. The workaround in bundlebuilder has gone.
History
Date User Action Args
2022-04-10 16:06:54adminsetgithub: 38000
2003-02-17 14:21:19jackjansencreate