Bug #1770

TXM 0.7.8 alpha: Windows, the update doesn't patch the TXM.bat to set the new path to TXM.ini

Added by Sebastien Jacquot over 7 years ago. Updated over 4 years ago.

Status:New Start date:04/06/2016
Priority:Normal Due date:
Assignee:- % Done:

0%

Category:Setup Spent time: -
Target version:TXM X.X

Description

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).

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:

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)

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

Solution 3

Create a "TXMupdater" RCP plugin by target that can patch files if necessary

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?

Solution 5

Embed all third-party tools and extra directories (CSS, XSL, etc.) in RCP plugins, it would help, for example, to make the applications running as standalone.

History

#1 Updated by Sebastien Jacquot over 7 years ago

  • Description updated (diff)

#2 Updated by Sebastien Jacquot over 7 years ago

If the launcher argument is removed the TXM.ini is searched by the launcher in the TXM.exe directory therefore this code seems to work:

(echo run "%installdir%\TXM\TXM.exe" -run -data "%appdata%\.txm"
"%installdir%\TXM\TXM.exe" -run -data "%appdata%\.txm"
) >"%appdata%\TXMLogs.txt" 2>"%appdata%\TXMErrorLogs.txt"

#3 Updated by Sebastien Jacquot over 7 years ago

  • Description updated (diff)

#4 Updated by Sebastien Jacquot over 7 years ago

I can't reproduce this bug at this moment. Need to test again from a real 0.7.8 Win setup and also discuss about the path of the TXM.ini (install dir or user dir, it's also related to the standalone run and multi-users run).

#5 Updated by Matthieu Decorde over 7 years ago

  • Target version changed from TXM 0.7.8 to TXM 0.8.0a (split/restructuration)

#6 Updated by Sebastien Jacquot about 5 years ago

  • Target version changed from TXM 0.8.0a (split/restructuration) to TXM 0.8.0

#7 Updated by Matthieu Decorde over 4 years ago

  • Target version changed from TXM 0.8.0 to TXM X.X

Also available in: Atom PDF