mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
use Windows file separator in SetOutPath in idea_win.nsh
should be like SetOutPath $INSTDIR\plugins\android\lib\templates\other\Daydream File "/opt/buildAgent/work/c2d8dfcc72679944/out/release/dist.all.ce/plugins/android/lib/templates/other/Daydream/globals.xml.ftl" File "/opt/buildAgent/work/c2d8dfcc72679944/out/release/dist.all.ce/plugins/android/lib/templates/other/Daydream/recipe.xml.ftl" File "/opt/buildAgent/work/c2d8dfcc72679944/out/release/dist.all.ce/plugins/android/lib/templates/other/Daydream/template.xml"
This commit is contained in:
Binary file not shown.
@@ -25,6 +25,7 @@ import java.io.File;
|
||||
import java.io.FileWriter;
|
||||
import java.io.IOException;
|
||||
import java.util.*;
|
||||
import java.util.regex.Matcher;
|
||||
|
||||
/**
|
||||
* Ant task to facilitate building NSIS installer.
|
||||
@@ -118,10 +119,10 @@ public class NsiFiles extends MatchingTask {
|
||||
for (String file : allFiles) {
|
||||
uninstWriter.newLine();
|
||||
final String relPath = myAbsoluteToRelative.get(file);
|
||||
uninstWriter.write("Delete \"$INSTDIR\\" + relPath + "\"");
|
||||
uninstWriter.write("Delete \"$INSTDIR\\" + toWinPath(relPath) + "\"");
|
||||
if (relPath.endsWith(".py")) {
|
||||
uninstWriter.newLine();
|
||||
uninstWriter.write("Delete \"$INSTDIR\\" + relPath + "c\""); // .pyc
|
||||
uninstWriter.write("Delete \"$INSTDIR\\" + toWinPath(relPath) + "c\""); // .pyc
|
||||
}
|
||||
}
|
||||
|
||||
@@ -132,9 +133,9 @@ public class NsiFiles extends MatchingTask {
|
||||
final String dir = dirs.get(i);
|
||||
if (dir.length() == 0) continue;
|
||||
uninstWriter.newLine();
|
||||
uninstWriter.write("RmDir /r \"$INSTDIR\\" + dir + "\\__pycache__\"");
|
||||
uninstWriter.write("RmDir /r \"$INSTDIR\\" + toWinPath(dir) + "\\__pycache__\"");
|
||||
uninstWriter.newLine();
|
||||
uninstWriter.write("RmDir \"$INSTDIR\\" + dir + "\"");
|
||||
uninstWriter.write("RmDir \"$INSTDIR\\" + toWinPath(dir) + "\"");
|
||||
}
|
||||
uninstWriter.newLine();
|
||||
uninstWriter.write("RmDir \"$INSTDIR\"");
|
||||
@@ -154,7 +155,7 @@ public class NsiFiles extends MatchingTask {
|
||||
instWriter.newLine();
|
||||
instWriter.newLine();
|
||||
if (dir.length() > 0) {
|
||||
instWriter.write("SetOutPath $INSTDIR\\" + dir);
|
||||
instWriter.write("SetOutPath $INSTDIR" + "\\" + toWinPath(dir));
|
||||
}
|
||||
else {
|
||||
instWriter.write("SetOutPath $INSTDIR");
|
||||
@@ -171,6 +172,10 @@ public class NsiFiles extends MatchingTask {
|
||||
}
|
||||
}
|
||||
|
||||
private static String toWinPath(String dir) {
|
||||
return File.separatorChar == '\\' ? dir : dir.replaceAll(File.separator, Matcher.quoteReplacement("\\"));
|
||||
}
|
||||
|
||||
private void processFileSet(final FileSet fileSet) throws IOException {
|
||||
final DirectoryScanner scanner = fileSet.getDirectoryScanner(getProject());
|
||||
final String[] files = scanner.getIncludedFiles();
|
||||
|
||||
Reference in New Issue
Block a user