Ticket #8085 (closed bug: fixed)

Opened 16 months ago

Last modified 12 months ago

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:
Blocking: Blocked by:

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

comment:1 Changed 15 months ago by joern.zaefferer

  • Status changed from new to closed
  • Resolution set to wontfix

We're moving away from Ant (and Make), likely going to adopt grunt, which is built on nodejs and runs on Windows.

comment:2 Changed 15 months ago by scott.gonzalez

  • Status changed from closed to reopened
  • Resolution wontfix deleted

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 14 months ago by aifam5

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

Last edited 14 months ago by aifam5 (previous) (diff)

comment:4 Changed 14 months ago by scott.gonzalez

@aifam5 We don't use ant anymore.

comment:5 Changed 14 months ago by joern.zaefferer

Still need to improve the grunt build to work on Windows and remove the old build dir though.

comment:6 Changed 12 months ago by scott.gonzalez

  • Status changed from reopened to closed
  • Resolution set to fixed

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.

Note: See TracTickets for help on using tickets.