From d16168120418594a557cef6087618fca88e4afe4 Mon Sep 17 00:00:00 2001 From: "gu.martinm@gmail.com" Date: Mon, 23 Jun 2014 20:44:56 +0200 Subject: [PATCH] Embedded Mono: test --- Allgemeines/MonoEmbedded/MonoEmbedded.exe | Bin 0 -> 3584 bytes Allgemeines/MonoEmbedded/MonoEmbedded.sln | 20 +++++++ .../MonoEmbedded/MonoEmbedded/MonoEmbedded.csproj | 42 +++++++++++++++ Allgemeines/MonoEmbedded/MonoEmbedded/Program.cs | 17 ++++++ .../MonoEmbedded/Properties/AssemblyInfo.cs | 22 ++++++++ Allgemeines/MonoEmbedded/UnManagedCode/Makefile | 8 +++ Allgemeines/MonoEmbedded/UnManagedCode/test | Bin 0 -> 24496 bytes Allgemeines/MonoEmbedded/UnManagedCode/test.c | 58 +++++++++++++++++++++ 8 files changed, 167 insertions(+) create mode 100755 Allgemeines/MonoEmbedded/MonoEmbedded.exe create mode 100644 Allgemeines/MonoEmbedded/MonoEmbedded.sln create mode 100644 Allgemeines/MonoEmbedded/MonoEmbedded/MonoEmbedded.csproj create mode 100644 Allgemeines/MonoEmbedded/MonoEmbedded/Program.cs create mode 100644 Allgemeines/MonoEmbedded/MonoEmbedded/Properties/AssemblyInfo.cs create mode 100644 Allgemeines/MonoEmbedded/UnManagedCode/Makefile create mode 100755 Allgemeines/MonoEmbedded/UnManagedCode/test create mode 100644 Allgemeines/MonoEmbedded/UnManagedCode/test.c diff --git a/Allgemeines/MonoEmbedded/MonoEmbedded.exe b/Allgemeines/MonoEmbedded/MonoEmbedded.exe new file mode 100755 index 0000000000000000000000000000000000000000..bf0b855444ab69718eb5224fab4ef56bcda0c15e GIT binary patch literal 3584 zcmeHJO>9(E6#j01Ncm|k5fJ>rR|{GYpHo``2*S{IfJ$2`GgLxM=$o0#^ue3=Chxt{ z)`ei=Z=#Wy$jZ1-6Nn4Kf<$6s!oq|Vu8bR9bYbGsoeL%4ckY{Mr!5#ZuJBCnx##bm zd(OG{p4Z_M7tjcxiR12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Wy`opS zp$B*`J>IQB-o8`3RRWt#cgj&KcQT^h;k|RI^^N`mw;Mmz5|J) zvLH^2wrM;K}N+R9s<&!wAPI>oUaFR{n(Ak{;9ml?9(9<*}3R3~}oK4bCfB9fQr zb7UByyyGH&f(3T+YojnkzGPNO#udz%NK1U*^8ZW8)Ie&~Lp$?{W`0tG`E|)jh~F~( zNH0n3WRD?!%M|Z|WM48TA@SAnm1w2H!2RO1shu_!a_+M4D18OYVAAxq#kKD;wO?qn ZxT=-}_OO7J{2z98`@@p(|9RF|;2%a-!Y%*+ literal 0 HcmV?d00001 diff --git a/Allgemeines/MonoEmbedded/MonoEmbedded.sln b/Allgemeines/MonoEmbedded/MonoEmbedded.sln new file mode 100644 index 0000000..1acdd99 --- /dev/null +++ b/Allgemeines/MonoEmbedded/MonoEmbedded.sln @@ -0,0 +1,20 @@ + +Microsoft Visual Studio Solution File, Format Version 11.00 +# Visual Studio 2010 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MonoEmbedded", "MonoEmbedded\MonoEmbedded.csproj", "{0EB75D00-2FC6-4B53-A24D-D982CAC42EA7}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|x86 = Debug|x86 + Release|x86 = Release|x86 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {0EB75D00-2FC6-4B53-A24D-D982CAC42EA7}.Debug|x86.ActiveCfg = Debug|x86 + {0EB75D00-2FC6-4B53-A24D-D982CAC42EA7}.Debug|x86.Build.0 = Debug|x86 + {0EB75D00-2FC6-4B53-A24D-D982CAC42EA7}.Release|x86.ActiveCfg = Release|x86 + {0EB75D00-2FC6-4B53-A24D-D982CAC42EA7}.Release|x86.Build.0 = Release|x86 + EndGlobalSection + GlobalSection(MonoDevelopProperties) = preSolution + StartupItem = MonoEmbedded\MonoEmbedded.csproj + EndGlobalSection +EndGlobal diff --git a/Allgemeines/MonoEmbedded/MonoEmbedded/MonoEmbedded.csproj b/Allgemeines/MonoEmbedded/MonoEmbedded/MonoEmbedded.csproj new file mode 100644 index 0000000..6d8aeda --- /dev/null +++ b/Allgemeines/MonoEmbedded/MonoEmbedded/MonoEmbedded.csproj @@ -0,0 +1,42 @@ + + + + Debug + x86 + 10.0.0 + 2.0 + {0EB75D00-2FC6-4B53-A24D-D982CAC42EA7} + Exe + MonoEmbedded + MonoEmbedded + v4.5 + + + true + full + false + bin\Debug + DEBUG; + prompt + 4 + true + x86 + + + full + true + bin\Release + prompt + 4 + true + x86 + + + + + + + + + + \ No newline at end of file diff --git a/Allgemeines/MonoEmbedded/MonoEmbedded/Program.cs b/Allgemeines/MonoEmbedded/MonoEmbedded/Program.cs new file mode 100644 index 0000000..491712b --- /dev/null +++ b/Allgemeines/MonoEmbedded/MonoEmbedded/Program.cs @@ -0,0 +1,17 @@ +using System; +using System.Runtime.CompilerServices; + +namespace MonoEmbedded +{ + class MainClass + { + public static void Main(string[] args) + { + Print("characters like \u00D6 are working? (should be an O with ¨ above it)"); + Print("More characters: ÜÖüöÇç)"); + } + + [MethodImpl(MethodImplOptions.InternalCall)] + public static extern void Print(string msg); + } +} diff --git a/Allgemeines/MonoEmbedded/MonoEmbedded/Properties/AssemblyInfo.cs b/Allgemeines/MonoEmbedded/MonoEmbedded/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..e368a39 --- /dev/null +++ b/Allgemeines/MonoEmbedded/MonoEmbedded/Properties/AssemblyInfo.cs @@ -0,0 +1,22 @@ +using System.Reflection; +using System.Runtime.CompilerServices; + +// Information about this assembly is defined by the following attributes. +// Change them to the values specific to your project. +[assembly: AssemblyTitle ("MonoEmbedded")] +[assembly: AssemblyDescription ("")] +[assembly: AssemblyConfiguration ("")] +[assembly: AssemblyCompany ("")] +[assembly: AssemblyProduct ("")] +[assembly: AssemblyCopyright ("gmm003es")] +[assembly: AssemblyTrademark ("")] +[assembly: AssemblyCulture ("")] +// The assembly version has the format "{Major}.{Minor}.{Build}.{Revision}". +// The form "{Major}.{Minor}.*" will automatically update the build and revision, +// and "{Major}.{Minor}.{Build}.*" will update just the revision. +[assembly: AssemblyVersion ("1.0.*")] +// The following attributes are used to specify the signing key for the assembly, +// if desired. See the Mono documentation for more information about signing. +//[assembly: AssemblyDelaySign(false)] +//[assembly: AssemblyKeyFile("")] + diff --git a/Allgemeines/MonoEmbedded/UnManagedCode/Makefile b/Allgemeines/MonoEmbedded/UnManagedCode/Makefile new file mode 100644 index 0000000..e69e844 --- /dev/null +++ b/Allgemeines/MonoEmbedded/UnManagedCode/Makefile @@ -0,0 +1,8 @@ +all: test + +test: test.c + g++ -Wall -g -o test test.c `pkg-config --cflags --libs /usr/mymono/lib/pkgconfig/monosgen-2.pc` + +clean: + rm -f test + diff --git a/Allgemeines/MonoEmbedded/UnManagedCode/test b/Allgemeines/MonoEmbedded/UnManagedCode/test new file mode 100755 index 0000000000000000000000000000000000000000..60bd3ea6f1d4ec5a7f74c37c6761badaf6c8c976 GIT binary patch literal 24496 zcmch93w)H-nfEy}Ntk3ZA&@}0RYnPNQF0?-K!iaECKxnw@vbkEnaKraGI3^-fJ((u zZBuKD)^)A5F70+*ZPlgSR;^UP(iXK=vEQe4*IxMS4Xj$)wbojd@BcrSxn;6-`~803 z3wfXOT+cbrxjpYY=RG&HcC2wpDeUDE%LTE4@c~8BcOed*r%*#{5gri`v&Ctm1e9X@ z1r&!+rz|{ZOk3zNa&EvPrd@{M3h0D^Gc+bFv?U~Dewiy^k{X^_tx*ew@GAoKSk?x^ zZ>Zj^=oYrHK)61cHtttAi$}dqqt|Kl($JK@(?DB4){TEN41Iut>y?VrEqW2e_#_N6y}{_Je< zPRAeHu?&B_CgHC}rG)SS&cvT_lQ%V>LA1eOinoDOqc>XUB?)&BK*KaLd_0rtd7duw9zWBPY`qg`z zx?XwXl^^}`-twjY=sorQw@RPdv95R0UFEB+t$a8FLLnbFf$q;22EK9(dMO&Dke$PD zOd)#381nC-Qx%ezW60CDe*EQMtH#Keqr;ys4E)S7@_i1xLghI)20cCo{o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=O-4b*Ox#qbbjLAG3-18dS!w3`pFpfr{e*k(7A+7hHlRb zv*#7A1)b+A9-R57YSo;QPK$xZc{(j zMkA?6xNdR768;!lKu8_Dr(d68+e<2em-p(0TX--Q!v+KM`b}Z#=gk~Zvm1-=%RBHZ zhkZeOdB<61|3fE!3gn&v`xC_F&G>2XL;hIWhw}gn{lf38S-)~!tJ8YHY95fOyk*ix z`ocA9Hnie6!#o++Y>~g-qaG_v*_oSh=o!mEg-mbJ!q$ zHi;vdbCzZxppO?cM;vAjG&E+i+IoyrJ$XW6AfOH}GzS){%_M)<$(F{BIRw!ht;in| zMxWuBCz^jkRhOeMsF zUwN#n6;Q-NhsRn0_Q$`g^^ryPp`0qCQHRE+bFq8)vQHq*HINw?p%2%}>7z|^?WEm6 W&)NJHF=uqQSe7|pRPQrV-u}OSkxpm; literal 0 HcmV?d00001 diff --git a/Allgemeines/MonoEmbedded/UnManagedCode/test.c b/Allgemeines/MonoEmbedded/UnManagedCode/test.c new file mode 100644 index 0000000..2c38c76 --- /dev/null +++ b/Allgemeines/MonoEmbedded/UnManagedCode/test.c @@ -0,0 +1,58 @@ +#include +#include +#include +#include +#include + +/** + * Method to be used from Mono. + */ +static inline void p_Print(MonoString *str) { + std::cout << "UTF8: " << mono_string_to_utf8(str) << std::endl; + std::wcout << "UTF16: " << ((wchar_t*)mono_string_to_utf16(str)) << std::endl; +} + +/** + * This program must be run like this: ./test MonoEmbedded.exe + * (it requires one argument, even when it is not going to be used because I do not know what + * parameters to use in mono_jit_exec method, it crashes with NULL value :/) + */ +int main (int argc, char *argv[]) +{ + /* + * Load the default Mono configuration file, this is needed + * if you are planning on using the dllmaps defined on the + * system configuration + */ + mono_config_parse (NULL); + + /* + * mono_jit_init() creates a domain: each assembly is + * loaded and run in a MonoDomain. + */ + MonoDomain *domain = mono_jit_init ("../MonoEmbedded/bin/Debug/MonoEmbedded.exe"); + + /* + * Optionally, add an internal call that your startup.exe + * code can call, this will bridge startup.exe to Mono + */ + mono_add_internal_call ("MonoEmbedded.MainClass::Print", (void *)p_Print); + + /* + * Open the executable, and run the Main method declared + * in the executable + */ + MonoAssembly *assembly = mono_domain_assembly_open (domain, "../MonoEmbedded/bin/Debug/MonoEmbedded.exe"); + if (!assembly) { + exit (2); + } + + /* + * mono_jit_exec() will run the Main() method in the assembly. + * The return value needs to be looked up from + * System.Environment.ExitCode. + */ + mono_jit_exec (domain, assembly, argc - 1, argv + 1); + + return 0; +} -- 2.1.4