Bug #2724

Updated by Sebastien Jacquot over 1 year ago

Updates may fail failed on some Window Windows versions due because of user files rights and JRE in use.

Issue reported on Windows 10.


Le contexte de la session ├ętait :(profil=profile, phase=org.eclipse.equinox.internal.p2.engine.phases.Uninstall, operande=[R]org.txm.rcp.app_root.win32.win32.x86_64 --> null, action=org.eclipse.equinox.internal.p2.touchpoint.natives.actions.CleanupzipAction).

Backup of file C:\Program Files\TXM-0.8.0_2019-09-03\TXM.exe failed.

File that was copied to backup could not be deleted: C:\Program Files\TXM-0.8.0_2019-09-03\TXM.exe

h3. Temporary workaround to update

- quit TXM if launched
- copy the "jre" directory of the TXM installation directory (eg. C:\Program Files\TXM-0.8.0_2019-09-03\jre) to "C:/jre"
- edit the file "C:/Users/User/.TXM-0.8.0/TXM.ini" to add the two following lines just before "-vmargs" :

- go to TXM installation directory, eg. "C:\Program Files\TXM-0.8.0_2019-09-03"
- right click on "TXM.bat" and select "Run as administrator"
- TXM will start with some errors in console
- do the "File\Check for updates" command and install the available update
- when the update is done let TXM restarts by clicking on "Restart Now"
- TXM will restart with some errors in console
- quit TXM
- edit the file ".TXM-0.8.0/TXM.ini" to remove the 2 lines added
- restart TXM
- after that you can delete the created directory "C:/jre""

h4. Solution 0

(for 0.8.0 fix or 0.8.1 ? or later ?)

- stop to use build.properties of org.txm.rcp.feature for Window system and do the "jre" directory copy from the NSIS setup script
- it seems we can keep the build.properties for Linux and Mac
- build a new setup for Window

h4. Solution 1

- change the way of embedding the JRE, use P2 and bundles, see: #2725
- NOTE: should permit to update or change the JRE directly from Eclipse Updates mechanism

h4. Solution 2

- do not use P2 and Eclipse updates mechanism
- let the 3 installers do the "jre" directory copy
- it means a new setup is needed each time the JRE needs to be updated (or special scripts to do the copy/delete of directories)
- NOTE: JRE updating will be very rare

h4. Improvements

The TXMUpdate handler file rights test fails on Windows: it does not detect the missing rights.
<pre>!installDirectory.canWrite() || !installDirectory.canExecute()</pre>