Can't get along with xulrunner and paths

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Can't get along with xulrunner and paths

Andreas M-2
Hi,

I am developing a simple xulrunner application. XULRunner starts, but
does not open any window. I did not fully understand the path-handling
(why is it so complicated and why do we need four different files for
settings, install.rdf, chrome.manifest, prefs.js and application.ini?)

/
/chrome
    appName/
       content/
           main.xul
           js/main.js
       locale/
       skin/
    icons/
defaults/
    preferences/
       prefs.js
application.ini
chrome.manifest
install.rdf

Currently no installation is happening, this is a development project
and I want to run all from source/file-system.

chrome.manifest is as follows:

content GTD4SB chrome/appName/content/
skin GTD4SB global chrome/appName/skin/global/
locale GTD4SB en-US chrome/appName/locale/en-US/

prefs.js:

/* Preferences sample: */
pref("appName.prefkey4String", "A string");
pref("appName.prefkey4boolean", false);
pref("appName.prefkey4number", 0);
pref("capability.principal.codebase.p0.granted", "UniversalXPConnect");
pref("capability.principal.codebase.p0.id", "file:///");
pref("toolkit.defaultChromeURI","chrome://appName/content/TestShell.xul");

/* debugging prefs */
pref("browser.dom.window.dump.enabled", true);
pref("javascript.options.showInConsole", true);
pref("javascript.options.strict", true);
pref("nglayout.debug.disable_xul_cache", true);
pref("nglayout.debug.disable_xul_fastload", true);

However, this does not work. Any ideas? Thanks.


--
Bye,
Andreas M.
_______________________________________________
dev-tech-xpinstall mailing list
[hidden email]
https://lists.mozilla.org/listinfo/dev-tech-xpinstall
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Can't get along with xulrunner and paths

Sergei Zhirikov
"Andreas M" <[hidden email]> wrote in message
news:[hidden email]...

> Hi,
>
> I am developing a simple xulrunner application. XULRunner starts, but
> does not open any window. I did not fully understand the path-handling
> (why is it so complicated and why do we need four different files for
> settings, install.rdf, chrome.manifest, prefs.js and application.ini?)
>
> /
> /chrome
>     appName/
>        content/
>            main.xul
>            js/main.js
>        locale/
>        skin/
>     icons/
> defaults/
>     preferences/
>        prefs.js
> application.ini
> chrome.manifest
> install.rdf
>
> Currently no installation is happening, this is a development project
> and I want to run all from source/file-system.
>
> chrome.manifest is as follows:
>
> content GTD4SB chrome/appName/content/
> skin GTD4SB global chrome/appName/skin/global/
> locale GTD4SB en-US chrome/appName/locale/en-US/
>
> prefs.js:
>
> /* Preferences sample: */
> pref("appName.prefkey4String", "A string");
> pref("appName.prefkey4boolean", false);
> pref("appName.prefkey4number", 0);
> pref("capability.principal.codebase.p0.granted", "UniversalXPConnect");
> pref("capability.principal.codebase.p0.id", "file:///");
> pref("toolkit.defaultChromeURI","chrome://appName/content/TestShell.xul");
>
> /* debugging prefs */
> pref("browser.dom.window.dump.enabled", true);
> pref("javascript.options.showInConsole", true);
> pref("javascript.options.strict", true);
> pref("nglayout.debug.disable_xul_cache", true);
> pref("nglayout.debug.disable_xul_fastload", true);
>
> However, this does not work. Any ideas? Thanks.
>

If your chrome.manifest contains:

content GTD4SB chrome/appName/content/

then your prefs.js must contain:

pref("toolkit.defaultChromeURI","chrome://GTD4SB/content/TestShell.xul");

You have defined a mapping of "chrome/appName/content/"
directory to "GTD4SB" URL. Then you should be using that URL.
By the way, you don't need install.rdf for a XULRunner application.
--
Sergei.


_______________________________________________
dev-tech-xpinstall mailing list
[hidden email]
https://lists.mozilla.org/listinfo/dev-tech-xpinstall
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Can't get along with xulrunner and paths

Andreas M-2
On 03.06.2008 23:21 Sergei Zhirikov wrote

> "Andreas M" <[hidden email]> wrote in message

