Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Executable names for windows #18

Closed
ackzell opened this issue Mar 30, 2014 · 1 comment
Closed

Executable names for windows #18

ackzell opened this issue Mar 30, 2014 · 1 comment

Comments

@ackzell
Copy link

ackzell commented Mar 30, 2014

Hi,

I'm not sure if I should regard this as an issue, but nonetheless I would like to share my findings.

I (innocently enough) gave my app a name that has spaces in it, only to find that when I tried to build it (grunt dist-win) an error was thrown:

Running "createWindowsApp" task
The syntax of the command is incorrect.
>> Error: Command failed:
Warning: Task "createWindowsApp" failed. Use --force to continue.

Aborted due to warnings.

So I went ahead and looked into the Grunt.js file. Line 152 is where the error was thrown:

 exec('copy /b tmp\\nw.exe+tmp\\app.nw tmp\\name with spaces.exe && del tmp\\app.nw tmp\\nw.exe', function (error, stdout, stderr) {

Once I removed the spaces, the zip file was created. (although using the original name, because of line 95)

  archive: '<%= config.dist %>/name with spaces.zip'
Running "createWindowsApp" task
tmp\nw.exe
tmp\app.nw
        1 file(s) copied.

Running "compress:finalWindowsApp" (compress) task
Created dist/name with spaces.zip (28903351 bytes)

Done, without errors.

So, I'm not sure what the best way to tackle this is, maybe removing the white spaces (replacing them with another character like '_'), or perhaps alerting the user that this will cause trouble on windows environments.

Anyways, I thought I would share this just in case anyone runs into something similar.

Thanks for the hard work!

@JayGray
Copy link
Member

JayGray commented Mar 31, 2014

Hi @ackzell ,
thanks for sharing your experience and this detailed information. I would also prefer to replace whitespaces for creating the zip file with either '_' or 'camelCaseLize'. I don't know if it is necessary to prompt the user about the renaming because it is only for creating the zip, all other places where the name comes up should remain unaffected.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants