Bug #1770
Mis à jour par Sebastien Jacquot il y a plus de 9 ans
On Windows, the update doesn't patch the TXM.bat to set the new path to TXM.ini that is now <install dir>\TXM therefore the TXM.ini file is not loaded by the JVM (eg. UTF-8 encoding, JVM memory config, etc. are not set).
h3. Temporary workaround
* edit TXM.bat and replace "%appdata%\.txm\TXM.ini" with "%installdir%\TXM\TXM.ini" (two places)
Some mixable propositions for a durable solution, may need new ticket:
h3. Solution 1
Replace the actual system (using VB script and Batch file) with a simple Windows link .lnk, eg. with target equals to:
C:\TXM_0.7.8_64bit\TXM\TXM.exe -run --launcher.ini "TXM.ini" -data "%appdata%\.txm" "TXM.exe" -run --launcher.ini "TXM.ini" -data "%appdata%\.txm"
and Working/start dir equals to:
C:\TXM_0.7.8_64bit\TXM
tested in Win 7, it works)
Multiple things here:
* doing that, we can not redirect output to %appdata%\TXMLogs.txt and %appdata%\TXMErrorLogs.txt
* TXM.bat (needs information) seems to do some stuff at the first run, Matt do you think this process is still in use ?
* the TXM install dir must be set in the link, it could be done during the .lnk update/creation process but as the uninstallation of TXM is bugged in Windows at this moment (the path always used is "Program files\TXM"), I suggest to define an environment variable as TXM_INSTALL_PATH and use it in the .lnk and also in the uninstaller. This variable could also be used to detect the TXM first run rather than using a STAMP file [Actually, need to recheck the uninstallation because it seems to work when calling uninstall.exe but not when it's triggered from a new TXM version installation and there is already an existing TXM]
* it doesn't seem possible to programmatically create a Windows .lnk using Batch (seem to need VB, C, etc.)
* this solution may not work on shared machine (eg. class room)
h3. Solution 2
Replace the actual system with a .lnk that call a minimized cmd.exe (eg. cmd /c "TXM.exe etc."), it would permit to maintain the first launch TXM.bat process (if it's still necessary at this moment) and would also permit the output log files redirection
h3. Solution 3
Create a "TXMupdater" RCP plugin by target that can patch files if necessary
h4. Solution 4
Stop to use a TXM.ini file and try to put the JVM arguments in some RCP ini file (eg. lanucher.ini?). This way the Eclipse update mechanism may update the file for us.
Also store the exe files in a plugin by target?
h4. Solution 5
Use relative path for the install TXM directory call in code rather than absolute path. It would help, for example, to make the applications running as standalone.
h3. Temporary workaround
* edit TXM.bat and replace "%appdata%\.txm\TXM.ini" with "%installdir%\TXM\TXM.ini" (two places)
Some mixable propositions for a durable solution, may need new ticket:
h3. Solution 1
Replace the actual system (using VB script and Batch file) with a simple Windows link .lnk, eg. with target equals to:
C:\TXM_0.7.8_64bit\TXM\TXM.exe -run --launcher.ini "TXM.ini" -data "%appdata%\.txm" "TXM.exe" -run --launcher.ini "TXM.ini" -data "%appdata%\.txm"
and Working/start dir equals to:
C:\TXM_0.7.8_64bit\TXM
tested in Win 7, it works)
Multiple things here:
* doing that, we can not redirect output to %appdata%\TXMLogs.txt and %appdata%\TXMErrorLogs.txt
* TXM.bat (needs information) seems to do some stuff at the first run, Matt do you think this process is still in use ?
* the TXM install dir must be set in the link, it could be done during the .lnk update/creation process but as the uninstallation of TXM is bugged in Windows at this moment (the path always used is "Program files\TXM"), I suggest to define an environment variable as TXM_INSTALL_PATH and use it in the .lnk and also in the uninstaller. This variable could also be used to detect the TXM first run rather than using a STAMP file [Actually, need to recheck the uninstallation because it seems to work when calling uninstall.exe but not when it's triggered from a new TXM version installation and there is already an existing TXM]
* it doesn't seem possible to programmatically create a Windows .lnk using Batch (seem to need VB, C, etc.)
* this solution may not work on shared machine (eg. class room)
h3. Solution 2
Replace the actual system with a .lnk that call a minimized cmd.exe (eg. cmd /c "TXM.exe etc."), it would permit to maintain the first launch TXM.bat process (if it's still necessary at this moment) and would also permit the output log files redirection
h3. Solution 3
Create a "TXMupdater" RCP plugin by target that can patch files if necessary
h4. Solution 4
Stop to use a TXM.ini file and try to put the JVM arguments in some RCP ini file (eg. lanucher.ini?). This way the Eclipse update mechanism may update the file for us.
Also store the exe files in a plugin by target?
h4. Solution 5
Use relative path for the install TXM directory call in code rather than absolute path. It would help, for example, to make the applications running as standalone.