Révision 2823
| tmp/org.txm.rcp.feature/win/TXM.bat (revision 2823) | ||
|---|---|---|
| 1 |
set installdir=%~dp0 |
|
| 2 |
set ARGS=%* |
|
| 3 |
set DEBUG=0 |
|
| 4 |
set VERSION=TXMVERSION |
|
| 5 |
set USERHOME=%USERPROFILE%\ |
|
| 6 |
|
|
| 7 |
IF NOT EXIST ROAMINGINSTALL GOTO ROAMINGINSTALLDONE |
|
| 8 |
echo "The 'roaming' install option is set." |
|
| 9 |
set USERHOME=%HOMEDRIVE%%HOMEPATH%\ |
|
| 10 |
echo "USERHOME set to %USERHOME%" |
|
| 11 |
|
|
| 12 |
:ROAMINGINSTALLDONE |
|
| 13 |
|
|
| 14 |
IF NOT EXIST ASKUSERDIRECTORY GOTO ASKUSERDIRECTORYDONE |
|
| 15 |
echo "The 'ask user directory' install option is set." |
|
| 16 |
for /f "tokens=*" %%a in ('jre\bin\java -jar StartDialog.jar') do set USERHOME=%%a\
|
|
| 17 |
echo "USERHOME set to %USERHOME%" |
|
| 18 |
|
|
| 19 |
:ASKUSERDIRECTORYDONE |
|
| 20 |
|
|
| 21 |
IF EXIST "%USERHOME%" GOTO USERHOMEOK |
|
| 22 |
echo "%USERHOME% does not exist. Aborting" |
|
| 23 |
msg * "TXM could not start using the USERHOME='%USERHOME%' directory." |
|
| 24 |
GOTO:EOF |
|
| 25 |
|
|
| 26 |
:USERHOMEOK |
|
| 27 |
|
|
| 28 |
set TXMHOME=%USERHOME%TXM-%VERSION%\ |
|
| 29 |
set DOTTXM=%USERHOME%.TXM-%VERSION%\ |
|
| 30 |
|
|
| 31 |
mkdir "%TXMHOME%" |
|
| 32 |
|
|
| 33 |
mkdir "%DOTTXM%" |
|
| 34 |
attrib +h "%DOTTXM%" /s /d |
|
| 35 |
|
|
| 36 |
echo "TXM: getting install date from %installdir%STAMP and %DOTTXM%STAMP files" |
|
| 37 |
Fc "%installdir%STAMP" "%DOTTXM%STAMP" |
|
| 38 |
|
|
| 39 |
echo "TXM: Preparing redirections in %USERHOME%/TXMPostInstallOutputLogs.txt and %USERHOME%/TXMPostInstallErrorLogs.txt files." |
|
| 40 |
|
|
| 41 |
|
|
| 42 |
IF errorlevel 1 (goto :install) else (goto :run) |
|
| 43 |
|
|
| 44 |
:install |
|
| 45 |
|
|
| 46 |
( |
|
| 47 |
echo "New TXM install: it's the first launch after the installation." |
|
| 48 |
del "%temp%\org.txm.rcpapplication.prefs" |
|
| 49 |
copy "%DOTTXM%configuration\.settings\org.txm.rcpapplication.prefs" "%temp%\org.txm.rcpapplication.prefs" |
|
| 50 |
copy "%DOTTXM%.metadata\.plugins\org.eclipse.core.runtime\.settings\org.txm.rcpapplication.prefs" "%temp%\org.txm.rcpapplication.prefs" |
|
| 51 |
copy "%DOTTXM%data\.metadata\.plugins\org.eclipse.core.runtime\.settings\org.txm.rcpapplication.prefs" "%temp%\org.txm.rcpapplication.prefs" |
|
| 52 |
|
|
| 53 |
rmdir /s /q "%DOTTXM%" |
|
| 54 |
IF errorlevel 1 (echo "TXM: failed to delete the %DOTTXM% directory.") |
|
| 55 |
|
|
| 56 |
mkdir "%DOTTXM%" |
|
| 57 |
IF errorlevel 1 (echo "TXM: failed to create %DOTTXM% directory.") |
|
| 58 |
|
|
| 59 |
copy "%installdir%TXM.ini" "%DOTTXM%TXM.ini" |
|
| 60 |
IF errorlevel 1 (echo "TXM: failed to copy %DOTTXM%TXM.ini file") |
|
| 61 |
|
|
| 62 |
copy "%temp%\org.txm.rcpapplication.prefs" "%DOTTXM%org.txm.rcpapplication.prefs" |
|
| 63 |
|
|
| 64 |
mkdir "%DOTTXM%user" |
|
| 65 |
IF errorlevel 1 (echo "TXM: failed to create %DOTTXM%user directory.") |
|
| 66 |
|
|
| 67 |
mkdir "%DOTTXM%configuration" |
|
| 68 |
IF errorlevel 1 (echo "TXM: failed to create %DOTTXM%user directory.") |
|
| 69 |
|
|
| 70 |
rmdir /s /q "%TXMHOME%\.metadata" |
|
| 71 |
IF errorlevel 1 (echo "TXM: failed to delete the %TXMHOME%.metadata directory.") |
|
| 72 |
|
|
| 73 |
copy "%installdir%STAMP" "%DOTTXM%STAMP" |
|
| 74 |
IF errorlevel 1 (echo "TXM: failed to copy %DOTTXM%STAMP file") |
|
| 75 |
) >"%USERHOME%\TXMPostInstallOutputLogs.txt" 2>"%USERHOME%\TXMPostInstallErrorLogs.txt" |
|
| 76 |
|
|
| 77 |
:run |
|
| 78 |
( |
|
| 79 |
set _JAVA_OPTIONS=-Duser.home="%USERHOME%" |
|
| 80 |
echo running "%installdir%TXM.exe" -run --launcher.ini "%DOTTXM%TXM.ini" %ARGS% -data "%DOTTXM%data" -user "%DOTTXM%user" -install "%installdir%" |
|
| 81 |
REM "%installdir%TXM.exe" -run --launcher.ini "%DOTTXM%TXM.ini" %ARGS% -user "%DOTTXM%user" -install "%installdir%" |
|
| 82 |
) >"%USERHOME%\TXMPostInstallOutputLogs.txt" 2>"%USERHOME%\TXMPostInstallErrorLogs.txt" |
|
| 83 |
|
|
| 84 |
"%installdir%TXM.exe" -run --launcher.ini "%DOTTXM%TXM.ini" %ARGS% -configuration "%DOTTXM%configuration" -user "%DOTTXM%user" -install "%installdir%\" |
|
| tmp/org.txm.rcp.feature/win/TXM debug.bat (revision 2823) | ||
|---|---|---|
| 1 |
"%~dp0/TXM.bat" -log -consolelog -clean -debug -console -noexit |
|
| tmp/org.txm.setups/shared/win/TXM debug.bat (revision 2823) | ||
|---|---|---|
| 1 |
"%~dp0/TXM.bat" -log -consolelog -clean -debug -console -noexit |
|
| tmp/org.txm.setups/shared/win/TXM.bat (revision 2823) | ||
|---|---|---|
| 1 |
set installdir=%~dp0 |
|
| 2 |
set ARGS=%* |
|
| 3 |
set DEBUG=0 |
|
| 4 |
set VERSION=TXMVERSION |
|
| 5 |
set USERHOME=%USERPROFILE%\ |
|
| 6 |
|
|
| 7 |
IF NOT EXIST ROAMINGINSTALL GOTO ROAMINGINSTALLDONE |
|
| 8 |
echo "The 'roaming' install option is set." |
|
| 9 |
set USERHOME=%HOMEDRIVE%%HOMEPATH%\ |
|
| 10 |
echo "USERHOME set to %USERHOME%" |
|
| 11 |
|
|
| 12 |
:ROAMINGINSTALLDONE |
|
| 13 |
|
|
| 14 |
IF NOT EXIST ASKUSERDIRECTORY GOTO ASKUSERDIRECTORYDONE |
|
| 15 |
echo "The 'ask user directory' install option is set." |
|
| 16 |
for /f "tokens=*" %%a in ('jre\bin\java -jar StartDialog.jar') do set USERHOME=%%a\
|
|
| 17 |
echo "USERHOME set to %USERHOME%" |
|
| 18 |
|
|
| 19 |
:ASKUSERDIRECTORYDONE |
|
| 20 |
|
|
| 21 |
IF EXIST "%USERHOME%" GOTO USERHOMEOK |
|
| 22 |
echo "%USERHOME% does not exist. Aborting" |
|
| 23 |
msg * "TXM could not start using the USERHOME='%USERHOME%' directory." |
|
| 24 |
GOTO:EOF |
|
| 25 |
|
|
| 26 |
:USERHOMEOK |
|
| 27 |
|
|
| 28 |
set TXMHOME=%USERHOME%TXM-%VERSION%\ |
|
| 29 |
set DOTTXM=%USERHOME%.TXM-%VERSION%\ |
|
| 30 |
|
|
| 31 |
mkdir "%TXMHOME%" |
|
| 32 |
|
|
| 33 |
mkdir "%DOTTXM%" |
|
| 34 |
attrib +h "%DOTTXM%" /s /d |
|
| 35 |
|
|
| 36 |
echo "TXM: getting install date from %installdir%STAMP and %DOTTXM%STAMP files" |
|
| 37 |
Fc "%installdir%STAMP" "%DOTTXM%STAMP" |
|
| 38 |
|
|
| 39 |
echo "TXM: Preparing redirections in %USERHOME%/TXMPostInstallOutputLogs.txt and %USERHOME%/TXMPostInstallErrorLogs.txt files." |
|
| 40 |
|
|
| 41 |
|
|
| 42 |
IF errorlevel 1 (goto :install) else (goto :run) |
|
| 43 |
|
|
| 44 |
:install |
|
| 45 |
|
|
| 46 |
( |
|
| 47 |
echo "New TXM install: it's the first launch after the installation." |
|
| 48 |
del "%temp%\org.txm.rcpapplication.prefs" |
|
| 49 |
copy "%DOTTXM%configuration\.settings\org.txm.rcpapplication.prefs" "%temp%\org.txm.rcpapplication.prefs" |
|
| 50 |
copy "%DOTTXM%.metadata\.plugins\org.eclipse.core.runtime\.settings\org.txm.rcpapplication.prefs" "%temp%\org.txm.rcpapplication.prefs" |
|
| 51 |
copy "%DOTTXM%data\.metadata\.plugins\org.eclipse.core.runtime\.settings\org.txm.rcpapplication.prefs" "%temp%\org.txm.rcpapplication.prefs" |
|
| 52 |
|
|
| 53 |
rmdir /s /q "%DOTTXM%" |
|
| 54 |
IF errorlevel 1 (echo "TXM: failed to delete the %DOTTXM% directory.") |
|
| 55 |
|
|
| 56 |
mkdir "%DOTTXM%" |
|
| 57 |
IF errorlevel 1 (echo "TXM: failed to create %DOTTXM% directory.") |
|
| 58 |
|
|
| 59 |
copy "%installdir%TXM.ini" "%DOTTXM%TXM.ini" |
|
| 60 |
IF errorlevel 1 (echo "TXM: failed to copy %DOTTXM%TXM.ini file") |
|
| 61 |
|
|
| 62 |
copy "%temp%\org.txm.rcpapplication.prefs" "%DOTTXM%org.txm.rcpapplication.prefs" |
|
| 63 |
|
|
| 64 |
mkdir "%DOTTXM%user" |
|
| 65 |
IF errorlevel 1 (echo "TXM: failed to create %DOTTXM%user directory.") |
|
| 66 |
|
|
| 67 |
mkdir "%DOTTXM%configuration" |
|
| 68 |
IF errorlevel 1 (echo "TXM: failed to create %DOTTXM%user directory.") |
|
| 69 |
|
|
| 70 |
rmdir /s /q "%TXMHOME%\.metadata" |
|
| 71 |
IF errorlevel 1 (echo "TXM: failed to delete the %TXMHOME%.metadata directory.") |
|
| 72 |
|
|
| 73 |
copy "%installdir%STAMP" "%DOTTXM%STAMP" |
|
| 74 |
IF errorlevel 1 (echo "TXM: failed to copy %DOTTXM%STAMP file") |
|
| 75 |
) >"%USERHOME%\TXMPostInstallOutputLogs.txt" 2>"%USERHOME%\TXMPostInstallErrorLogs.txt" |
|
| 76 |
|
|
| 77 |
:run |
|
| 78 |
( |
|
| 79 |
set _JAVA_OPTIONS=-Duser.home="%USERHOME%" |
|
| 80 |
echo running "%installdir%launcher.exe" -run --launcher.ini "%DOTTXM%TXM.ini" %ARGS% -data "%DOTTXM%data" -user "%DOTTXM%user" -install "%installdir%" |
|
| 81 |
REM "%installdir%launcher.exe" -run --launcher.ini "%DOTTXM%TXM.ini" %ARGS% -user "%DOTTXM%user" -install "%installdir%" |
|
| 82 |
) >"%USERHOME%\TXMPostInstallOutputLogs.txt" 2>"%USERHOME%\TXMPostInstallErrorLogs.txt" |
|
| 83 |
|
|
| 84 |
"%installdir%launcher.exe" -run --launcher.ini "%DOTTXM%TXM.ini" %ARGS% -configuration "%DOTTXM%configuration" -user "%DOTTXM%user" -install "%installdir%\" |
|
| tmp/org.txm.setups/shared/win/txm.nsi (revision 2823) | ||
|---|---|---|
| 255 | 255 |
File pcre3.dll |
| 256 | 256 |
File StartDialog.jar |
| 257 | 257 |
File TXM.bat |
| 258 |
File TXM.exe
|
|
| 258 |
File launcher.exe
|
|
| 259 | 259 |
File TXM.ico |
| 260 | 260 |
File TXM.ini |
| 261 | 261 |
File "TXM debug.bat" |
| tmp/org.txm.setups/shared/debian/usr/bin/TXM (revision 2823) | ||
|---|---|---|
| 156 | 156 |
#DEBUGOPTIONS="-log -clean -debug -console -noexit" |
| 157 | 157 |
) 1>&3 2>&4 |
| 158 | 158 |
|
| 159 |
SWT_GTK3=0 UBUNTU_MENUPROXY=0 exec "${TXMINSTALL}/TXM" "$@" -run --launcher.ini "$DOTTXMHOME/TXM.ini" $DEBUGOPTIONS -configuration "$DOTTXMHOME/configuration" -user "$DOTTXMHOME/user" -install "$TXMINSTALL"
|
|
| 159 |
SWT_GTK3=0 UBUNTU_MENUPROXY=0 exec "${TXMINSTALL}/launcher" "$@" -run --launcher.ini "$DOTTXMHOME/TXM.ini" $DEBUGOPTIONS -configuration "$DOTTXMHOME/configuration" -user "$DOTTXMHOME/user" -install "$TXMINSTALL"
|
|
| tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/OpenWelcomePage.java (revision 2823) | ||
|---|---|---|
| 49 | 49 |
/** The Constant ID. */ |
| 50 | 50 |
public final static String ID = "org.txm.rcp.commands.OpenWelcomePage"; //$NON-NLS-1$ |
| 51 | 51 |
|
| 52 |
public static String WELCOME = "http://textometrie.ens-lyon.fr/html/welcome/"; |
|
| 53 |
|
|
| 52 | 54 |
/* |
| 53 | 55 |
* (non-Javadoc) |
| 54 | 56 |
* @see org.eclipse.core.commands.AbstractHandler#execute(org.eclipse.core.commands.ExecutionEvent) |
| ... | ... | |
| 61 | 63 |
public static boolean openWelcomePage() {
|
| 62 | 64 |
|
| 63 | 65 |
try { // ensure network is enable
|
| 64 |
URL url = new URL("http://textometrie.ens-lyon.fr/html/welcome/welcome.html");
|
|
| 66 |
URL url = new URL(WELCOME+"welcome.html");
|
|
| 65 | 67 |
url.openStream().close(); |
| 66 | 68 |
} |
| 67 | 69 |
catch (Exception e) {
|
| ... | ... | |
| 73 | 75 |
int idx = version.lastIndexOf("."); //$NON-NLS-1$
|
| 74 | 76 |
if (idx > 0) version = version.substring(0, idx); // remove the "qualifier" part |
| 75 | 77 |
|
| 76 |
String urlString = "http://textometrie.ens-lyon.fr/html/welcome/" + version + "/" + locale + "/welcome.html";
|
|
| 78 |
String urlString = WELCOME + version + "/" + locale + "/welcome.html";
|
|
| 77 | 79 |
try {
|
| 78 | 80 |
URL url = new URL(urlString); |
| 79 | 81 |
try {
|
| ... | ... | |
| 82 | 84 |
catch (IOException e) {
|
| 83 | 85 |
Log.finer(e.getMessage()); |
| 84 | 86 |
// Log.printStackTrace(e); |
| 85 |
urlString = "http://textometrie.ens-lyon.fr/html/welcome/" + version + "/en/welcome.html";
|
|
| 87 |
urlString = WELCOME + version + "/en/welcome.html";
|
|
| 86 | 88 |
url = new URL(urlString); |
| 87 | 89 |
} |
| 88 | 90 |
return OpenBrowser.openfile(urlString) != null; |
| tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/OpenLocalizedWebPage.java (revision 2823) | ||
|---|---|---|
| 52 | 52 |
/** The Constant ID. */ |
| 53 | 53 |
public final static String ID = "org.txm.rcp.commands.OpenLocalizedWebPage"; //$NON-NLS-1$ |
| 54 | 54 |
|
| 55 |
public static final String URL_TEXTOMETRIE = "http://textometrie.ens-lyon.fr/";
|
|
| 55 |
public static final String URL_TEXTOMETRIE = "https://txm.gitpages.huma-num.fr/textometrie/";
|
|
| 56 | 56 |
public static final String URL_SFWEB = URL_TEXTOMETRIE + "html/"; |
| 57 | 57 |
public static final String URL_SFFILES = URL_TEXTOMETRIE + "files/"; |
| 58 | 58 |
|
Formats disponibles : Unified diff