brewtarget-devs team mailing list archive
-
brewtarget-devs team
-
Mailing list archive
-
Message #00064
Re: NSIS
Now I need some help. If you look into my clone, you should see a branch
called bugs/windowsupdate.
The solution is split into two main pieces. When you run the installer, a
page is called after the install. It checks to see if a specific registry
key (HKCU SOFTWARE\brewtarget\OrganzationDefaults\user_data_dir) exists. If
it does, it simply says "You've upgraded, and your database will be
upgraded when you next start brewtarget".
If the key doesn't exist, the installer assumes this is an upgrade from a
previous version or a new install. A dialog is popped, asking the user to
either SKIP for a new install or select their old data directory. The user
has to choose one of the two options. Once the user chooses, we check that
directory for the existence of a database.sqlite. If it exists, we copy it
and options.xml to APPDATA\brewtarget. If it doesn't exist, we assume we
are upgrading from the old XML files and copy those into place. Both paths
set a hadOldConfig flag in the registry.
On the next upgrade, the user_data_dir setting is in the registry, and we
don't do anything.
When brewtarget starts up, the normal processes should now just work. The
old XML files will be recognized, and the import will happen. If an older
sqlite database is there, it will just get upgraded. I think this gets all
the things done we need done.
Phew. Now. Here's what I need help with. I was able to test the basic logic
of my NSIS scripting. What I can't do is make release on Windows. It's a
long story, and there is no way I am wasting another day of my life
building Qt for Windows. According to the CPACK documentation, I just need
to put my NSIS.install.in file in the way, and it will be used. I've done
that. So it should now be a matter of doing a make release on windows and
seeing what happens.
Mik
On Mon, Sep 9, 2013 at 12:59 PM, mik firestone <mikfire@xxxxxxxxx> wrote:
> I got NSIS installed on my machine and have not had the motivation (to be
> honest) to go any further. The scripting language is a little odd -- so
> much popping of stacks -- but I have a few examples for what I'm trying to
> do. It is just a matter of getting myself into one place long enough to do
> it.
>
> Mik
>
>
> On Mon, Sep 9, 2013 at 12:56 PM, Philip Lee <rocketman768@xxxxxxxxx>wrote:
>
>> Any luck with the NSIS installer scripting, Mik?
>>
>> --
>> Philip G. Lee
>> rocketman768@xxxxxxxxx
>>
>> --
>> Mailing list: https://launchpad.net/~brewtarget-devs
>> Post to : brewtarget-devs@xxxxxxxxxxxxxxxxxxx
>> Unsubscribe : https://launchpad.net/~brewtarget-devs
>> More help : https://help.launchpad.net/ListHelp
>>
>
>
>
> --
> In a world of ninja v. pirate, I pilot a Gundam
>
--
In a world of ninja v. pirate, I pilot a Gundam
Follow ups
References
-
NSIS
From: Philip Lee, 2013-09-09
-
Re: NSIS
From: mik firestone, 2013-09-09