Skip to content

Commit

Permalink
Implemented sh-dave's fix for --from --to behavior. Fixes #23.
Browse files Browse the repository at this point in the history
  • Loading branch information
RobDangerous committed Dec 17, 2015
1 parent ed8d648 commit fc5361b
Showing 1 changed file with 14 additions and 6 deletions.
20 changes: 14 additions & 6 deletions HaxeProject.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ function IntelliJ(projectdir, options) {
sources += ' <sourceFolder url="file://' + options.sources[i] + '" isTestSource="false" />\n';
}
else {
sources += ' <sourceFolder url="file://$MODULE_DIR$/' + path.relative(outdir, path.join(options.from, options.sources[i])).replaceAll('\\', '/') + '" isTestSource="false" />\n';
sources += ' <sourceFolder url="file://$MODULE_DIR$/' + path.relative(outdir, path.resolve(options.from, options.sources[i])).replaceAll('\\', '/') + '" isTestSource="false" />\n';
}
}

Expand Down Expand Up @@ -79,7 +79,7 @@ function hxml(projectdir, options) {
data += '-cp ' + options.sources[i] + '\n';
}
else {
data += '-cp ' + path.relative(projectdir, path.join(options.from, options.sources[i])) + '\n'; // from.resolve('build').relativize(from.resolve(this.sources[i])).toString());
data += '-cp ' + path.relative(projectdir, path.resolve(options.from, options.sources[i])) + '\n'; // from.resolve('build').relativize(from.resolve(this.sources[i])).toString());
}
}
for (let d in options.defines) {
Expand Down Expand Up @@ -194,10 +194,18 @@ function FlashDevelop(projectdir, options) {
};

for (let i = 0; i < options.sources.length; ++i) {
classpaths.e.push({
n: 'class',
path: path.relative(projectdir, path.join(options.from, options.sources[i]))
});
if (path.isAbsolute(options.sources[i])) {
classpaths.e.push({
n: 'class',
path: options.sources[i]
});
}
else {
classpaths.e.push({
n: 'class',
path: path.relative(projectdir, path.resolve(options.from, options.sources[i]))
});
}
}

let otheroptions = [
Expand Down

0 comments on commit fc5361b

Please sign in to comment.