Skip to content
Browse files

Embed unidata into Kernel.dll, check in a working quasi-finalized ver…

…sion
  • Loading branch information...
1 parent 8c76823 commit e0d294d7f9774ad0e57d006e640c53a9a5fee4f1 @sorear committed
Showing with 10 additions and 6 deletions.
  1. +4 −4 Makefile
  2. +6 −2 lib/UCD.cs
  3. BIN lib/unidata
View
8 Makefile
@@ -47,12 +47,12 @@ run/Niecza.exe: .fetch-stamp $(patsubst %,boot/obj/Run.%.ser,$(srcunits)) src/ni
boot/obj/Run.CompilerBlob.dll: .fetch-stamp src/CompilerBlob.cs
$(CSC) /target:library /out:boot/obj/Run.CompilerBlob.dll /r:Run.Kernel \
/lib:boot/obj src/CompilerBlob.cs
-obj/Run.Kernel.dll: $(patsubst %,lib/%,$(cskernel))
+obj/Run.Kernel.dll: $(patsubst %,lib/%,$(cskernel)) lib/unidata
$(CSC) /target:exe /out:obj/Run.Kernel.dll /lib:obj /unsafe+ \
- $(patsubst %,lib/%,$(cskernel))
-obj/Kernel.dll: $(patsubst %,lib/%,$(cskernel))
+ /res:lib/unidata $(patsubst %,lib/%,$(cskernel))
+obj/Kernel.dll: $(patsubst %,lib/%,$(cskernel)) lib/unidata
$(CSC) /target:exe /out:obj/Kernel.dll /lib:obj /unsafe+ \
- $(patsubst %,lib/%,$(cskernel))
+ /res:lib/unidata $(patsubst %,lib/%,$(cskernel))
perl5: obj/Perl5Interpreter.dll obj/p5embed.so
obj/Perl5Interpreter.dll: obj/Kernel.dll lib/Perl5Interpreter.cs
View
8 lib/UCD.cs
@@ -1,7 +1,8 @@
using System;
+using System.Reflection;
+using System.IO;
using System.Runtime.CompilerServices;
using System.Collections.Generic;
-using System.IO;
using System.Text;
using Niecza;
using Niecza.UCD;
@@ -485,7 +486,10 @@ static class DataSet {
if (cache == null)
cache = new Dictionary<string,object>();
if (bits == null) {
- bits = File.ReadAllBytes("unidata");
+ Stream unidata = Assembly.GetExecutingAssembly().
+ GetManifestResourceStream("unidata");
+ bits = new byte[unidata.Length];
+ unidata.Read(bits, 0, bits.Length);
InflateDirectory();
InflateAliases();
}
View
BIN lib/unidata
Binary file not shown.

0 comments on commit e0d294d

Please sign in to comment.
Something went wrong with that request. Please try again.