Opened 12 years ago
Closed 11 years ago
#8085 closed bug (fixed)
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.
Change History (6)
comment:1 Changed 12 years ago by
Resolution: | → wontfix |
---|---|
Status: | new → closed |
comment:2 Changed 12 years ago by
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.
comment:3 Changed 11 years ago by
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
comment:5 Changed 11 years ago by
Still need to improve the grunt build to work on Windows and remove the old build dir though.
comment:6 Changed 11 years ago by
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.