diff options
Diffstat (limited to 'msvc')
-rw-r--r-- | msvc/scripts/System.Xml.pre | 2 | ||||
-rw-r--r-- | msvc/scripts/genproj.cs | 25 | ||||
-rw-r--r-- | msvc/scripts/mcs.pre | 1 | ||||
-rw-r--r-- | msvc/scripts/order.xml | 12 | ||||
-rw-r--r-- | msvc/scripts/prepare.cs | 23 | ||||
-rwxr-xr-x | msvc/setup-solution.bat | 11 |
6 files changed, 52 insertions, 22 deletions
diff --git a/msvc/scripts/System.Xml.pre b/msvc/scripts/System.Xml.pre index 01d437a4ab9..b04cdc3975a 100644 --- a/msvc/scripts/System.Xml.pre +++ b/msvc/scripts/System.Xml.pre @@ -1,4 +1,4 @@ -$(ProjectDir)\..\..\..\mono\msvc\scripts\prepare.exe $(ProjectDir)..\..
+$(ProjectDir)\..\..\..\mono\msvc\scripts\prepare.exe $(ProjectDir)..\.. xml
$(ProjectDir)\..\..\jay\jay.exe -ct < $(ProjectDir)\..\..\jay\skeleton.cs $(ProjectDir)\System.Xml.XPath\Parser.jay > $(ProjectDir)\System.Xml.XPath\Parser.cs
echo #define XSLT_PATTERN > $(ProjectDir)\Mono.Xml.Xsl\PatternParser.cs
$(ProjectDir)\..\..\jay\jay.exe -ct < $(ProjectDir)\..\..\jay\skeleton.cs $(ProjectDir)\Mono.Xml.Xsl\PatternParser.jay >> $(ProjectDir)\Mono.Xml.Xsl\PatternParser.cs
diff --git a/msvc/scripts/genproj.cs b/msvc/scripts/genproj.cs index 3793cfeb630..8f474f0e7cd 100644 --- a/msvc/scripts/genproj.cs +++ b/msvc/scripts/genproj.cs @@ -576,13 +576,20 @@ class MsbuildGenerator { } var refs = new StringBuilder (); + // + // mcs is different that csc in this regard, somehow with -noconfig we still import System and System.XML + // + if (dir == "mcs" && !load_default_config){ + references.Add ("System.dll"); + references.Add ("System.Xml.dll"); + } if (references.Count > 0 || reference_aliases.Count > 0){ refs.Append ("<ItemGroup>\n"); string last = mono_paths [0].Substring (mono_paths [0].LastIndexOf ('/') + 1); string hint_path = class_dir + "\\lib\\" + last; - + foreach (string r in references){ refs.Append (" <Reference Include=\"" + r + "\">\n"); refs.Append (" <SpecificVersion>False</SpecificVersion>\n"); @@ -601,9 +608,15 @@ class MsbuildGenerator { refs.Append (" <Aliases>" + alias + "</Aliases>\n"); refs.Append (" </Reference>\n"); } - + refs.Append (" </ItemGroup>\n"); } + + try { + Path.GetDirectoryName (library_output); + } catch { + Console.WriteLine ("Error in path: {0} while processing {1}", library_output, library); + } // // Replace the template values @@ -652,11 +665,11 @@ public class Driver { if (!(dir.StartsWith ("class") || dir.StartsWith ("mcs"))) continue; - Console.WriteLine ("dir={0} lib={1}", dir, library); // - // Do not do 2.1 for now, it is not working yet + // Do not do 2.1, it is not working yet + // Do not do basic, as there is no point (requires a system mcs to be installed). // - if (library.Contains ("net_2_1")) + if (library.Contains ("net_2_1") || library.Contains ("-basic")) continue; var gen = new MsbuildGenerator (dir); @@ -668,4 +681,4 @@ public class Driver { } } -}
\ No newline at end of file +} diff --git a/msvc/scripts/mcs.pre b/msvc/scripts/mcs.pre new file mode 100644 index 00000000000..0c19d3a7dc6 --- /dev/null +++ b/msvc/scripts/mcs.pre @@ -0,0 +1 @@ +$(ProjectDir)\..\jay\jay.exe -ct < $(ProjectDir)\..\jay\skeleton.cs $(ProjectDir)\cs-parser.jay > $(ProjectDir)\cs-parser.cs
diff --git a/msvc/scripts/order.xml b/msvc/scripts/order.xml index 7eedb642114..d40d4511002 100644 --- a/msvc/scripts/order.xml +++ b/msvc/scripts/order.xml @@ -5,7 +5,7 @@ <mcs>mcs</mcs> <flags>/codepage:65001 -optimize -d:NET_1_1 -d:ONLY_1_1 -d:BOOTSTRAP_WITH_OLDLIB /noconfig</flags> <output>./../class/lib/basic/mcs.exe</output> - <built_sources></built_sources> + <built_sources>cs-parser.cs</built_sources> <library_output>./../class/lib/basic/mcs.exe</library_output> <response>mcs.exe.sources</response> </project> @@ -50,7 +50,7 @@ <mcs>MONO_PATH=./../class/lib/basic: /cvs/mono/runtime/mono-wrapper ./../class/lib/basic/mcs.exe</mcs> <flags>/codepage:65001 -optimize -d:NET_1_1 -d:ONLY_1_1 /noconfig</flags> <output>./../class/lib/net_1_1_bootstrap/mcs.exe</output> - <built_sources></built_sources> + <built_sources>cs-parser.cs</built_sources> <library_output>./../class/lib/net_1_1_bootstrap/mcs.exe</library_output> <response>mcs.exe.sources</response> </project> @@ -176,7 +176,7 @@ <mcs>MONO_PATH=./../class/lib/net_1_1_bootstrap: /cvs/mono/runtime/mono-wrapper ./../class/lib/net_1_1_bootstrap/mcs.exe</mcs> <flags>/codepage:65001 -optimize -d:NET_1_1 -d:ONLY_1_1 -debug /noconfig</flags> <output>./../class/lib/net_1_1/mcs.exe</output> - <built_sources></built_sources> + <built_sources>cs-parser.cs</built_sources> <library_output>./../class/lib/net_1_1/mcs.exe</library_output> <response>mcs.exe.sources</response> </project> @@ -1364,7 +1364,7 @@ <mcs>MONO_PATH=./../class/lib/net_2_0_bootstrap: /cvs/mono/runtime/mono-wrapper ./../class/lib/net_2_0_bootstrap/gmcs.exe</mcs> <flags>/codepage:65001 -d:GMCS_SOURCE -optimize -d:NET_1_1 -d:NET_2_0 -debug /noconfig</flags> <output>./../class/lib/net_2_0/gmcs.exe</output> - <built_sources></built_sources> + <built_sources>cs-parser.cs</built_sources> <library_output>./../class/lib/net_2_0/gmcs.exe</library_output> <response>gmcs.exe.sources</response> </project> @@ -2570,7 +2570,7 @@ <mcs>MONO_PATH=./../class/lib/net_2_0: /cvs/mono/runtime/mono-wrapper ./../mcs/gmcs.exe</mcs> <flags>/codepage:65001 -d:GMCS_SOURCE -d:SMCS_SOURCE -optimize -d:NET_1_1 -d:NET_2_0 -d:NET_2_1 -debug /noconfig</flags> <output>./../class/lib/net_2_1_bootstrap/smcs.exe</output> - <built_sources></built_sources> + <built_sources>cs-parser.cs</built_sources> <library_output>./../class/lib/net_2_1_bootstrap/smcs.exe</library_output> <response>smcs.exe.sources</response> </project> @@ -2606,7 +2606,7 @@ <mcs>MONO_PATH=./../class/lib/net_2_1_bootstrap: /cvs/mono/runtime/mono-wrapper --security=temporary-smcs-hack ./../class/lib/net_2_1_bootstrap/smcs.exe</mcs> <flags>/codepage:65001 -d:GMCS_SOURCE -d:SMCS_SOURCE -optimize -d:NET_1_1 -d:NET_2_0 -d:NET_2_1 -debug /noconfig</flags> <output>./../class/lib/net_2_1_raw/smcs.exe</output> - <built_sources></built_sources> + <built_sources>cs-parser.cs</built_sources> <library_output>./../class/lib/net_2_1_raw/smcs.exe</library_output> <response>smcs.exe.sources</response> </project> diff --git a/msvc/scripts/prepare.cs b/msvc/scripts/prepare.cs index 3dc3b3cd47a..3615896fb11 100644 --- a/msvc/scripts/prepare.cs +++ b/msvc/scripts/prepare.cs @@ -26,14 +26,23 @@ class Prepare { Console.Error.WriteLine ("The directory {0} does not contain class at {1}", Path.GetFullPath (bdir), Environment.CurrentDirectory); Environment.Exit (1); } - - Filter (bdir + "/class/System.XML/System.Xml.XPath/Parser.jay", - bdir + "/class/System.XML/Mono.Xml.Xsl/PatternParser.jay", - (i, o) => o.Write (i.ReadToEnd ().Replace ("%start Expr", "%start Pattern"))); - Filter (bdir + "/build/common/Consts.cs.in", - bdir + "/build/common/Consts.cs", - (i, o) => o.Write (i.ReadToEnd ().Replace ("@MONO_VERSION@", "Mono-VSBuild"))); + switch (args [1]){ + case "xml": + Filter (bdir + "/class/System.XML/System.Xml.XPath/Parser.jay", + bdir + "/class/System.XML/Mono.Xml.Xsl/PatternParser.jay", + (i, o) => o.Write (i.ReadToEnd ().Replace ("%start Expr", "%start Pattern"))); + + Filter (bdir + "/build/common/Consts.cs.in", + bdir + "/build/common/Consts.cs", + (i, o) => o.Write (i.ReadToEnd ().Replace ("@MONO_VERSION@", "Mono-VSBuild"))); + break; + + default: + Console.Error.WriteLine ("Unknonw option to prepare.exe {0}", args [1]); + Environment.Exit (1); + break; + } } } diff --git a/msvc/setup-solution.bat b/msvc/setup-solution.bat index 3f516ff7687..74355d89681 100755 --- a/msvc/setup-solution.bat +++ b/msvc/setup-solution.bat @@ -1,12 +1,19 @@ @echo off
csc -debug -out:scripts\monowrap.exe scripts\monowrap.cs
+if errorlevel 1 goto error
csc -nowarn:414 -debug -out:scripts\genproj.exe scripts\genproj.cs
+if errorlevel 1 goto error
csc -debug -out:scripts\prepare.exe scripts\prepare.cs
+if errorlevel 1 goto error
cd scripts
-prepare.exe
+if errorlevel 1 goto error
genproj.exe
+if errorlevel 1 goto error
cd ..
echo Setup complete, you need at least a mcs\class\lib\basic directory with
echo mcs.exe mscorlib.dll System.dll System.Xml.dll
echo to bootstrap
-
+goto end
+: error
+echo Error: solution is not configured.
+:end
\ No newline at end of file |