Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/reference-assemblies.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander Köplinger <alex.koeplinger@outlook.com>2017-11-09 02:56:11 +0300
committerAlexander Köplinger <alex.koeplinger@outlook.com>2017-11-09 05:56:45 +0300
commit614c25caffead591da9703f7ee5e9094834dae13 (patch)
treeb237e7517245181bd87ef2dfb4639674a2c40a92
parent63e7ddd179386b31186185eadddbf5c8fb4880cd (diff)
Update README with new steps
Move shell commands into separate script and make it more robust.
-rw-r--r--README.md44
-rwxr-xr-xgenerate-refasm-sources.sh33
2 files changed, 56 insertions, 21 deletions
diff --git a/README.md b/README.md
index cd04eeb..395983f 100644
--- a/README.md
+++ b/README.md
@@ -1,26 +1,28 @@
-Mono binary reference assemblies repository.
+Mono binary reference assemblies
+================================
Built using csc 2.1.0.
-Use the following steps to add a new .NET profile:
+Adding a new .NET profile
+-------------------------
-```bash
-NETFXPROFILE=v4.7.1
+Use the following steps (we're using 4.7.1 as example):
-
-cd $NETFXPROFILE-ms
-for i in *.dll; do mono ../../api-snapshot/tools/genapi/GenAPI.exe -assembly:$i -out:../src/$NETFXPROFILE -typeforwardedTo -assemblyVersion -assemblyAttributes -headerFile:../../api-snapshot/profiles/license-header.txt -libPath:.; done
-
-cd ../src/$NETFXPROFILE
-for i in *.cs; do sed -i "" 's/AssemblyCompanyAttribute("Microsoft Corporation")/AssemblyCompanyAttribute("Mono development team")/g' $i; done
-for i in *.cs; do sed -i "" 's/AssemblyCopyrightAttribute("© Microsoft Corporation. All rights reserved.")/AssemblyCopyrightAttribute("(c) Various Mono authors")/g' $i; done
-for i in *.cs; do sed -i "" 's/AssemblyProductAttribute("Microsoft® .NET Framework")/AssemblyProductAttribute("Mono Common Language Infrastructure")/g' $i; done
-for i in *.cs; do sed -i "" '/.*AssemblySignatureKeyAttribute(.*]/d' $i; done
-for i in *.cs; do sed -i "" '/.*InternalsVisibleToAttribute(.*]/d' $i; done
-for i in *.cs; do sed -i "" '/.*DependencyAttribute(.*]/d' $i; done
-
-... Revert changes to Accessibility.cs, Microsoft.VisualC.cs and Microsoft.VisualBasic.cs (bug in GenApi) ...
-... Revert changes to System.Workflow.*.cs, System.Web.Mobile.cs and System.Deployment.cs (we only have stub assemblies) ...
-... Revert changes to System.Web.WebPages.*.cs, System.Web.Http.*.cs, System.Web.Razor.cs, System.Web.Mvc.cs, System.Net.Http.Formatting.cs and System.Json.Microsoft.cs (wrong AssemblyCompanyAttribute sed replacement) ...
-... Revert changes that remove #if / #endif ...
-``` \ No newline at end of file
+1. Copy existing `v4.7/Makefile` and `src/v4.7/*` to new folders and commit
+2. Update `PROFILE` variable in `v4.7.1/Makefile`
+3. Wire up new profile in `Makefile` in repo root
+4. Run the generation script `./generate-refasm-sources.sh v4.7.1 some/path/to/netfx/referenceassemblies`
+5. Revert deletion of `*.extra.cs`
+6. Revert changes that remove `#if / #endif`
+7. Revert suspicious changes to:
+ - `Accessibility.cs` (bug in GenApi)
+ - `Microsoft.VisualBasic.cs` (bug in GenApi and wrong AssemblyCopyright/Product attribute)
+ - `Microsoft.VisualC.cs` (bug in GenApi)
+ - `System.Data.Linq.cs` (bug in GenApi)
+ - `System.Deployment.cs` (we only have stub assemblies)
+ - `System.Runtime.DurableInstancing.cs` (bug in GenApi)
+ - `System.Security.cs` (bug in GenApi)
+ - `System.Web.Mobile.cs` (we only have stub assemblies)
+ - `System.Workflow.*.cs` (we only have stub assemblies)
+8. Add new assemblies/facades to `v4.7.1/Makefile`
+9. Run `make -C v4.7.1` and ensure everything compiles
diff --git a/generate-refasm-sources.sh b/generate-refasm-sources.sh
new file mode 100755
index 0000000..0783896
--- /dev/null
+++ b/generate-refasm-sources.sh
@@ -0,0 +1,33 @@
+#!/bin/bash -e
+
+REPODIR=$( cd "$(dirname "${BASH_SOURCE[0]}")" && pwd )
+NETFXPROFILE=$1
+NETFXSOURCE=$( cd "$2" && pwd )
+
+if [ "x$NETFXPROFILE" = "x" ]; then echo "No profile specified."; exit 1; fi
+if [ ! -d "$NETFXSOURCE" ]; then echo "Reference assemblies folder doesn't exist."; exit 1; fi
+
+rm -f "$REPODIR/src/$NETFXPROFILE"/*.cs
+rm -f "$REPODIR/src/$NETFXPROFILE/Facades"/*.cs
+
+cd "$NETFXSOURCE"
+for i in *.dll Facades/*.dll; do
+ if [ "$i" = "System.EnterpriseServices.Thunk.dll" ] || [ "$i" = "System.EnterpriseServices.Wrapper.dll" ]; then continue; fi;
+
+ outpath="$REPODIR/src/$NETFXPROFILE"
+ if [[ "$i" = "Facades"* ]]; then outpath="$outpath/Facades"; fi
+
+ echo "Processing $i"
+ mono "$REPODIR/../api-snapshot/tools/genapi/GenAPI.exe" -assembly:"$i" -out:"$outpath" -typeforwardedTo -assemblyVersion -assemblyAttributes -headerFile:"$REPODIR/../api-snapshot/profiles/license-header.txt" -libPath:"$NETFXSOURCE"
+done
+
+cd "$REPODIR/src/$NETFXPROFILE"
+for i in *.cs Facades/*.cs; do sed -i "" 's/AssemblyCompanyAttribute("Microsoft Corporation")/AssemblyCompanyAttribute("Mono development team")/g' "$i"; done
+for i in *.cs Facades/*.cs; do sed -i "" 's/AssemblyCopyrightAttribute("© Microsoft Corporation. All rights reserved.")/AssemblyCopyrightAttribute("(c) Various Mono authors")/g' "$i"; done
+for i in *.cs Facades/*.cs; do sed -i "" 's/AssemblyProductAttribute("Microsoft® .NET Framework")/AssemblyProductAttribute("Mono Common Language Infrastructure")/g' "$i"; done
+for i in *.cs Facades/*.cs; do sed -i "" '/.*AssemblySignatureKeyAttribute(.*]/d' "$i"; done
+for i in *.cs Facades/*.cs; do sed -i "" '/.*InternalsVisibleToAttribute(.*]/d' "$i"; done
+for i in *.cs Facades/*.cs; do sed -i "" '/.*DependencyAttribute(.*]/d' "$i"; done
+
+# remove assembly that we don't have in Mono
+rm ISymWrapper.cs Microsoft.Activities.Build.cs Microsoft.Build.Conversion.v4.0.cs Microsoft.JScript.cs Microsoft.VisualBasic.Compatibility.cs Microsoft.VisualBasic.Compatibility.Data.cs Microsoft.VisualC.STLCLR.cs PresentationBuildTasks.cs PresentationCore.cs PresentationFramework.Aero.cs PresentationFramework.Aero2.cs PresentationFramework.AeroLite.cs PresentationFramework.Classic.cs PresentationFramework.cs PresentationFramework.Luna.cs PresentationFramework.Royale.cs ReachFramework.cs sysglobl.cs System.Activities.Core.Presentation.cs System.Activities.cs System.Activities.DurableInstancing.cs System.Activities.Presentation.cs System.AddIn.Contract.cs System.AddIn.cs System.ComponentModel.Composition.Registration.cs System.Data.Entity.Design.cs System.Data.Services.Design.cs System.Data.SqlXml.cs System.Device.cs System.DirectoryServices.AccountManagement.cs System.IdentityModel.Services.cs System.IO.Log.cs System.Management.Instrumentation.cs System.Printing.cs System.ServiceModel.Activities.cs System.ServiceModel.Channels.cs System.Speech.cs System.Web.DataVisualization.cs System.Web.DataVisualization.Design.cs System.Web.DynamicData.Design.cs System.Web.Entity.cs System.Web.Entity.Design.cs System.Windows.Controls.Ribbon.cs System.Windows.Forms.DataVisualization.Design.cs System.Windows.Input.Manipulations.cs System.Windows.Presentation.cs System.WorkflowServices.cs UIAutomationClient.cs UIAutomationClientsideProviders.cs UIAutomationProvider.cs UIAutomationTypes.cs WindowsFormsIntegration.cs XamlBuildTask.cs