Index: TXM/trunk/org.txm.libs.cqp.linux/res/linux32/libcqpjni.so.gz
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Index: TXM/trunk/org.txm.libs.cqp.linux/res/linux32/cwb-decode.gz
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Index: TXM/trunk/org.txm.libs.cqp.linux/res/linux32/cwb-align-encode.gz
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Index: TXM/trunk/org.txm.libs.cqp.linux/res/linux32/cwb-makeall.gz
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Index: TXM/trunk/org.txm.libs.cqp.linux/res/linux32/cqp.gz
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Index: TXM/trunk/org.txm.libs.cqp.linux/res/linux32/cwb-align.gz
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Index: TXM/trunk/org.txm.libs.cqp.linux/res/linux32/cwb-encode.gz
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Index: TXM/trunk/org.txm.libs.cqp.linux/res/linux32/cqpserver.gz
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Index: TXM/trunk/org.txm.searchengine.cqp.core/src/org/txm/importer/cwb/CompressCQPIndexes.java
===================================================================
--- TXM/trunk/org.txm.searchengine.cqp.core/src/org/txm/importer/cwb/CompressCQPIndexes.java	(revision 3543)
+++ TXM/trunk/org.txm.searchengine.cqp.core/src/org/txm/importer/cwb/CompressCQPIndexes.java	(revision 3544)
@@ -128,7 +128,7 @@
 			return false;
 		}
 		
-		// remove .corpus files if the compression was succesful
+		// remove .corpus files if the compression was successful
 		int s = 0;
 		int a = 0;
 		for (File f : dataDirectory.listFiles()) {
@@ -151,7 +151,7 @@
 			}
 		}
 		
