Bug #1826
Mis à jour par Matthieu Decorde il y a plus de 8 ans
h3. Diagnostic A
On some Windows, depending on the network account type used, TXM may run the post-installation-java post-installation sequence at start-up for each Windows session and then compels the user to set TXM user home, etc. preferences.
h3. Hypothesis A
For some network accounts, possibly different kind of network account profiles, when TXM starts it can see four three different configurations that produce the observed behavior:
* the post-install-bat has been executed because (and the preferences has been reseted): System.getProperty("user.home")+/TXM directory is not found or not readable or not writable (C:\Users\<login utilisateur>)
** * the %APPDATA%\.txm directory was is not found (eg C:\Users\<login>\AppData\Roaming\.txm or \\server\share\users\<login>\.txm)
*** an administrator not readable or the user deleted the .txm directory not writable (eg C:\Users\<login utilisateur>\AppData)
** * the %APPDATA%\.txm STAMP file found in C:\Users\<login utilisateur>\AppData\Roaming\.txm is older than then the TXM installation STAMP file
* found in the TXM start sequence tests:
** the TXMHOME preference is not set
** the System.getProperty("user.home")+/TXM installation directory is not found or not readable or not writable (C:\Users\<login utilisateur>)
h3. Diagnostic B
It has been observed that post-install-bat, post-install, the C:\Users\<login utilisateur>\AppData\Roaming\.txm\.metadata\.plugins\org.eclipse.core.runtime\.settings directory is emptied during TXM startup.
h3. Hypothesis B
When TXM starts it can see one configuration that produce the observed behavior:
* the STAMP file found in C:\Users\<login utilisateur>\AppData\Roaming\.txm is older then the STAMP file found in the TXM installation directory
h3. Hypothesis C
If the user modifies the TXMHOME preference, it is not restored during the post-installation-java because the post-installation-java always reset it using the 'System.getProperty("user.home")+/TXM' path.
h3. Solution
The post-installation-java must restore the TXMHOME preference of the previous "org.txm.rcpapplication.prefs" installation preference file.
-h3. Solution 1
On Windows, use a standard Windows environment variable or Windows API in TXM.bat giving a correct/stable path accessible to the user (the user home directory) to use or create by TXM jar:
* for network accounts, the path should look like \\servdfs.ens-lyon.fr\whomes\%USERNAME% for some account types and \\something\else\%USERNAME% for other account types
* for local Windows, the path should look like C:\Users\%USERNAME%- C:\Users\%USERNAME%
-h3. h3. Solution 2
* for an "all users" installation type of TXM on Windows on machines used by network accounts, the administrator patches the TXM.bat script after installation to point to the correct user home directory variable.- variable.
h3. Annex
On Windows, use an instruction in TXM.bat giving a correct/stable path accessible to the user (the user home
See #1931 or #2092.
h3. Solution 3
If the user modify the TXMHOME preference, it is not restored during the post-installation because the the post-installation always reset it using the 'System.getProperty("user.home")+/TXM' path.
The only preference restored by the post-installation are the TreeTagger paths. The post-installation must do the same with the TXMHOME preference.
On some Windows, depending on the network account type used, TXM may run the post-installation-java post-installation sequence at start-up for each Windows session and then compels the user to set TXM user home, etc. preferences.
h3. Hypothesis A
For some network accounts, possibly different kind of network account profiles, when TXM starts it can see four three different configurations that produce the observed behavior:
* the post-install-bat has been executed because (and the preferences has been reseted): System.getProperty("user.home")+/TXM directory is not found or not readable or not writable (C:\Users\<login utilisateur>)
** * the %APPDATA%\.txm directory was is not found (eg C:\Users\<login>\AppData\Roaming\.txm or \\server\share\users\<login>\.txm)
*** an administrator not readable or the user deleted the .txm directory not writable (eg C:\Users\<login utilisateur>\AppData)
** * the %APPDATA%\.txm STAMP file found in C:\Users\<login utilisateur>\AppData\Roaming\.txm is older than then the TXM installation STAMP file
* found in the TXM start sequence tests:
** the TXMHOME preference is not set
** the System.getProperty("user.home")+/TXM installation directory is not found or not readable or not writable (C:\Users\<login utilisateur>)
h3. Diagnostic B
It has been observed that post-install-bat, post-install, the C:\Users\<login utilisateur>\AppData\Roaming\.txm\.metadata\.plugins\org.eclipse.core.runtime\.settings directory is emptied during TXM startup.
h3. Hypothesis B
When TXM starts it can see one configuration that produce the observed behavior:
* the STAMP file found in C:\Users\<login utilisateur>\AppData\Roaming\.txm is older then the STAMP file found in the TXM installation directory
h3. Hypothesis C
If the user modifies the TXMHOME preference, it is not restored during the post-installation-java because the post-installation-java always reset it using the 'System.getProperty("user.home")+/TXM' path.
h3. Solution
The post-installation-java must restore the TXMHOME preference of the previous "org.txm.rcpapplication.prefs" installation preference file.
-h3. Solution 1
On Windows, use a standard Windows environment variable or Windows API in TXM.bat giving a correct/stable path accessible to the user (the user home directory) to use or create by TXM jar:
* for network accounts, the path should look like \\servdfs.ens-lyon.fr\whomes\%USERNAME% for some account types and \\something\else\%USERNAME% for other account types
* for local Windows, the path should look like C:\Users\%USERNAME%- C:\Users\%USERNAME%
-h3. h3. Solution 2
* for an "all users" installation type of TXM on Windows on machines used by network accounts, the administrator patches the TXM.bat script after installation to point to the correct user home directory variable.- variable.
h3. Annex
On Windows, use an instruction in TXM.bat giving a correct/stable path accessible to the user (the user home
See #1931 or #2092.
h3. Solution 3
If the user modify the TXMHOME preference, it is not restored during the post-installation because the the post-installation always reset it using the 'System.getProperty("user.home")+/TXM' path.
The only preference restored by the post-installation are the TreeTagger paths. The post-installation must do the same with the TXMHOME preference.