Two installers for 'standard' TortoiseSVN and Shelving version

25 views
Skip to first unread message

Konrad Zuwała

unread,
Nov 3, 2017, 7:05:52 AM11/3/17
to TortoiseSVN-dev
Hey guys!

I need some help with custom installers. 

As agreed we will have two 'versions' of tortoise. One official, from trunk, and one built from shelve branch.
I am doing a custom installer for a shelve branch. The purpouse of such solution is quite simple: we don't want user to have two products installed at same time (due to Explorer hooks for example), we also don't want any of versions to do an upgrade of the different one, eg. shelve should not upgrade official and vice versa. 

I solved the issue by taking few actions:
1. I changed Upgrade GUID for a shelve version, to make sure it doesn't do an upgrade of 'standard' TSVN,
2. I created a registry Value under TortoiseSVN key, CustomVersion, DWORD, 1, which indicates that it's not a standard installer. Now, if I run installer, I added a condition:
<Property Id="PLAINTSVNFOUND">
  <RegistrySearch Id="PlainTortoise" Root="HKLM" Key="Software\[Manufacturer]" Name="Directory" Type="raw"/>
</Property>
<Property Id="CUSTOMVERSIONFOUND">
  <RegistrySearch Id="CustomTortoise" Root="HKLM" Key="Software\[Manufacturer]" Name="CustomVersion" Type="raw"/>
</Property>
<Condition Message="Please uninstall plain TortoiseSVN before installing [ProductName]."><![CDATA[Installed OR NOT PLAINTSVNFOUND OR (PLAINTSVNFOUND AND CUSTOMVERSIONFOUND)]]></Condition>

So, basically, I look for TortoiseSVN installation, during new app installation phase. If found, I check if we also have CustomVersion key. If not, it means it's an official installation and we must abort now.

3. ProductName is different.

Now, I have a few questions about that solution:
1. Is it OKish solution or it's totally stupid what I did? :D That's like the most important question :)
2. I changed upgrade GUID for the new app, by randomizing a bit Tortoise SVN upgrade GUIDs. Is it fine or GUIDs are generated totally different way?
3. In order to make solution complete, we need to have official TortoiseSVN installer be able to detect Shelve version (so it doesn't install next to Shelve version of TortoiseSVN). So I bet we need to make changes in official 'trunk' installer too?
4. Maybe you have any suggestions regarding how it's better to do it? Like for instance I tried to experiment with detection of official TSVN upgrade GUIDs and, based on that, doing installation or aborting it. But it seemed for me that registry key/value is the best solution I can come up with.

Any feedback will be appreciated!
Thanks!
Yours,
Konrad Zuwała

Stefan

unread,
Nov 3, 2017, 5:24:40 PM11/3/17
to TortoiseSVN-dev


On Friday, November 3, 2017 at 12:05:52 PM UTC+1, Konrad Zuwała wrote:
Hey guys!

I need some help with custom installers. 

As agreed we will have two 'versions' of tortoise. One official, from trunk, and one built from shelve branch.

Do we really need two versions?

What's stopping you from merging the shelving stuff in the svn repository back to trunk? From what I can see, it's pretty stable already, and most importantly even if it's not stable it wouldn't affect any existing features.

If you can't merge those back on the svn trunk, then maybe we could switch the TSVN trunk to link to the svn shelve branch instead, and you could merge your TSVN shelve branch back to trunk.
The TSVN nightly builds are there for a reason: to test out new features and get feedback. And as I said: those are new commands which won't affect any existing features users might depend on. So it's safe to include those in the nightly builds.

 
Now, I have a few questions about that solution:
1. Is it OKish solution or it's totally stupid what I did? :D That's like the most important question :)

I would just create the installer identical to what we do now. You can't really have two TSVN versions installed at the same time, that would be really confusing.
One install should just overwrite the other.
 
2. I changed upgrade GUID for the new app, by randomizing a bit Tortoise SVN upgrade GUIDs. Is it fine or GUIDs are generated totally different way?

In Visual Studio, Menu "Tools", then "Create Guid" - that will start a tool to generate GUIDs.
 
3. In order to make solution complete, we need to have official TortoiseSVN installer be able to detect Shelve version (so it doesn't install next to Shelve version of TortoiseSVN). So I bet we need to make changes in official 'trunk' installer too?
4. Maybe you have any suggestions regarding how it's better to do it? Like for instance I tried to experiment with detection of official TSVN upgrade GUIDs and, based on that, doing installation or aborting it. But it seemed for me that registry key/value is the best solution I can come up with.

Why not just skip all that and just make a 'normal' installer?
* if TSVN is installed, it will be overwritten (shelve versions are usually newer than the latest release)
* if user want's to go back to the official release or a nightly build, first uninstalling the 'newer' version and then installing the 'older' version isn't too much work
and this would also avoid any problems with multiple entries in the "installed programs" listing

Stefan

Ivan Zhakov

unread,
Nov 5, 2017, 4:43:51 AM11/5/17
to TortoiseSVN-dev on behalf of Konrad Zuwała
On 3 November 2017 at 14:05, Konrad Zuwała via TortoiseSVN-dev
<tortoisesvn-dev+APn2wQf63e_OtI88...@googlegroups.com>
wrote:
> Hey guys!
>
> I need some help with custom installers.
>
> As agreed we will have two 'versions' of tortoise. One official, from trunk,
> and one built from shelve branch.
May be I missed some discussion during mailing list migration, but
could you please provide link where idea of two separate installers of
*TortoiseSVN* was discussed? Thanks!

--
Ivan Zhakov

Julian Foad

unread,
Nov 6, 2017, 5:06:31 AM11/6/17
to tortois...@googlegroups.com
Stefan wrote:
> What's stopping you from merging the shelving stuff in the svn
> repository back to trunk?

That's a very good suggestion, Stefan. Thank you. I had not thought
about that option recently. I have emailed d...@subversion.a.o [1] and
will work on that right away.

[1] "Shelving v1 -- move to trunk?", 2017-11-03,
https://svn.haxx.se/dev/archive-2017-11/0028.shtml

- Julian

jul...@assembla.com

unread,
Nov 6, 2017, 7:14:26 AM11/6/17
to TortoiseSVN-dev
Ivan Zhakov wrote:
> could you please provide link where idea of two separate installers of
> *TortoiseSVN* was discussed? Thanks!

Hello Ivan! Konrad was talking about our company Assembla deciding to build a custom installer from a branch, and how to play nicely with the official installer -- there is no idea to have two different official TSVN versions.

Anyway Stefan gave us some better options.

Thanks for asking!
- Julian

Reply all
Reply to author
Forward
0 new messages