витязь в тигровом халате ([info]fyysik) wrote in [info]bezilla,
@ 2008-03-23 11:54:00
Previous Entry  Add to memories!  Tell a Friend!  Next Entry
Start script, reordering and cross-compilation
Our start script for Mozilla apps (FF, TB etc) contains code:

if [ "$OSTYPE" = "beos" ]; then
mimeset -F "$MOZILLA_BIN"
fi

In case we don't use it at least once (e.g. using reordered build which "should" start without script), we can fall in all kinds of strange behaviour, something alike described by tigerdog in previous posting.

Same will happen if OSTYPE isn't reported as BeOS.

And there are some problems with that if we do it at compile time - only new packaging proposed by mmadia (zip) will preserve attributes, and if you do compilation under Linux - this operation cannot be done at all.

For linux there is another problem - all commands like "copyattr" wouldn't work there at build/packaging time.



(Post a new comment)

... already being done at compile time
[info]mmadia
2008-03-23 01:24 pm UTC (link)
at least on BeOS and Zeta, mimeset is run during build time.
http://lxr.mozilla.org/mozilla1.8/source/config/rules.mk#830


To handle situations where toolkit/xre/nsNativeAppSupportBeOS.cpp#215 fails to find the AppSig, we could:

idea #1
-always pack the apprunner-beos.rsrc file with the distribution
-when GetAppSig() fails, it first attempts to locate and apply that .rsrc file
-if successful, it mimset's the binary
-if it fails, then could assign a default app-sig

idea #2
-instead of returning a non-dynamic default appsig, "application/x-vnd.Mozilla", a new method GenerateAppSig() could be created and called.
-GenerateAppSig() either uses the name of the binary or the name of the binary's parent directory as part of the application signature.

(Reply to this)


[info]tqh
2008-03-23 02:49 pm UTC (link)
Resources arn't attributes. The reason mimeset is in the script is because of nsNativeAppSupport's ugly handling of mimetypes. All this strange behaviour is because we are trying to get mimetype in a rather stupid way.

Mozilla code as far as I know don't use or know of BeOS attributes at all. I'm not aware of any place we are using them either. All we need is to set the resource in the binary. We wouldn't even need that if we hardcoded the mimetype in the BApplication like a real BeOS app. In the original port (and now XULRunner) it was probably a need to launch different apps from the same binary, hence the nasty trick of dynamic mime-type handling.

I think we can conclude that it works poorly.

(Reply to this) (Thread)


[info]tqh
2008-03-23 02:55 pm UTC (link)
For Seamonkey and Firefox the resource should be set with xres during the build. I can confirm that this works as intended even on Linux as I have a Linux compiled version of xres and the icon and the mimetype is correctly set inside the binary.

The mimeset just reads the resource for the binary and set the mimetype, icon and other useful things before launching. Otherwise it will be set while launching by the OS.

Sorry if I'm writing this in a weird order, I'm writing it while it pops up in my head.

(Reply to this) (Parent)


Create an Account
Forgot your login or password?
Login w/ OpenID
English • Español • Deutsch • Русский…