diff options
author | Alexander Köplinger <alex.koeplinger@outlook.com> | 2017-11-09 02:56:11 +0300 |
---|---|---|
committer | Alexander Köplinger <alex.koeplinger@outlook.com> | 2017-11-09 05:56:45 +0300 |
commit | 614c25caffead591da9703f7ee5e9094834dae13 (patch) | |
tree | b237e7517245181bd87ef2dfb4639674a2c40a92 /generate-refasm-sources.sh | |
parent | 63e7ddd179386b31186185eadddbf5c8fb4880cd (diff) |
Update README with new steps
Move shell commands into separate script and make it more robust.
Diffstat (limited to 'generate-refasm-sources.sh')
-rwxr-xr-x | generate-refasm-sources.sh | 33 |
1 files changed, 33 insertions, 0 deletions
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 |