Révision 2186
tmp/org.txm.groovy.core/src/java/org/txm/groovy/core/InstallGroovyFiles.java (revision 2186) | ||
---|---|---|
25 | 25 |
public boolean do_install(Workspace workspace) { |
26 | 26 |
File txmhomedir = new File(Toolbox.getTxmHomePath()); |
27 | 27 |
|
28 |
String version = GroovyPreferences.getInstance().getString(GroovyPreferences.VERSION); |
|
28 |
// String version = GroovyPreferences.getInstance().getString(GroovyPreferences.VERSION); |
|
29 |
// |
|
30 |
// boolean doInstall = false; |
|
31 |
// Version installedVersion = BundleUtils.getBundleVersion("org.txm.groovy.core"); |
|
32 |
// if (version != null && version.length() > 0) { |
|
33 |
// Version v = new Version(version); |
|
34 |
// |
|
35 |
// doInstall = v.compareTo(installedVersion) > 0; |
|
36 |
// Log.fine("Groovy installed version: "+installedVersion+" preferenced version: "+v+" -> "+doInstall); |
|
37 |
// } else { |
|
38 |
// doInstall = true; |
|
39 |
// GroovyPreferences.getInstance().put(GroovyPreferences.VERSION, installedVersion.toString()); |
|
40 |
// } |
|
41 |
// |
|
42 |
// if (!doInstall) return true; // nothing to do |
|
29 | 43 |
|
30 |
boolean doInstall = false; |
|
31 |
Version installedVersion = BundleUtils.getBundleVersion("org.txm.groovy.core"); |
|
32 |
if (version != null && version.length() > 0) { |
|
33 |
Version v = new Version(version); |
|
34 |
|
|
35 |
doInstall = v.compareTo(installedVersion) > 0; |
|
36 |
Log.fine("Groovy installed version: "+installedVersion+" preferenced version: "+v+" -> "+doInstall); |
|
37 |
} else { |
|
38 |
doInstall = true; |
|
39 |
GroovyPreferences.getInstance().put(GroovyPreferences.VERSION, installedVersion.toString()); |
|
40 |
} |
|
41 |
|
|
42 |
if (!doInstall) return true; // nothing to do |
|
43 |
|
|
44 | 44 |
for (String folder : createfolders) { |
45 | 45 |
new File(txmhomedir, folder).mkdirs(); |
46 | 46 |
} |
Formats disponibles : Unified diff