Closed Bug 39455 Opened 26 years ago Closed 23 years ago

[feature] Install.setMacFInfoTable()

Categories

(Core Graveyard :: Installer: XPInstall Engine, defect, P1)

PowerPC
Mac System 8.5
defect

Tracking

(Not tracked)

RESOLVED WONTFIX
Future

People

(Reporter: samir_bugzilla, Assigned: slogan)

References

Details

When XPInstall adds a directory, it assigns an internal default creator and type ('MOSS' and '????' respectively) to files that are not in AppleSingle format (and hence have no Finder Info). We need a way to specify the file creator and type explicitly at install time (in the install script). We need to be able to specify a table of extension/type code associations and a universal creator code. The extension/type code association can be constructed in the form of an associative array in JavaScript. Following is a proposed API: Install.setMacFInfoTable( <creator_code>, { <extension1> : <type_code1>, <extension2> : <type_code2>, : : : <extensionN> : <type_codeN> } ) And example usage may be: Install.setMacFInfoTable( 'MOZZ', { ".js" : 'JS ', ".dtd" : 'DTD ', ".xul" : 'XUL ', ".css" : 'CSS ', "." : 'fOO ', "*" : 'bAR ' } ); This will set up an internal hashtable that is consulted whenever a file has no encoded Finder Info. In addition, the "." designation will be used to set the file creator and type codes for files with no extension. Similarly, the "*" designation will be used to set the file creator and type codes for all files that do not match any of the extensions specified (in addition to not having Finder Info encoded). Bug 39454 has been filed to provide the ability to set and get Finder Info through the FileOp mechanism exposed in XPInstall's js context.
Blocks: 38583
Target Milestone: --- → M20
Status: NEW → ASSIGNED
Shouldn't we set the file type of JS, DTD, XUL, CSS and other plain text files to 'TEXT' ? But I agree that xpinstall needs to set file types and creators on install.
Yes, Simon, that make sense but is easily changed once we get the feature in and the release .xpis' install scripts use it. Since this is very featurish, it probably won't get in till next release.
What do you mean by 'next release'...? A temporary but simple solution could be to assign the file type "TEXT" instead of "????" to newly added files that are not AppleSingle encoded. How about that?
Setting the default to 'TEXT' is not entirely accurate but I am willing to hear arguments.
I agree it's not entirely accurate but it will do the right thing for 90% (?) of the files. All example cited above (.css .js .dtd .xul .properties) fall in this category. btw, I'd like to know which files in the build have no resource fork and are NOT text. The original issue brought up by Kat in bug #38583 was that some file could be easily localized because they had a file type of '????'. This is why I suggest to replace '????' with 'TEXT' in xpisntall. It's easy and makes us look better than if we ship files with no type or '????'. Again, this is temporary until the Install.setMacFInfoTable() method is implemented.
90% of whose install? Netscape's? XPInstall is generic technology.
At any rate, if we should make this fix of defaulting to 'TEXT' instead of '????' a separate bug should be logged. This bug is not the appropriate forum for this discussion.
Priority: P3 → P1
Changing obsolete milestones to nearest moral equivalent
Target Milestone: M20 → Future
According to RFC 2318, the proper Macintosh file type for CSS files is "css ", not "TEXT" http://www.ietf.org/rfc/rfc2318.txt
Over to Syd for installer bug triage
Assignee: sgehani → syd
Status: ASSIGNED → NEW
Mozilla CFM build is dead; should this bug go with it?
yep dead. RIP.
Status: NEW → RESOLVED
Closed: 23 years ago
Resolution: --- → WONTFIX
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.