Index: tmp/org.txm.rcp.feature/build.properties
===================================================================
--- tmp/org.txm.rcp.feature/build.properties	(revision 2073)
+++ tmp/org.txm.rcp.feature/build.properties	(revision 2074)
@@ -6,7 +6,7 @@
 root.folder.redist/css=../org.txm.core/res/org/txm/css/
 root.macosx.cocoa.x86_64=mac/
 root=../org.txm.setups/shared/all
-root.linux.gtk.x86_64.permissions.755=jre/bin/java,plugins/org.txm.libs.cqp.linux/res/linux32/,plugins/org.txm.libs.cqp.linux/res/linux64/,plugins/org.txm.statsengine.r.core.linux/res/linux64/bin
+root.linux.gtk.x86_64.permissions.755=jre/bin/java,plugins/org.txm.libs.cqp.linux/res/linux32/,plugins/org.txm.libs.cqp.linux/res/linux64/,plugins/org.txm.statsengine.r.core.linux/res/linux64/bin/R,plugins/org.txm.statsengine.r.core.linux/res/linux64/bin/exec/R
 root.linux.gtk.x86_64=linux/
-root.macosx.cocoa.x86_64.permissions.755=jre/bin/java,plugins/org.txm.libs.cqp.macosx/res/macosx/,plugins/org.txm.statsengine.r.core.macosx/res/macosx/bin
+root.macosx.cocoa.x86_64.permissions.755=jre/bin/java,plugins/org.txm.libs.cqp.macosx/res/macosx/,plugins/org.txm.statsengine.r.core.macosx/res/macosx/bin/R,plugins/org.txm.statsengine.r.core.macosx/res/macosx/bin/exec/R
 qualifier=svn
Index: tmp/org.txm.analec.rcp/src/org/txm/macro/urs/export/ExportAsMacro.groovy
===================================================================
--- tmp/org.txm.analec.rcp/src/org/txm/macro/urs/export/ExportAsMacro.groovy	(revision 2073)
+++ tmp/org.txm.analec.rcp/src/org/txm/macro/urs/export/ExportAsMacro.groovy	(revision 2074)
@@ -19,6 +19,7 @@
 import org.txm.searchengine.cqp.corpus.query.CQLQuery
 import org.txm.utils.io.FileCopy;
 import org.txm.utils.io.IOUtils
+import org.txm.utils.zip.Zip
 
 import visuAnalec.elements.*
 
@@ -46,7 +47,7 @@
 	return false
 }
 
-visuAnalec.donnees.Corpus analecCorpus = URSCorpora.getCorpus(mainCorpus.getName())
+visuAnalec.donnees.Corpus analecCorpus = URSCorpora.getCorpus(mainCorpus)
 if (analecCorpus.isModifie()) {
 	println "Selected Analec corpus is not saved. Aborting"
 	return false
@@ -87,20 +88,27 @@
 File registryFile2 = new File(newBinDirectory, "registry/${new_name.toLowerCase()}")
 File txmFile2 = new File(newBinDirectory, "txm/${new_name}")
 
-println ecFile.renameTo(ecFile2)
-println ecvFile.renameTo(ecvFile2)
-println cssFile.renameTo(cssFile2)
-println dataFile.renameTo(dataFile2)
-println htmlFile.renameTo(htmlFile2)
-println defaultCSSFile.renameTo(defaultCSSFile2)
-println registryFile.renameTo(registryFile2)
-println txmFile.renameTo(txmFile2)
+println "renaming $ecFile : "+ecFile.renameTo(ecFile2)
+println "renaming $ecvFile : "+ecvFile.renameTo(ecvFile2)
+println "renaming $cssFile : "+cssFile.renameTo(cssFile2)
+println "renaming $dataFile : "+dataFile.renameTo(dataFile2)
+println "renaming $htmlFile : "+htmlFile.renameTo(htmlFile2)
+println "renaming $defaultCSSFile : "+defaultCSSFile.renameTo(defaultCSSFile2)
+println "renaming $registryFile : "+registryFile.renameTo(registryFile2)
+println "renaming $txmFile : "+txmFile.renameTo(txmFile2)
 
 // patch name in settings
-File projectPrefs = new File(newBinDirectory, ".settings/"+mainCorpus.getProject().getParametersNodePath())
-File maincorpusPrefs = new File(newBinDirectory, ".settings/"+mainCorpus.getParametersNodePath())
+println "replacing old name $name ->  ${new_name}"
+String node = mainCorpus.getProject().getParametersNodePath()
+node = node.substring(node.lastIndexOf("/"))
+File projectPrefs = new File(newBinDirectory, ".settings/"+node+".prefs")
+node = mainCorpus.getParametersNodePath()
+node = node.substring(node.lastIndexOf("/"))
+File maincorpusPrefs = new File(newBinDirectory, ".settings/"+node+".prefs")
 IOUtils.write(projectPrefs, projectPrefs.getText().replace(name, new_name))
-IOUtils.write(maincorpusPrefs, projectPrefs.getText().replace(name, new_name))
+IOUtils.write(maincorpusPrefs, maincorpusPrefs.getText().replace(name, new_name))
+File projectSetting = new File(newBinDirectory, ".project")
+IOUtils.write(projectSetting, projectSetting.getText().replace(name, new_name))
 
 // patch registry
 String oldcontent = registryFile2.getText();
