Révision 1574
| tmp/org.txm.utils/src/org/txm/utils/io/FileCopy.java (revision 1574) | ||
|---|---|---|
| 134 | 134 |
* @throws IOException Signals that an I/O exception has occurred. |
| 135 | 135 |
*/ |
| 136 | 136 |
public static void copyFiles(File src, File dest) throws IOException {
|
| 137 |
copyFiles(src, dest, true); |
|
| 138 |
} |
|
| 139 |
|
|
| 140 |
/** |
|
| 141 |
* Copy files. Don't erase the destination directory and replace files if they already exists |
|
| 142 |
* |
|
| 143 |
* @param src the src directory |
|
| 144 |
* @param dest the dest directory |
|
| 145 |
* @param replace replace files if true |
|
| 146 |
* @throws IOException Signals that an I/O exception has occurred. |
|
| 147 |
*/ |
|
| 148 |
public static void copyFiles(File src, File dest, boolean replace) throws IOException {
|
|
| 137 | 149 |
|
| 138 | 150 |
// Check to ensure that the source is valid... |
| 139 | 151 |
if (!src.exists()) {
|
| ... | ... | |
| 168 | 180 |
} |
| 169 | 181 |
} else {
|
| 170 | 182 |
// This was not a directory, so lets just copy the file |
| 171 |
copy(src, dest); |
|
| 183 |
copy(src, dest, replace);
|
|
| 172 | 184 |
} |
| 173 | 185 |
} |
| 174 | 186 |
|
| tmp/TXMReleasePlugins.site/site.xml (revision 1574) | ||
|---|---|---|
| 3 | 3 |
<description name="TXM Extensions - RELEASE" url="http://txm.textometrie.org/updates/plugins"> |
| 4 | 4 |
This update site contains the Release plugins for TXM |
| 5 | 5 |
</description> |
| 6 |
<feature url="features/org.txm.backtomedia.feature_1.0.0.1452.jar" id="org.txm.backtomedia.feature" version="1.0.0.1452">
|
|
| 6 |
<feature url="features/org.txm.backtomedia.feature_1.0.0.1553.jar" id="org.txm.backtomedia.feature" version="1.0.0.1553">
|
|
| 7 | 7 |
<category name="Commands"/> |
| 8 | 8 |
</feature> |
| 9 |
<feature url="features/org.txm.wordcloud.feature_1.0.0.1452.jar" id="org.txm.wordcloud.feature" version="1.0.0.1452">
|
|
| 9 |
<feature url="features/org.txm.wordcloud.feature_1.0.0.1553.jar" id="org.txm.wordcloud.feature" version="1.0.0.1553">
|
|
| 10 | 10 |
<category name="Commands"/> |
| 11 | 11 |
</feature> |
| 12 |
<feature url="features/org.txm.rcp.feature_0.8.0.1452.jar" id="org.txm.rcp.feature" version="0.8.0.1452">
|
|
| 12 |
<feature url="features/org.txm.rcp.feature_0.8.0.1553.jar" id="org.txm.rcp.feature" version="0.8.0.1553">
|
|
| 13 | 13 |
<category name="org.txm.platform"/> |
| 14 | 14 |
</feature> |
| 15 |
<feature url="features/org.txm.treetagger.binaries.feature_1.0.0.1452.jar" id="org.txm.treetagger.binaries.feature" version="1.0.0.1452">
|
|
| 15 |
<feature url="features/org.txm.treetagger.binaries.feature_1.0.0.1558.jar" id="org.txm.treetagger.binaries.feature" version="1.0.0.1558">
|
|
| 16 | 16 |
<category name="TreeTagger"/> |
| 17 | 17 |
</feature> |
| 18 |
<feature url="features/org.txm.treetagger.models.feature_1.0.0.1452.jar" id="org.txm.treetagger.models.feature" version="1.0.0.1452">
|
|
| 18 |
<feature url="features/org.txm.treetagger.models.feature_1.0.0.1553.jar" id="org.txm.treetagger.models.feature" version="1.0.0.1553">
|
|
| 19 | 19 |
<category name="TreeTagger"/> |
| 20 | 20 |
</feature> |
| 21 |
<feature url="features/org.txm.textsbalance.feature_1.0.0.1452.jar" id="org.txm.textsbalance.feature" version="1.0.0.1452">
|
|
| 21 |
<feature url="features/org.txm.textsbalance.feature_1.0.0.1553.jar" id="org.txm.textsbalance.feature" version="1.0.0.1553">
|
|
| 22 | 22 |
<category name="Commands"/> |
| 23 | 23 |
</feature> |
| 24 | 24 |
<category-def name="Commands" label="Commands"/> |
| tmp/org.txm.treetagger.core/src/org/txm/treetagger/core/preferences/TreeTaggerPreferences.java (revision 1574) | ||
|---|---|---|
| 3 | 3 |
|
| 4 | 4 |
import java.io.BufferedReader; |
| 5 | 5 |
import java.io.File; |
| 6 |
import java.io.IOException; |
|
| 6 | 7 |
import java.net.MalformedURLException; |
| 7 | 8 |
import java.net.URL; |
| 8 | 9 |
import java.util.Properties; |
| 9 | 10 |
|
| 10 | 11 |
import org.osgi.framework.Version; |
| 11 | 12 |
import org.osgi.service.prefs.Preferences; |
| 13 |
import org.txm.Toolbox; |
|
| 12 | 14 |
import org.txm.core.preferences.TXMPreferences; |
| 13 | 15 |
import org.txm.utils.BundleUtils; |
| 16 |
import org.txm.utils.io.FileCopy; |
|
| 14 | 17 |
import org.txm.utils.io.IOUtils; |
| 15 | 18 |
import org.txm.utils.logger.Log; |
| 16 | 19 |
|
| ... | ... | |
| 157 | 160 |
Version binariesFragmentVersion = BundleUtils.getBundleVersion(bfragmentid); |
| 158 | 161 |
if (binariesFragmentVersion != null && binariesFragmentVersion.compareTo(currentBVersion) >= 0) { // udpate binaries path !
|
| 159 | 162 |
Log.fine("Updating TreeTagger binaries path...");
|
| 160 |
String path = BundleUtils.getBundleLocation(bfragmentid); |
|
| 161 |
if (path.startsWith("file:")) path = path.substring(5);
|
|
| 163 |
File path = BundleUtils.getBundleFile(bfragmentid); |
|
| 162 | 164 |
File binariesDir = new File(path, "res/"+osname); |
| 163 | 165 |
new File(binariesDir, "bin/separate-punctuation").setExecutable(true); // linux&mac |
| 164 | 166 |
new File(binariesDir, "bin/tree-tagger").setExecutable(true); // linux&mac |
| ... | ... | |
| 171 | 173 |
Version modelsFragmentVersion = BundleUtils.getBundleVersion(mfragmentid); |
| 172 | 174 |
if (modelsFragmentVersion != null && modelsFragmentVersion.compareTo(currentMVersion) >= 0) { // udpate models path!
|
| 173 | 175 |
Log.fine("Updating TreeTagger models path...");
|
| 174 |
String path = BundleUtils.getBundleLocation(mfragmentid); |
|
| 175 |
if (path.startsWith("file:")) path = path.substring(5);
|
|
| 176 |
File modelsDir = new File(path, "res/models"); |
|
| 177 |
preferences.put(MODELS_PATH, modelsDir.getAbsolutePath()); //$NON-NLS-1$ |
|
| 178 |
TreeTaggerPreferences.getInstance().put(INSTALLED_MODELS_VERSION, modelsFragmentVersion.toString()); |
|
| 179 |
Log.fine("Done.");
|
|
| 176 |
File path = BundleUtils.getBundleFile(mfragmentid); |
|
| 177 |
|
|
| 178 |
File installModelsDir = new File(path, "res/models"); |
|
| 179 |
File modelsDir = new File(Toolbox.getTxmHomePath(), "treetagger-models"); |
|
| 180 |
modelsDir.mkdirs(); |
|
| 181 |
try {
|
|
| 182 |
FileCopy.copyFiles(installModelsDir, modelsDir); |
|
| 183 |
preferences.put(MODELS_PATH, modelsDir.getAbsolutePath()); //$NON-NLS-1$ |
|
| 184 |
TreeTaggerPreferences.getInstance().put(INSTALLED_MODELS_VERSION, modelsFragmentVersion.toString()); |
|
| 185 |
Log.fine("Done.");
|
|
| 186 |
} catch (IOException e) {
|
|
| 187 |
// TODO Auto-generated catch block |
|
| 188 |
e.printStackTrace(); |
|
| 189 |
} |
|
| 180 | 190 |
} |
| 181 | 191 |
} |
| 182 | 192 |
} |
| tmp/org.txm.rcp/rcpapplication.product (revision 1574) | ||
|---|---|---|
| 78 | 78 |
</win> |
| 79 | 79 |
</launcher> |
| 80 | 80 |
|
| 81 |
|
|
| 82 | 81 |
<vm> |
| 83 | 82 |
<linux include="false">org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7</linux> |
| 84 | 83 |
<macos include="false">org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7</macos> |
| ... | ... | |
| 90 | 89 |
<text> |
| 91 | 90 |
<TXM Software User Agreement> |
| 92 | 91 |
|
| 93 |
TXM 0.8.0 Copyright © 2010-2018 ENS de Lyon, University of Franche-Comté, CNRS
|
|
| 92 |
TXM 0.8.0 Copyright © 2010-2019 ENS de Lyon, University of Franche-Comté, CNRS
|
|
| 94 | 93 |
|
| 95 | 94 |
<English version below> |
| 96 | 95 |
|
Formats disponibles : Unified diff