From 61df21a190e490f48b9fd99d01ecd33922294248 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ignacio=20Rold=C3=A1n=20Etchevery?= Date: Fri, 21 May 2021 07:17:21 +0200 Subject: [PATCH] iOS BCL: Build dummy `Xamarin.iOS.dll` which is necessary Fixes godotengine/godot#42960 --- bcl.py | 19 +++++++++++++++++++ files/xi.cs | 15 +++++++++++++++ files/xi.snk | Bin 0 -> 596 bytes 3 files changed, 34 insertions(+) create mode 100644 files/xi.cs create mode 100644 files/xi.snk diff --git a/bcl.py b/bcl.py index 65b661f..86672d6 100755 --- a/bcl.py +++ b/bcl.py @@ -178,6 +178,25 @@ def make_product(opts: BclOpts, product: str): run_command('csc', android_env_csc_args) + # (custom 'Xamarin.iOS.dll') + if product == 'ios': + this_script_dir = os.path.dirname(os.path.realpath(__file__)) + monotouch_profile_dir = '%s/%s' % (install_dir, 'monotouch') + refs = ['mscorlib.dll', 'System.Net.Http.dll'] + + mkdir_p(monotouch_profile_dir) + + android_env_csc_args = [ + path_join(this_script_dir, 'files', 'xi.cs'), + '-keyfile:' + path_join(this_script_dir, 'files', 'xi.snk'), + '-out:%s' % path_join(monotouch_profile_dir, 'Xamarin.iOS.dll'), + '-optimize', '-deterministic', '-publicsign', '-target:library', + '-nostdlib', '-noconfig', '-langversion:latest' + ] + android_env_csc_args += ['-r:%s' % path_join(monotouch_profile_dir, r) for r in refs] + + run_command('csc', android_env_csc_args) + def clean_product(opts: BclOpts, product: str): clean_bcl(opts) diff --git a/files/xi.cs b/files/xi.cs new file mode 100644 index 0000000..b159d0a --- /dev/null +++ b/files/xi.cs @@ -0,0 +1,15 @@ +using System.Net.Http; + +[assembly:System.Reflection.AssemblyVersionAttribute ("0.0.0.0")] +[assembly:System.Runtime.CompilerServices.InternalsVisibleTo ("System.Net.Http, PublicKey=002400000480000094000000060200000024000052534131000400000100010007d1fa57c4aed9f0a32e84aa0faefd0de9e8fd6aec8f87fb03766c834c99921eb23be79ad9d5dcc1dd9ad236132102900b723cf980957fc4e177108fc607774f29e8320e92ea05ece4e821c0a5efe8f1645c4c0c93c1ab99285d622caa652c1dfad63d745d6f2de5f17e5eaf0fc4963d261c8a12436518206dc093344d5ad293")] + +namespace ObjCRuntime +{ + internal class RuntimeOptions + { + internal static HttpMessageHandler GetHttpMessageHandler() + { + return new HttpClientHandler(); + } + } +} diff --git a/files/xi.snk b/files/xi.snk new file mode 100644 index 0000000000000000000000000000000000000000..8c04e53be9de10b0b93a858762a6ccde7dd1ca75 GIT binary patch literal 596 zcmV-a0;~N80ssI2Bme+XQ$aES1ONaL0000(io&I=`|)hOD=SB)Ct~t*-<+~}TTPF;b1{7hv6%mFR)5O_04Fitw-g>%N%Si&>{ zSRwtWdJE{F)db&GPArqMxOkFZLQp=PRNwEPm4?~o^NKK6X;^z5;2&%R5HgD_mowWH zMegva_k_~F+ptW3+aeX%(;%V0RKO-_AT*Xf+mET>`|XD5-PrCIW8%vbixYKqk}OM% z+&Yj$#9?yOJI>?x7e&Q(-V zj+t=o2V%=|T&Fia5DhX}Y06y!%W zJlB#>Aipg}OZEQMgqb=}Oq8Z$hvHz90}Mx}obUvcD6L53gpqN8K@*~L>|VSP*k}WC z5atuLdt0s#;|OACYKz^;jFE!EQf(>@>Ke zQg8oCN$DFQqP<^XPrUgvtZtCALBAjnC{g&EC6F_++=)Uo{56ouZv~$$M&=3gocLg1 ziBf^E>~2capQt02#+x<@96{-@XP0eB)+OEr_!lnYQOI_3liA{$Zkg-_A1Uoh5>|tQ ipO_W%UW4{Ol(<6x7pyuYYn@jSz!JD1zG&IMEAfC3aUh2P literal 0 HcmV?d00001