Skip to content

Commit

Permalink
Added lines to try to get BlueJ to upgrade existing versions rather t…
Browse files Browse the repository at this point in the history
…han install alongside them (which is happening when ALLUSERS=1).
  • Loading branch information
neilccbrown committed Sep 17, 2024
1 parent 4e6fed6 commit 74fa3c9
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
15 changes: 15 additions & 0 deletions bluej/package/winsetup/bluej.wxs
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,21 @@
<!-- Be fairly permissive, don't want to get in the way of the user: -->
<MajorUpgrade AllowDowngrades="yes" />

<Upgrade Id="f4b4357e-6101-4cb1-8e38-3d4f3afb4be2">
<!-- Identify older versions to be upgraded -->
<!-- The "Maximum=" line is matched by a regex in the build file, so it is important that it be kept as-is. -->
<UpgradeVersion
Minimum="4.0.0"
Maximum="5.4.1"
IncludeMaximum="no"
Property="OLD_VERSION_DETECTED"
/>
</Upgrade>
<!-- Add a condition to check if an older version is detected -->
<InstallExecuteSequence>
<RemoveExistingProducts After="InstallInitialize" />
</InstallExecuteSequence>

<Property Id="ALLUSERS" Secure="yes" />

<Property Id="SOFTWARE" Value="BlueJ"/>
Expand Down
3 changes: 3 additions & 0 deletions boot/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,9 @@ task updateVersionNumber {
ant.replaceregexp(match:'(\\s*<Property\\s+Id=\"SOFTWAREVERSION\"\\s+Value=).*', replace:"\\1\"${bluejVersionNoSuffix}\"/>", byline:true) {
fileset(dir: '../bluej/package/winsetup', includes: 'bluej.wxs')
}
ant.replaceregexp(match:'(\\s*Maximum=)\".*\"', replace:"\\1\"${bluejVersionNoSuffix}\"", byline:true) {
fileset(dir: '../bluej/package/winsetup', includes: 'bluej.wxs')
}

//////////////////////////////////////
// Greenfoot:
Expand Down

0 comments on commit 74fa3c9

Please sign in to comment.