-		// remove .corpus.rdx and corpus.rev files if the compression was succesful
+		// remove .corpus.rdx and corpus.rev files if the compression was successful
 		for (File f : dataDirectory.listFiles()) {
 			if (f.getName().endsWith(".corpus.rdx") ||f.getName().endsWith(".corpus.rev")) {
 				
Index: TXM/trunk/org.txm.groovy.core/src/groovy/org/txm/macro/AddMacroMacro.groovy
===================================================================
--- TXM/trunk/org.txm.groovy.core/src/groovy/org/txm/macro/AddMacroMacro.groovy	(revision 3543)
+++ TXM/trunk/org.txm.groovy.core/src/groovy/org/txm/macro/AddMacroMacro.groovy	(revision 3544)
@@ -14,8 +14,8 @@
 
 // BEGINNING OF PARAMETERS
 
-@Field @Option(name="files", usage="an example file", widget="FilesOpen", metaVar="*.groovy;*.jar", required=true, def="")
-def files
+@Field @Option(name="groovyFiles", usage="Groovy files to install", widget="FilesOpen", metaVar="*.groovy", required=true, def="")
+def groovyFiles
 
 // Open the parameters input dialog box
 if (!ParametersDialog.open(this)) return
@@ -24,7 +24,7 @@
 
 File rootDir = new File(Toolbox.getTxmHomePath(), "scripts/groovy/")
 
-for (File f : files) {
+for (File f : groovyFiles) {
 
 	if (!f.isFile()) continue;
 	
Index: TXM/trunk/org.txm.groovy.core/src/groovy/org/txm/macro/AddLibraryMacro.groovy
===================================================================
--- TXM/trunk/org.txm.groovy.core/src/groovy/org/txm/macro/AddLibraryMacro.groovy	(revision 0)
+++ TXM/trunk/org.txm.groovy.core/src/groovy/org/txm/macro/AddLibraryMacro.groovy	(revision 3544)
@@ -0,0 +1,74 @@
+// Copyright © 2022 MY_INSTITUTION
+// Licensed under the terms of the GNU General Public License version 3 (http://www.gnu.org/licenses/gpl-3.0.html)
+// @author mdecorde
+
+// STANDARD DECLARATIONS
+package org.txm.macro
+
+import org.kohsuke.args4j.*
+import groovy.transform.Field
+import org.txm.rcp.swt.widget.parameters.*
+import org.txm.Toolbox;
+import org.txm.utils.io.FileCopy
+import org.txm.rcp.views.fileexplorer.MacroExplorer
+
+// BEGINNING OF PARAMETERS
+
+@Field @Option(name="jarFiles", usage="JAR files to install", widget="FilesOpen", metaVar="*.jar", required=true, def="")
+def jarFiles
+
+// Open the parameters input dialog box
+if (!ParametersDialog.open(this)) return
+
+// END OF PARAMETERS
+
+File rootDir = new File(Toolbox.getTxmHomePath(), "scripts/groovy/")
+
+for (File f : jarFiles) {
+
+	if (!f.isFile()) continue;
+	
+	if (f.getName().endsWith(".jar")) {
+	
+		File f2 = new File(rootDir, "lib/"+f.getName())
+		if (f2.exists()) {
+			println "Updating library $f2"
+			f2.delete()
+		} else {
+			println "New library: $f2"
+		}
+		FileCopy.copy(f, f2)
+		
+	} else if (f.getName().endsWith(".groovy")) {
+	
+		String ppackage = "org.txm.macro"
+		def content = f.readLines("UTF-8")
+		for (def line : content) {
+			if (line.startsWith("package org.txm.macro")) {
+				ppackage = line.substring(8)
+				break
+			}
+		}
+		
+		File f2 = new File(rootDir, "user/"+ppackage.replace(".", "/")+ "/"+ f.getName())
+		if (f2.exists()) {
+			println "Update macro: $f2"
+			f2.delete()
+		} else {
+			println "New macro: $f2"
+		}
+		f2.getParentFile().mkdirs()
+		
+		FileCopy.copy(f, f2)
+		
+	} else {
+		println "Ignoring $f"
+	}
+}
+
+// update macros view
+monitor.syncExec(new Runnable() {
+		public void run() {
+			MacroExplorer.refresh();
+		}
+	});
Index: TXM/trunk/org.txm.groovy.core/src/groovy/org/txm/macro/cqp/CompressCQPIndexesMacro.groovy
===================================================================
--- TXM/trunk/org.txm.groovy.core/src/groovy/org/txm/macro/cqp/CompressCQPIndexesMacro.groovy	(revision 0)
+++ TXM/trunk/org.txm.groovy.core/src/groovy/org/txm/macro/cqp/CompressCQPIndexesMacro.groovy	(revision 3544)
@@ -0,0 +1,63 @@
+// Copyright © 2022 ENS de Lyon, CNRS, University of Franche-Comté
+// Licensed under the terms of the GNU General Public License (http://www.gnu.org/licenses)
+// @author sheiden
+
+package org.txm.macro.commands
+
+// STANDARD DECLARATIONS
+import org.txm.rcpapplication.swt.widget.parameters.*
+import org.txm.searchengine.cqp.CQPPreferences
+import org.txm.searchengine.cqp.corpus.MainCorpus
+import org.txm.importer.cwb.CompressCQPIndexes
+import org.txm.libs.cqp.CQPLibPreferences
+
+// Open the parameters input dialog box
+if (!ParametersDialog.open(this)) return false
+
+if (!(corpusViewSelection instanceof MainCorpus)) {
+	println "** $scriptName: please select a MainCorpus in the Corpus view."
+	return 0
+}
+
+MainCorpus corpus = corpusViewSelection
+
+File registry = corpus.getRegistryFile()
+File data = corpus.getDataDirectory()
+
+File wordCorpusFile = new File(data, "word.corpus")
+if (!wordCorpusFile.exists()) {
+	println "Corpus already compressed or broken"
+	return
+}
+
+try {
+			String userdir = System.getProperty("user.home");
+			String cqilib = CQPLibPreferences.getInstance().getString(CQPLibPreferences.CQI_SERVER_PATH_TO_CQPLIB);
+			String exec_path = CQPLibPreferences.getInstance().getString(CQPLibPreferences.CQI_SERVER_PATH_TO_EXECUTABLE);
+			File toolsDir = null;
+			if (!cqilib.isEmpty()) {
+				toolsDir = new File(cqilib)
+				if (!toolsDir.exists()) {
+					toolsDir = null;
+				}
+			}
+			
+			if (!exec_path.isEmpty()) {
+				toolsDir = new File(exec_path).getParentFile()
+				if (!toolsDir.exists()) {
+					toolsDir = null;
+				}
+			}
+			
+			if (toolsDir == null) {
+				println "Could not findout the CQP tools directory. Aboorting."
+				return;
+			}
+			
+			
+			
+			CompressCQPIndexes.compressAll(toolsDir, registry, corpus.getProject().getName(), data, true);
+			
+		} catch (Exception e) {
+			e.printStackTrace();
+		}
\ No newline at end of file
