[wpkg-users] Package for Chrome

Dave Evans dave.evans at goodness.co.uk
Wed Oct 7 09:03:32 CEST 2020


try this recipe:

     <!-- check the version no. to check the package state -->
     <check type="logical" condition="or">
       <check type="uninstall" condition="versiongreaterorequal" 
path="Google Chrome" value="%version%" />
       <check type="file" condition="versiongreaterorequal" 
path="%PKG_DESTINATION%\chrome.exe"          value="%version%" />
       <check type="file" condition="versiongreaterorequal" 
path="%PKG_DESTINATION%\new_chrome.exe"      value="%version%" />
       <check type="file" condition="versiongreaterorequal" 
path="%PKG_DESTINATION(x86)%\chrome.exe"     value="%version%" />
       <check type="file" condition="versiongreaterorequal" 
path="%PKG_DESTINATION(x86)%\new_chrome.exe" value="%version%" />
     </check>

Chrome seems to be unique in that the developers actually put some 
thought into handling updates while the main program is running.
If Chrome is running, then Chrome installs to new_chrome
When the last instance of Chrome exits, the files are renamed (somehow) 
so that the new_chrome becomes the installed version.
I wonder (never checked) if the installed version number also only gets 
updated at this time so your 20% of failures are because Chrome is still 
running.
Regardless, the code above should solve your issues.

--------------------------------------------------------------
Dave Evans

On 06/10/2020 21:06, cleitet at gmail.com wrote:
> Try to do a version check on the exe file instead of what's written to 
> the add/remove programs entry. https://wpkg.org/Packages.xml#File 
> <https://wpkg.org/Packages.xml#File> has some documentation on how to 
> do that.
>
> -CL
>
> man. 24. aug. 2020 kl. 16:03 skrev Steve Kersley 
> <steve.kersley at keble.ox.ac.uk <mailto:steve.kersley at keble.ox.ac.uk>>:
>
>     Does anyone have a decent way to create a package for Google
>     Chrome that works reliably?
>
>     Being a simple MSI, it should be straightforward.  But our finding
>     is that some of the time, in an inconsistent and unpredictable
>     way, the enterprise version of Chrome sometimes installs itself
>     with the MSI version number rather than the Chrome version number
>     (from the current version: ’68.12.49287’ vs ’84.0.4147.135’). 
>     Obviously this triggers wpkg to think there’s a new version when
>     there isn’t as the versions don’t match.  The installer itself
>     knows not to update which doesn’t clear the problem – the version
>     number showing in Add/Remove remains the MSI version until the
>     next update.  If it was consistently one way or the other, it
>     would be trivial.  But I’d estimate it gets it right about 80% of
>     the time.  There’s been an open issue on the Chromium issue
>     tracker about it doing this for 10 years with still no fix, or
>     even acknowledgement that there’s a problem to fix:
>     https://bugs.chromium.org/p/chromium/issues/detail?id=67348
>     <https://bugs.chromium.org/p/chromium/issues/detail?id=67348>
>
>     In normal circumstances, I would (and have done for some time)
>     just leave it, it doesn’t cause any harm to have it try to
>     reinstall Chrome.  But in these strange times, I have a lot of
>     staff remote working via remote desktop, and they are reluctant to
>     reboot their PCs remotely at the end of the day.  As a result I’ve
>     been trialling ‘sonicnkt’s fork of wpkg-gp plus the system tray
>     client that notifies of pending updates, and the problem now is
>     that when Chrome has installed itself like this, the tray tool
>     pops up an update notification every 30m or so, for an update that
>     simply won’t go away.
>
>     Steve.
>
>     ---------------------------------
>     wpkg-users mailing list archives >>
>     http://lists.wpkg.org/pipermail/wpkg-users/
>     <http://lists.wpkg.org/pipermail/wpkg-users/>
>     _______________________________________________
>     wpkg-users mailing list
>     wpkg-users at lists.wpkg.org <mailto:wpkg-users at lists.wpkg.org>
>     https://lists.wpkg.org/mailman/listinfo/wpkg-users
>     <https://lists.wpkg.org/mailman/listinfo/wpkg-users>
>
>
> ---------------------------------
> wpkg-users mailing list archives >> http://lists.wpkg.org/pipermail/wpkg-users/
> _______________________________________________
> wpkg-users mailing list
> wpkg-users at lists.wpkg.org
> https://lists.wpkg.org/mailman/listinfo/wpkg-users

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.wpkg.org/pipermail/wpkg-users/attachments/20201007/e3a9a54c/attachment.html>


More information about the wpkg-users mailing list