Skip to content

Commit 5d42c8b

Browse files
madhavarshneymaxhora
authored andcommitted
Generate both .bat and .sh files - regardless of platform - when creating a new app
1 parent c8b01d0 commit 5d42c8b

File tree

1 file changed

+14
-6
lines changed

1 file changed

+14
-6
lines changed

local-cli/generator-desktop/index.js

+14-6
Original file line numberDiff line numberDiff line change
@@ -54,16 +54,24 @@ module.exports = yeoman.generators.NamedBase.extend({
5454
this.destinationPath(path.join('desktop', 'CMakeLists.txt')),
5555
templateParams
5656
);
57-
var buildScriptPath = process.platform === "win32" ? "build.bat" : "build.sh";
5857
this.fs.copyTpl(
59-
this.templatePath(buildScriptPath),
60-
this.destinationPath(path.join('desktop', buildScriptPath)),
58+
this.templatePath('build.bat'),
59+
this.destinationPath(path.join('desktop', 'build.bat')),
6160
templateParams
6261
);
63-
var runScriptPath = process.platform === "win32" ? "run-app.bat.in" : "run-app.sh.in";
6462
this.fs.copyTpl(
65-
this.templatePath(runScriptPath),
66-
this.destinationPath(path.join('desktop', runScriptPath)),
63+
this.templatePath('build.sh'),
64+
this.destinationPath(path.join('desktop', 'build.sh')),
65+
templateParams
66+
);
67+
this.fs.copyTpl(
68+
this.templatePath('run-app.bat.in'),
69+
this.destinationPath(path.join('desktop', 'run-app.bat.in')),
70+
templateParams
71+
);
72+
this.fs.copyTpl(
73+
this.templatePath('run-app.sh.in'),
74+
this.destinationPath(path.join('desktop', 'run-app.sh.in')),
6775
templateParams
6876
);
6977
this.fs.copyTpl(

0 commit comments

Comments
 (0)