|
1 | 1 | <?xml version="1.0" encoding="UTF-8"?> |
2 | | -<project name = "module-ruby" basedir = "."> |
| 2 | +<project name="module-ruby" basedir="."> |
3 | 3 |
|
4 | | - <dirname property = "project.basedir" file = "${ant.file.module-ruby}" /> |
5 | | - <property name = "root.dir" location = "${project.basedir}/.." /> |
6 | | - <property name = "build.properties" value = "${project.basedir}/build.properties" /> |
7 | | - <property file = "${build.properties}" /> |
| 4 | + <dirname property="project.basedir" file="${ant.file.module-ruby}" /> |
| 5 | + <property name="root.dir" location="${project.basedir}/.." /> |
| 6 | + <property name="build.properties" value="${project.basedir}/build.properties" /> |
| 7 | + <property file="${build.properties}" /> |
8 | 8 |
|
9 | 9 | <!-- Bearsampp dev --> |
10 | | - <property name = "dev.path" location = "${root.dir}/dev" /> |
11 | | - <fail unless = "dev.path" message = "Project 'dev' not found in ${dev.path}" /> |
12 | | - <echo message = "Bearsampp dev found in ${dev.path}" level = "debug" /> |
| 10 | + <property name="dev.path" location="${root.dir}/dev" /> |
| 11 | + <fail unless="dev.path" message="Project 'dev' not found in ${dev.path}" /> |
| 12 | + <echo message="Bearsampp dev found in ${dev.path}" level="debug" /> |
13 | 13 |
|
14 | 14 | <!-- Import build-commons.xml --> |
15 | | - <import file = "${dev.path}/build/build-commons.xml" /> |
| 15 | + <import file="${dev.path}/build/build-commons.xml" /> |
16 | 16 | <!-- Import build-bundle.xml --> |
17 | | - <import file = "${dev.path}/build/build-bundle.xml" /> |
18 | | - |
19 | | - <target name = "release.build"> |
20 | | - <basename property = "bundle.folder" file = "${bundle.path}" /> |
21 | | - <replaceproperty src = "bundle.folder" dest = "bundle.version" replace = "${bundle.name}" with = "" /> |
22 | | - |
23 | | - <getmoduleuntouched name = "${bundle.name}" version = "${bundle.version}" propSrcDest = "bundle.srcdest" propSrcFilename = "bundle.srcfilename" /> |
24 | | - |
25 | | - <echo message = "=======" /> |
26 | | - <echo message = "Bundle.srcdest: ${bundle.srcdest}" /> |
27 | | - <echo message = "Bundle.name: ${bundle.name}" /> |
28 | | - <echo message = "Bundle.version: ${bundle.version}" /> |
29 | | - <echo message = "Bundle.folder: ${bundle.folder}" /> |
30 | | - <echo message = "Bundle.path: ${bundle.path}" /> |
31 | | - <echo message = "Bundle.srcfilename: ${bundle.srcfilename}" /> |
32 | | - <echo message = "Input.Bundle: ${input.bundle}" /> |
33 | | - <echo message = "Bundle.filename: ${bundle.filename}" /> |
| 17 | + <import file="${dev.path}/build/build-bundle.xml" /> |
| 18 | + |
| 19 | + <target name="release.build"> |
| 20 | + <basename property="bundle.folder" file="${bundle.path}" /> |
| 21 | + <replaceproperty src="bundle.folder" dest="bundle.version" replace="${bundle.name}" with="" /> |
| 22 | + |
| 23 | + <getmoduleuntouched name="${bundle.name}" version="${bundle.version}" propSrcDest="bundle.srcdest" propSrcFilename="bundle.srcfilename" /> |
| 24 | + |
| 25 | + <!-- Check if ruby.exe exists in the rubyinstaller-x64 directory --> |
| 26 | + <available file="${bundle.srcdest}/rubyinstaller-${bundle.version}-x64/bin/ruby.exe" property="rubyinstaller.exists" /> |
| 27 | + |
| 28 | + <!-- Move files if ruby.exe exists --> |
| 29 | + <if> |
| 30 | + <isset property="rubyinstaller.exists" /> |
| 31 | + <then> |
| 32 | + <echo message="Moving files from rubyinstaller-${bundle.version}-x64 to ${bundle.srcdest}" /> |
| 33 | + <move todir="${bundle.srcdest}"> |
| 34 | + <fileset dir="${bundle.srcdest}/rubyinstaller-${bundle.version}-x64" /> |
| 35 | + </move> |
| 36 | + <delete dir="${bundle.srcdest}/rubyinstaller-${bundle.version}-x64" /> |
| 37 | + </then> |
| 38 | + </if> |
| 39 | + |
| 40 | + <echo message="=======" /> |
| 41 | + <echo message="Bundle.srcdest: ${bundle.srcdest}" /> |
| 42 | + <echo message="Bundle.name: ${bundle.name}" /> |
| 43 | + <echo message="Bundle.version: ${bundle.version}" /> |
| 44 | + <echo message="Bundle.folder: ${bundle.folder}" /> |
| 45 | + <echo message="Bundle.path: ${bundle.path}" /> |
| 46 | + <echo message="Bundle.srcfilename: ${bundle.srcfilename}" /> |
| 47 | + <echo message="Input.Bundle: ${input.bundle}" /> |
| 48 | + <echo message="Bundle.filename: ${bundle.filename}" /> |
34 | 49 | <echo message="idk: ${project.basedir}/bin/${bundle.name}${input.bundle}" /> |
35 | | - <echo message = "=======" /> |
| 50 | + <echo message="=======" /> |
36 | 51 |
|
37 | | - <assertfile file = "${bundle.srcdest}/bin/ruby.exe" /> |
| 52 | + <assertfile file="${bundle.srcdest}/bin/ruby.exe" /> |
38 | 53 |
|
39 | 54 | <!-- Temp copy --> |
40 | | - <copy todir = "${bundle.srcdest}" overwrite = "true"> |
41 | | - <fileset dir = "${bundle.path}" defaultexcludes = "yes" /> |
| 55 | + <copy todir="${bundle.srcdest}" overwrite="true"> |
| 56 | + <fileset dir="${bundle.path}" defaultexcludes="yes" /> |
42 | 57 | </copy> |
43 | 58 |
|
44 | 59 | <!-- Download RubyGems --> |
45 | | - <echo message = "Download RubyGems" /> |
46 | | - <property name = "rubygems.path" location = "${bundle.srcdest}/rubygems" /> |
47 | | - <property file = "${rubygems.path}/rubygems.properties" /> |
48 | | - <mkdir dir = "${rubygems.path}" /> |
49 | | - <get dest = "${rubygems.path}/rubygems-update.gem" src = "${rubygems}" skipexisting = "true" /> |
| 60 | + <echo message="Download RubyGems" /> |
| 61 | + <property name="rubygems.path" location="${bundle.srcdest}/rubygems" /> |
| 62 | + <property file="${rubygems.path}/rubygems.properties" /> |
| 63 | + <mkdir dir="${rubygems.path}" /> |
| 64 | + <get dest="${rubygems.path}/rubygems-update.gem" src="${rubygems}" skipexisting="true" /> |
50 | 65 |
|
51 | 66 | <!-- Install RubyGems --> |
52 | | - <echo message = "Install RubyGems" /> |
53 | | - <exec executable = "${rubygems.path}/install.bat" dir = "${rubygems.path}" failonerror = "true" /> |
54 | | - <delete dir = "${rubygems.path}" /> |
55 | | - <assertfile file = "${bundle.srcdest}/bin/update_rubygems.bat" /> |
| 67 | + <echo message="Install RubyGems" /> |
| 68 | + <exec executable="${rubygems.path}/install.bat" dir="${rubygems.path}" failonerror="true" /> |
| 69 | + <delete dir="${rubygems.path}" /> |
| 70 | + <assertfile file="${bundle.srcdest}/bin/update_rubygems.bat" /> |
56 | 71 |
|
57 | 72 | <!-- Update RubyGems --> |
58 | | - <echo message = "Update RubyGems" /> |
59 | | - <exec executable = "${bundle.srcdest}/bin/update_rubygems.bat" dir = "${bundle.srcdest}/bin" failonerror = "true" /> |
| 73 | + <echo message="Update RubyGems" /> |
| 74 | + <exec executable="${bundle.srcdest}/bin/update_rubygems.bat" dir="${bundle.srcdest}/bin" failonerror="true" /> |
60 | 75 |
|
61 | 76 | <!-- Check RubyGems version --> |
62 | | - <echo message = "Check RubyGems version" /> |
63 | | - <exec executable = "${bundle.srcdest}/bin/gem.bat" dir = "${bundle.srcdest}/bin" failonerror = "true"> |
64 | | - <arg value = "--version" /> |
| 77 | + <echo message="Check RubyGems version" /> |
| 78 | + <exec executable="${bundle.srcdest}/bin/gem.bat" dir="${bundle.srcdest}/bin" failonerror="true"> |
| 79 | + <arg value="--version" /> |
65 | 80 | </exec> |
66 | 81 |
|
67 | 82 | <!-- Update paths --> |
68 | | - <echo message = "Update paths" /> |
69 | | - <replace dir = "${bundle.srcdest}/bin" token = "${bundle.srcdest}" value = "~BEARSAMPP_LIN_PATH~/tools/ruby/ruby${bundle.version}"> |
70 | | - <exclude name = "*.dll,*.exe" /> |
| 83 | + <echo message="Update paths" /> |
| 84 | + <replace dir="${bundle.srcdest}/bin" token="${bundle.srcdest}" value="~BEARSAMPP_LIN_PATH~/tools/ruby/ruby${bundle.version}"> |
| 85 | + <exclude name="*.dll,*.exe" /> |
71 | 86 | </replace> |
72 | 87 |
|
73 | | - <delete dir = "${bundle.tmp.prep.path}/${bundle.folder}" /> |
74 | | - <mkdir dir = "${bundle.tmp.prep.path}/${bundle.folder}" /> |
75 | | - <copy todir = "${bundle.tmp.prep.path}/${bundle.folder}" overwrite = "true"> |
76 | | - <fileset dir = "${bundle.srcdest}" /> |
| 88 | + <delete dir="${bundle.tmp.prep.path}/${bundle.folder}" /> |
| 89 | + <mkdir dir="${bundle.tmp.prep.path}/${bundle.folder}" /> |
| 90 | + <copy todir="${bundle.tmp.prep.path}/${bundle.folder}" overwrite="true"> |
| 91 | + <fileset dir="${bundle.srcdest}" /> |
77 | 92 | </copy> |
78 | | - <copy todir = "${bundle.tmp.prep.path}/${bundle.folder}" overwrite = "true"> |
79 | | - <fileset dir = "${bundle.path}" defaultexcludes = "yes" excludes = " |
80 | | - rubygems/**" |
81 | | - /> |
| 93 | + <copy todir="${bundle.tmp.prep.path}/${bundle.folder}" overwrite="true"> |
| 94 | + <fileset dir="${bundle.path}" defaultexcludes="yes" excludes="rubygems/**" /> |
82 | 95 | </copy> |
83 | 96 | </target> |
84 | 97 |
|
|
0 commit comments