Beispiel #1
0
        public void setup()
        {
            IkvmcAssembly  = "ikvmc.exe".assembly();
            StaticCompiler = IkvmcAssembly.type("StaticCompiler");
            IkvmRuntime    = StaticCompiler.invokeStatic("LoadFile", Environment.CurrentDirectory.pathCombine("IKVM.Runtime.dll"));
            PublicDI.reflection.setField((FieldInfo)StaticCompiler.field("runtimeAssembly"), IkvmRuntime);

            IkvmRuntimeJni = StaticCompiler.invokeStatic("LoadFile", Environment.CurrentDirectory.pathCombine("IKVM.Runtime.JNI.dll"));
            PublicDI.reflection.setField((FieldInfo)StaticCompiler.field("runtimeJniAssembly"), IkvmRuntimeJni);

            IkvmcCompiler = IkvmcAssembly.type("IkvmcCompiler").ctor();

            CompilerOptions = IkvmcAssembly.type("CompilerOptions").ctor();
            PublicDI.reflection.setField((FieldInfo)StaticCompiler.field("toplevel"), CompilerOptions);
        }
        public void setup()
        {
            //IkvmcAssembly = "ikvmc.exe".assembly();
            var basePath = @"IKVM\ikvm-7.1.4532.2\bin\";

            IkvmcAssembly  = basePath.add(@"ikvmc.exe").assembly();
            StaticCompiler = IkvmcAssembly.type("StaticCompiler");
            //IkvmRuntime = StaticCompiler.invokeStatic("LoadFile",Environment.CurrentDirectory.pathCombine("IKVM.Runtime.dll"));
            IkvmRuntime = StaticCompiler.invokeStatic("LoadFile", basePath.add("IKVM.Runtime.dll").assembly().Location);
            PublicDI.reflection.setField((FieldInfo)StaticCompiler.field("runtimeAssembly"), IkvmRuntime);

            //IkvmRuntimeJni = StaticCompiler.invokeStatic("LoadFile",Environment.CurrentDirectory.pathCombine("IKVM.Runtime.JNI.dll"));
            IkvmRuntimeJni = StaticCompiler.invokeStatic("LoadFile", basePath.add("IKVM.Runtime.JNI.dll").assembly().Location);
            PublicDI.reflection.setField((FieldInfo)StaticCompiler.field("runtimeJniAssembly"), IkvmRuntimeJni);

            IkvmcCompiler = IkvmcAssembly.type("IkvmcCompiler").ctor();

            CompilerOptions = IkvmcAssembly.type("CompilerOptions").ctor();
            PublicDI.reflection.setField((FieldInfo)StaticCompiler.field("toplevel"), CompilerOptions);
        }
        public void setup()
        {
            BasePath = @"IKVM\ikvm-7.2.4630.5\bin\";
            //IkvmcAssembly = "ikvmc.exe".assembly();

            IkvmcAssembly  = BasePath.add(@"ikvmc.exe").assembly();
            StaticCompiler = IkvmcAssembly.type("StaticCompiler");
            //IkvmRuntime = StaticCompiler.invokeStatic("LoadFile",Environment.CurrentDirectory.pathCombine("IKVM.Runtime.dll"));
            IkvmRuntime = StaticCompiler.invokeStatic("LoadFile", BasePath.add("IKVM.Runtime.dll").assembly().Location);
            PublicDI.reflection.setField((FieldInfo)StaticCompiler.field("runtimeAssembly"), IkvmRuntime);

            //IkvmRuntimeJni = StaticCompiler.invokeStatic("LoadFile",Environment.CurrentDirectory.pathCombine("IKVM.Runtime.JNI.dll"));
            IkvmRuntimeJni = StaticCompiler.invokeStatic("LoadFile", BasePath.add("IKVM.Runtime.JNI.dll").assembly().Location);
            PublicDI.reflection.setField((FieldInfo)StaticCompiler.field("runtimeJniAssembly"), IkvmRuntimeJni);

            IkvmcCompiler = IkvmcAssembly.type("IkvmcCompiler").ctor();

            CompilerOptions = IkvmcAssembly.type("CompilerOptions").ctor();
            PublicDI.reflection.setField((FieldInfo)StaticCompiler.field("toplevel"), CompilerOptions);
            //ensure assemblies are loaded into memory()
            loadCoreIKVMAssemblies();
        }