I've got two questions regarding an application update of my own
XULRunner based application.
1) My update process works great, but shows no user-visible progress
while updating. Firefox shows a progress bar while updating. How can I
get my XULRunner application to do the same?
2) I install the application on Windows using a MSI package. The
application's version number is in the registry and displayed e.g. in
the Add/Remove Software dialog. When updating using the Mozilla update
mechanism, these values are not updated and the wrong version number is
displayed. Firefox seems to solve this problem in some way - how can I
do the same? I guess I need to update some registry keys, but is there a
standardized way to do this?
Thanks for your help!
Philipp
>
> 2) I install the application on Windows using a MSI package. The
> application's version number is in the registry and displayed e.g. in
> the Add/Remove Software dialog. When updating using the Mozilla update
> mechanism, these values are not updated and the wrong version number
> is displayed. Firefox seems to solve this problem in some way - how
> can I do the same? I guess I need to update some registry keys, but is
> there a standardized way to do this?
For Windows, you can launch a binary to accomplish this and the binary
along with command line arguments are also defined in the updater.ini.
This file gets concatenated to the updater.ini above.
http://mxr.mozilla.org/mozilla-central/source/browser/installer/windows/nsis/updater_append.ini
You also need to package the update.locale file if you specifiy a locale
in the app update url.
Robert
thank you Robert, that helps at least a bit.
On 03.11.2009 19:20, Robert Strong wrote:
> On 11/3/2009 6:35 AM, Philipp Wagner wrote:
>> Hi,
>>
>> I've got two questions regarding an application update of my own
>> XULRunner based application.
>>
>> 1) My update process works great, but shows no user-visible progress
>> while updating. Firefox shows a progress bar while updating. How can I
>> get my XULRunner application to do the same?
> You'll need an updater.ini file with the strings for the ui the same as
> Firefox has.
> http://mxr.mozilla.org/mozilla-central/source/browser/locales/en-US/updater/updater.ini
I did that. Now the updater dialog shows up, but even though I have
strings in the file, it looks like that:
http://philipp.wagner.name/temp/updater-empty-window.png
(i didn't use anything beyond plain ASCII to be sure that decoding
issues cannot happen).
But even worse is that the update process updates everything, but fails
to start the application afterward. The update window stays open until I
kill the process. If I remove the updater.ini file again, everything is
back to normal and the application is started (but no progress dialog is
shown of course).
>> 2) I install the application on Windows using a MSI package. The
>> application's version number is in the registry and displayed e.g. in
>> the Add/Remove Software dialog. When updating using the Mozilla update
>> mechanism, these values are not updated and the wrong version number
>> is displayed. Firefox seems to solve this problem in some way - how
>> can I do the same? I guess I need to update some registry keys, but is
>> there a standardized way to do this?
> For Windows, you can launch a binary to accomplish this and the binary
> along with command line arguments are also defined in the updater.ini.
> This file gets concatenated to the updater.ini above.
> http://mxr.mozilla.org/mozilla-central/source/browser/installer/windows/nsis/updater_append.ini
Do I need to write my own executable for that? I've found some registry
code in toolkit/mozapps/update/src/nsPostUpdateWin.js - is this code
that can be utilized in some way for what I try to achieve?
Philipp
Which version of xulrunner are you using? This will determine what the
file needs to be saved as for Windows and a couple of other things.
Robert
> _______________________________________________
> dev-platform mailing list
> dev-pl...@lists.mozilla.org
> https://lists.mozilla.org/listinfo/dev-platform
On 04.11.2009 20:45, Robert Strong wrote:
> Which version of xulrunner are you using? This will determine what the
> file needs to be saved as for Windows and a couple of other things.
1.9.1.3 (official build)
Philipp
The nsPostUpdateWin.js is app code and shouldn't be used to update the
registry... for example, it will fail on Vista and above when the user
is an admin with UAC turned on.
Instead you should create your own binary that is launched after update
and define the executable along with command line arguments in the
updater.ini.
Try these things out and let me know how it goes.
Cheers,
Robert
first: thanks Robert, it's working now! (after many hours of debugging)
On 05.11.2009 21:15, Robert Strong wrote:
> With 1.9.1.3 you should save the updater.ini as utf8. The two ini value
> names under [Strings] should be Title and Info... we replace the names
> when building to these values so we don't have to change the updater
> code when the strings change.
That's actually the point: the keys need to be "Title" and "Info", not
"TitleText" and "InfoText" like in the file in the source code [1].
I don't know if that caused any problems, but for anybody looking at
this thread again in the future: make sure to have no old update data
inside your Application Data/%APPNAME%/%PRODUCTNAME% folder (that's
where the updates are downloaded to). There is also an update log file
inside this directory.
> The nsPostUpdateWin.js is app code and shouldn't be used to update the
> registry... for example, it will fail on Vista and above when the user
> is an admin with UAC turned on.
>
> Instead you should create your own binary that is launched after update
> and define the executable along with command line arguments in the
> updater.ini.
I found other permission problems with that so I'm now simply writing no
version number to the registry any more.
Again, thank you Robert! XULRunner is awesome and contains many hidden
treasures, but can sometimes take time to get it working the right way :-)
Philipp
[1]
http://mxr.mozilla.org/mozilla-central/source/browser/locales/en-US/updater/updater.ini
btw: That is only on Windows when the app is installed under Program
Files. Otherwise it will be under the install directory in updates/0.
Glad it is working now.
Cheers,
Robert
>
>> The nsPostUpdateWin.js is app code and shouldn't be used to update the
>> registry... for example, it will fail on Vista and above when the user
>> is an admin with UAC turned on.
>>
>> Instead you should create your own binary that is launched after update
>> and define the executable along with command line arguments in the
>> updater.ini.
>
> I found other permission problems with that so I'm now simply writing
> no version number to the registry any more.
>
> Again, thank you Robert! XULRunner is awesome and contains many hidden
> treasures, but can sometimes take time to get it working the right way
> :-)
>
> Philipp
>
>
> [1]
> http://mxr.mozilla.org/mozilla-central/source/browser/locales/en-US/updater/updater.ini
>