Révision 1222
tmp/org.txm.setups/shared/debian/usr/bin/TXM (revision 1222) | ||
---|---|---|
157 | 157 |
fi |
158 | 158 |
|
159 | 159 |
## uncomment next lien to enable full debug |
160 |
#DEBUGOPTIONS="-log -consolelog -clean -debug -console -noexit"
|
|
160 |
#DEBUGOPTIONS="-log -clean -debug -console -noexit" |
|
161 | 161 |
|
162 |
SWT_GTK3=0 UBUNTU_MENUPROXY=0 exec "${TXMINSTALL}/TXM" "$@" -run --launcher.ini "$DOTTXMHOME/TXM.ini" $DEBUGOPTIONS -data "$TXMHOME/corpora" -user "$DOTTXMHOME/user" -install "$TXMINSTALL" |
|
162 |
SWT_GTK3=0 UBUNTU_MENUPROXY=0 exec "${TXMINSTALL}/TXM" -consoleLog "$@" -run --launcher.ini "$DOTTXMHOME/TXM.ini" $DEBUGOPTIONS -data "$TXMHOME/corpora" -user "$DOTTXMHOME/user" -install "$TXMINSTALL" |
tmp/org.txm.setups/shared/mac/Applications/TXM.app/Contents/MacOS/TXM (revision 1222) | ||
---|---|---|
182 | 182 |
# open "/Applications/TXM-TXMVERSION.app" --args -run --launcher.ini "$TXMHOME/.txm/TXM.ini" -data "$TXMHOME/.txm/data" -user "$TXMHOME/.txm/user" -install "/Applications/TXM-TXMVERSION.app" & |
183 | 183 |
#else |
184 | 184 |
echo "TXM: Running TXM for Mac OS X $OSVERSION with the JAR launcher..." |
185 |
/Applications/TXM-TXMVERSION.app/Contents/TXM/jre/Contents/Home/bin/java -Djava.library.path="$(echo /Applications/TXM-TXMVERSION.app/Contents/TXM/plugins/org.eclipse.equinox.launcher.cocoa.macosx.x86_64_*/eclipse_*.so)" -XX:MaxPermSize=256m -XstartOnFirstThread $TXMINIARGSVM -jar "$(echo /Applications/TXM-TXMVERSION.app/Contents/TXM/plugins/org.eclipse.equinox.launcher_*.jar)" -os macosx -ws cocoa -arch x86_64 -showsplash -run -data "$TXMHOME/corpora" -user "$TXMHOME/.txm/user" -install "/Applications/TXM-TXMVERSION.app/Contents/TXM" |
|
185 |
/Applications/TXM-TXMVERSION.app/Contents/TXM/jre/Contents/Home/bin/java -Djava.library.path="$(echo /Applications/TXM-TXMVERSION.app/Contents/TXM/plugins/org.eclipse.equinox.launcher.cocoa.macosx.x86_64_*/eclipse_*.so)" -XX:MaxPermSize=256m -XstartOnFirstThread $TXMINIARGSVM -jar "$(echo /Applications/TXM-TXMVERSION.app/Contents/TXM/plugins/org.eclipse.equinox.launcher_*.jar)" -os macosx -ws cocoa -arch x86_64 -consoleLog -showsplash -run -data "$TXMHOME/corpora" -user "$TXMHOME/.txm/user" -install "/Applications/TXM-TXMVERSION.app/Contents/TXM"
|
|
186 | 186 |
#fi |
tmp/org.txm.translate.rcp/src/org/txm/rcp/translate/ExportTranslateProject.java (revision 1222) | ||
---|---|---|
1 | 1 |
package org.txm.rcp.translate; |
2 | 2 |
|
3 |
import java.lang.reflect.InvocationTargetException; |
|
4 | 3 |
import java.util.ArrayList; |
5 | 4 |
|
6 | 5 |
import org.eclipse.core.commands.ExecutionEvent; |
7 | 6 |
import org.eclipse.core.commands.ExecutionException; |
8 |
import org.eclipse.core.commands.IHandler; |
|
9 |
import org.eclipse.core.commands.IHandlerListener; |
|
10 | 7 |
import org.eclipse.core.resources.IFile; |
11 | 8 |
import org.eclipse.core.resources.IFolder; |
12 | 9 |
import org.eclipse.core.resources.IProject; |
... | ... | |
36 | 33 |
} |
37 | 34 |
|
38 | 35 |
String path = Toolbox.getTxmHomePath()+"/translate.zip"; |
39 |
ArrayList propertiesFiles = new ArrayList<>();
|
|
36 |
ArrayList<IFile> propertiesFiles = new ArrayList<IFile>();
|
|
40 | 37 |
try { |
41 | 38 |
findPropertiesFile(newProject.getFolder("plugins"), propertiesFiles); |
42 | 39 |
} catch (CoreException e1) { |
43 |
// TODO Auto-generated catch block |
|
44 | 40 |
e1.printStackTrace(); |
45 | 41 |
return null; |
46 | 42 |
} |
... | ... | |
60 | 56 |
return null; |
61 | 57 |
} |
62 | 58 |
|
63 |
public static ArrayList findPropertiesFile(IResource r, ArrayList propertiesFiles) throws CoreException {
|
|
59 |
public static ArrayList<IFile> findPropertiesFile(IResource r, ArrayList<IFile> propertiesFiles) throws CoreException {
|
|
64 | 60 |
if (r instanceof IFolder) { |
65 | 61 |
IFolder dir = (IFolder)r; |
66 | 62 |
|
... | ... | |
71 | 67 |
IFile file = (IFile)r; |
72 | 68 |
String name = file.getName(); |
73 | 69 |
if (name.endsWith(".properties") && (name.startsWith("bundle") || name.startsWith("messages"))) { |
74 |
propertiesFiles.add(r);
|
|
70 |
propertiesFiles.add(file);
|
|
75 | 71 |
} |
76 | 72 |
} |
77 | 73 |
return propertiesFiles; |
tmp/org.txm.translate.rcp/src/org/txm/rcp/translate/FindUnusedTranslations.java (revision 1222) | ||
---|---|---|
1 |
package org.txm.rcp.translate; |
|
2 |
|
|
3 |
public class FindUnusedTranslations { |
|
4 |
|
|
5 |
} |
|
0 | 6 |
tmp/org.txm.translate.rcp/src/org/txm/rcp/translate/CreateTranslateProject.java (revision 1222) | ||
---|---|---|
59 | 59 |
a.run(); |
60 | 60 |
|
61 | 61 |
// show only the properties files |
62 |
ArrayList<IResource> propertiesFiles = new ArrayList<>();
|
|
62 |
ArrayList<IFile> propertiesFiles = new ArrayList<>();
|
|
63 | 63 |
ExportTranslateProject.findPropertiesFile(plugins, propertiesFiles); |
64 | 64 |
IResource[] elements = propertiesFiles.toArray(new IResource[propertiesFiles.size()]); |
65 | 65 |
|
... | ... | |
120 | 120 |
srcFolder.createLink(path, IResource.ALLOW_MISSING_LOCAL, cpb); |
121 | 121 |
|
122 | 122 |
// set the encoding bundle=iso-8859-1, messages=utf-8 |
123 |
ArrayList<IResource> propertiesFiles = new ArrayList<>();
|
|
123 |
ArrayList<IFile> propertiesFiles = new ArrayList<IFile>();
|
|
124 | 124 |
ExportTranslateProject.findPropertiesFile(srcFolder, propertiesFiles); |
125 | 125 |
for (IResource e : propertiesFiles) { |
126 | 126 |
IFile f = (IFile)e; |
tmp/org.txm.translate.rcp/src/org/txm/rcp/translate/FindMissingTranslations.java (revision 1222) | ||
---|---|---|
1 |
package org.txm.rcp.translate; |
|
2 |
|
|
3 |
public class FindMissingTranslations { |
|
4 |
|
|
5 |
} |
|
0 | 6 |
tmp/org.txm.rcp/src/main/java/org/txm/rcp/ApplicationWorkbenchAdvisor.java (revision 1222) | ||
---|---|---|
687 | 687 |
Log.info("Checking TXM user directory."); |
688 | 688 |
if (Toolbox.getTxmHomePath().trim().isEmpty()) { |
689 | 689 |
Version v = BundleUtils.getBundleVersion("org.txm.rcp"); |
690 |
|
|
690 |
if (v == null) { |
|
691 |
System.out.println("Error: no 'org.txm.rcp' version found."); |
|
692 |
return false; |
|
693 |
} |
|
691 | 694 |
String version = v.getMajor()+"."+v.getMinor()+"."+v.getMicro(); |
692 | 695 |
if ("qualifier".equals(v.getQualifier())) { |
693 | 696 |
System.out.println("RUNNING TXM FROM ECLIPSE - DEV MODE ACTIVATED"); |
tmp/org.txm.core/src/java/org/txm/utils/BundleUtils.java (revision 1222) | ||
---|---|---|
16 | 16 |
|
17 | 17 |
public class BundleUtils { |
18 | 18 |
|
19 |
protected static File INSTALLDIR = new File(System.getProperty("eclipse.launcher")).getParentFile().getParentFile(); |
|
19 |
// protected static File INSTALLDIR = new File(System.getProperty("eclipse.launcher")).getParentFile().getParentFile();
|
|
20 | 20 |
/** |
21 | 21 |
* |
22 | 22 |
* @param bundle_id the Bundle ID |
... | ... | |
112 | 112 |
return false; |
113 | 113 |
} |
114 | 114 |
} else { // jar file |
115 |
if (!bundleDir.exists()) { // get from the installed Toolbox |
|
116 |
bundleDir = new File(INSTALLDIR, "TXM/"+bundleLocation); |
|
117 |
} |
|
115 |
// if (!bundleDir.exists()) { // get from the installed Toolbox
|
|
116 |
// bundleDir = new File(INSTALLDIR, "TXM/"+bundleLocation);
|
|
117 |
// }
|
|
118 | 118 |
|
119 | 119 |
if (!Zip.extractOneFile(bundleDir, file_path+file_name, outfile, false)) { |
120 | 120 |
System.out.println("Extraction of ressource failed from "+bundleDir+" with path "+file_path+file_name); |
... | ... | |
157 | 157 |
return false; |
158 | 158 |
} |
159 | 159 |
} else { // jar file |
160 |
if (!bundleDir.exists()) { // get from the installed Toolbox |
|
161 |
bundleDir = new File(INSTALLDIR, "TXM/"+bundleLocation); |
|
162 |
} |
|
160 |
// if (!bundleDir.exists()) { // get from the installed Toolbox
|
|
161 |
// bundleDir = new File(INSTALLDIR, "TXM/"+bundleLocation);
|
|
162 |
// }
|
|
163 | 163 |
|
164 | 164 |
if (!Zip.extractOneFile(bundleDir, file_path+file_name, fileToReplace, true)) { |
165 | 165 |
System.out.println("Extraction of ressource failed from "+bundleDir+" with path "+file_path+file_name); |
Formats disponibles : Unified diff