Search and Top Navigation
#8085 closed bug (fixed)
Opened February 01, 2012 11:24AM UTC
Closed May 15, 2012 07:56PM UTC
Building git repo of jQuery-UI on windows os
Reported by: | dalibor983 | Owned by: | |
---|---|---|---|
Priority: | minor | Milestone: | 1.9.0 |
Component: | [meta] ui.build | Version: | 1.8.17 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
I tried to build jQuery-UI on windows with cygwin and apache-ant and I got this error:
''Execute failed: java.io.IOException: Cannot run program "build\\minify-js.sh":
CreateProcess error=193, %1 is not a valid Win32 application''
In build.xml I found this:
<apply executable="build/minify-js.sh"> <fileset dir="${dist.dir}/ui" includes="**.js" /> <srcfile /> <mapper type="glob" from="*.js" to="${min.dir}/*.min.js" /> <targetfile/> </apply>
On google I found that running shell script with ant should be colled with "sh", "bash" or "cmd" command so I changed build.xml script like this:
<apply executable="bash"> <arg line="-c build/minify-js.sh" /> <fileset dir="${dist.dir}/ui" includes="**.js" /> <srcfile /> <mapper type="glob" from="*.js" to="${min.dir}/*.min.js" /> <targetfile/> </apply>
but the commad that this ant script generate is:
''bash -c build/minify-js.sh <sourcefile> <targetfile>''
So "bash" run "build/minify-js.sh" but ignore <sourcefile> and <targetfile>.
The correct command would be:
''bash -c "build/minify-js.sh <sourcefile> <targetfile>"''
but I don't know how to achieve this with "apply" ant task.
Is there any way to build this repo on widnows? Please help.
Attachments (0)
Change History (6)
Changed February 24, 2012 12:29PM UTC by comment:1
resolution: | → wontfix |
---|---|
status: | new → closed |
Changed February 24, 2012 12:37PM UTC by comment:2
resolution: | wontfix |
---|---|
status: | closed → reopened |
We still need to fix the fact that our build system doesn't work on Windows. The fact that we're moving away from ant doesn't mean we're not fixing the bug.
Changed April 08, 2012 08:54PM UTC by comment:3
_comment0: | Hi, I found something that might fix the error (in my work, I signed up in order to show you it). Well: \ The file "minify-js.sh" in the directory "build\\build" should preferably contain a form: \ \ {{{ \ #!/bin/bash \ dir=$(dirname $0) \ node.exe "$dir/uglify.js" "$1" > "$2" \ }}} \ \ Contrast, the file "build.xml" in the directory "build", the line from 120 to 133 swap on: \ \ {{{ \ <apply executable="dash"> \ <arg line="build/minify-js.sh" /> \ <fileset dir="${dist.dir}/ui" includes="**.js" /> \ <srcfile /> \ <mapper type="glob" from="*.js" to="${min.dir}/*.min.js" /> \ <targetfile/> \ </apply> \ <apply executable="dash"> \ <arg line="build/minify-js.sh" /> \ <fileset dir="${dist.dir}/ui/i18n" includes="**.js" /> \ <srcfile /> \ <mapper type="glob" from="*.js" to="${min.dir}/i18n/*.min.js" /> \ <targetfile/> \ </apply> \ }}} \ \ Instead of "dash" may be any other terminal, but remember that you must add the argument, for example: "bash -c" \ \ Regards, Aifam5 → 1333918730835294 |
---|
Hi, I found something that might fix the error (in my work, I signed up in order to show you it). Well:
The file "minify-js.sh" in the directory "build\\build" should preferably contain a form:
#!/bin/bash dir=$(dirname $0) node.exe "$dir/uglify.js" "$1" > "$2"
Contrast, the file "build.xml" in the directory "build", the line from 120 to 133 swap on:
<apply executable="dash"> <arg line="build/minify-js.sh" /> <fileset dir="${dist.dir}/ui" includes="**.js" /> <srcfile /> <mapper type="glob" from="*.js" to="${min.dir}/*.min.js" /> <targetfile/> </apply> <apply executable="dash"> <arg line="build/minify-js.sh" /> <fileset dir="${dist.dir}/ui/i18n" includes="**.js" /> <srcfile /> <mapper type="glob" from="*.js" to="${min.dir}/i18n/*.min.js" /> <targetfile/> </apply>
Instead of "dash" may be any other terminal, but remember that you must add the argument, for example: "bash -c"
REMEMBER, you must have installed the latest "NodeJS" and "Apache Ant" and added them to the PATH system environment. They have to be images in a directory without spaces, for example: "C:\\ant" and "C:\\nodejs"
Regards, Aifam5
Changed April 09, 2012 11:42AM UTC by comment:4
@aifam5 We don't use ant anymore.
Changed April 09, 2012 12:11PM UTC by comment:5
Still need to improve the grunt build to work on Windows and remove the old build dir though.
Changed May 15, 2012 07:56PM UTC by comment:6
resolution: | → fixed |
---|---|
status: | reopened → closed |
This works now. You just need to install zip.exe from http://stahlworks.com/dev/index.php?tool=zipunzip and put it in your PATH.
We're moving away from Ant (and Make), likely going to adopt grunt, which is built on nodejs and runs on Windows.