> You have defined a mapping of "chrome/appName/content/"
> directory to "GTD4SB" URL. Then you should be using that URL.
> By the way, you don't need install.rdf for a XULRunner application.

Sorry, I replaced GTD4SB with appName for the email only but it seems TB did not replace all the strings for some reason. It was late ;-).

I have GTD4SB at all places in my chrome.manifest.

I post a new version, that I tried just running. Project looks like:

GTD4SB\src\application.ini

GTD4SB\src\chrome
GTD4SB\src\chrome\chrome.manifest

GTD4SB\src\chrome\GTD4SB
GTD4SB\src\chrome\GTD4SB\content
GTD4SB\src\chrome\GTD4SB\content\about.css
GTD4SB\src\chrome\GTD4SB\content\about.xul
GTD4SB\src\chrome\GTD4SB\content\db.json

GTD4SB\src\chrome\GTD4SB\content\js
GTD4SB\src\chrome\GTD4SB\content\js\GTD.js
GTD4SB\src\chrome\GTD4SB\content\js\main.js
GTD4SB\src\chrome\GTD4SB\content\js\Simplest.js
GTD4SB\src\chrome\GTD4SB\content\js\sqlite3.js

GTD4SB\src\chrome\GTD4SB\content\main.xul
GTD4SB\src\chrome\GTD4SB\content\options.xul
GTD4SB\src\chrome\GTD4SB\content\Simplest.xul
GTD4SB\src\chrome\GTD4SB\content\test.xul
GTD4SB\src\chrome\GTD4SB\content\TestShell.xul

GTD4SB\src\chrome\GTD4SB\locale
GTD4SB\src\chrome\GTD4SB\locale\en-US
GTD4SB\src\chrome\GTD4SB\locale\en-US\GTD4SB.dtd

GTD4SB\src\chrome\GTD4SB\skin
GTD4SB\src\chrome\GTD4SB\skin\global
GTD4SB\src\chrome\GTD4SB\skin\GTD4SB.css
GTD4SB\src\chrome\GTD4SB\skin\overlay.css

GTD4SB\src\chrome\icons
GTD4SB\src\chrome\icons\default

GTD4SB\src\components

GTD4SB\src\defaults
GTD4SB\src\defaults\preferences
GTD4SB\src\defaults\preferences\prefs.js

GTD4SB\src\plugins

GTD4SB\src\install.rdf

I start xulrunner from within "GTD4SB\src" with
"xulrunner.exe application.ini"

chrome.manifest:

content GTD4SB chrome/GTD4SB/content/
skin GTD4SB global chrome/GTD4SB/skin/global/
locale GTD4SB en-US chrome/GTD4SB/locale/en-US/


prefs.js

pref("toolkit.defaultChromeURI", "chrome://GTD4SB/content/test.xul");
/* Preferences sample: */
pref("GTD4SB.prefkey4String", "A string");
pref("GTD4SB.prefkey4boolean", false);
pref("GTD4SB.prefkey4number", 0);
pref("capability.principal.codebase.p0.granted", "UniversalXPConnect");
pref("capability.principal.codebase.p0.id", "file:///");

/* debugging prefs */
pref("browser.dom.window.dump.enabled", true);
pref("javascript.options.showInConsole", true);
pref("javascript.options.strict", true);
pref("nglayout.debug.disable_xul_cache", true);
pref("nglayout.debug.disable_xul_fastload", true);

--
Bye,
Andreas M.
_______________________________________________
dev-tech-xpinstall mailing list
[hidden email]
https://lists.mozilla.org/listinfo/dev-tech-xpinstall
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Can't get along with xulrunner and paths

Benjamin Smedberg
Andreas M wrote:

>> You have defined a mapping of "chrome/appName/content/"
>> directory to "GTD4SB" URL. Then you should be using that URL.
>> By the way, you don't need install.rdf for a XULRunner application.
>
> Sorry, I replaced GTD4SB with appName for the email only but it seems TB

This conversation really ought to be in mozilla.dev.tech.xul or
mozilla.dev.extensions.

But as a general rule, you should use all-lowercase names for your chrome
packages. So please use "gtd4sb" or "appname", not "GTD4SB" or "appName".

--BDS
_______________________________________________
dev-tech-xpinstall mailing list
[hidden email]
https://lists.mozilla.org/listinfo/dev-tech-xpinstall
Loading...