diff --git a/build/Aegisub/standard-libraries.props b/build/Aegisub/standard-libraries.props
index 0d3c34a28..545ccca95 100644
--- a/build/Aegisub/standard-libraries.props
+++ b/build/Aegisub/standard-libraries.props
@@ -15,10 +15,6 @@
advapi32.lib;
wsock32.lib;
opengl32.lib;
- sicudt.lib;
- sicuin.lib;
- sicutu.lib;
- sicuuc.lib;
fribidi.lib;
%(AdditionalDependencies)
diff --git a/build/aegisub.props b/build/aegisub.props
index b67218f6b..5712db2cc 100644
--- a/build/aegisub.props
+++ b/build/aegisub.props
@@ -33,6 +33,7 @@
false
true
Unicode
+ MultiByte
v120_xp
diff --git a/build/icu/icu.vcxproj b/build/icu/icu.vcxproj
index b7194b08c..b34448917 100644
--- a/build/icu/icu.vcxproj
+++ b/build/icu/icu.vcxproj
@@ -1,9 +1,10 @@
-
+
{F934AB7B-186B-4E96-B20C-A58C38C1B818}
- MakeFileProj
- Makefile
+ icu
+ lib
+ true
@@ -11,111 +12,676 @@
-
+
+
+
+
+ $(IcuSrcDir)\common;
+ $(IcuSrcDir)\common\unicode;
+ $(IcuSrcDir)\i18n;
+ $(IcuSrcDir)\i18n\unicode;
+ %(AdditionalIncludeDirectories)
+
+
+ U_ATTRIBUTE_DEPRECATED=;
+ _CRT_SECURE_NO_DEPRECATE;
+ U_COMMON_IMPLEMENTATION;
+ U_I18N_IMPLEMENTATION;
+ %(PreprocessorDefinitions)
+
+
+
-
- --enable-debug --disable-release CFLAGS=-MDd CXXFLAGS=-MDd
- --disable-debug --enable-release CFLAGS="-MD -Gw -O2 -GL" CXXFLAGS="-MD -Gw -O2 -GL"
-
- CC=cl
- CXX=cl
- --enable-static
- --disable-shared
- --disable-extras
- --disable-icuio
- --disable-layout
- --disable-tests
- --disable-samples
- $(CfgDebug)
-
- $([System.IO.Path]::GetFullPath('$(MSBuildThisFileDirectory)$(IcuSrcDir)'))
+
+
+ $(AegisubBinaryDir)luajit-minilua$(AegisubPlatformSuffix)
+ $(MSBuildThisFileDirectory)pack-dt.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
+
+
+
+
+ false
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ unicode
+
+
diff --git a/build/icu/icu.vcxproj.filters b/build/icu/icu.vcxproj.filters
new file mode 100644
index 000000000..634c69b5d
--- /dev/null
+++ b/build/icu/icu.vcxproj.filters
@@ -0,0 +1,1744 @@
+
+
+
+
+ common
+
+
+ common
+
+
+ common
+
+
+ common
+
+
+ common
+
+
+ common
+
+
+ common
+
+
+ common
+
+
+ common
+
+
+ common
+
+
+ common
+
+
+ common
+
+
+ common
+
+
+ common
+
+
+ common
+
+
+ common
+
+
+ common
+
+
+ common
+
+
+ common
+
+
+ common
+
+
+ common
+
+
+ common
+
+
+ common
+
+
+ common
+
+
+ common
+
+
+ common
+
+
+ common
+
+
+ common
+
+
+ common
+
+
+ common
+
+
+ common
+
+
+ common
+
+
+ common
+
+
+ common
+
+
+ common
+
+
+ common
+
+
+ common
+
+
+ common
+
+
+ common
+
+
+ common
+
+
+ common
+
+
+ common
+
+
+ common
+
+
+ common
+
+
+ common
+
+
+ common
+
+
+ common
+
+
+ common
+
+
+ common
+
+
+ common
+
+
+ common
+
+
+ common
+
+
+ common
+
+
+ common
+
+
+ common
+
+
+ common
+
+
+ common
+
+
+ common
+
+
+ common
+
+
+ common
+
+
+ common
+
+
+ common
+
+
+ common
+
+
+ common
+
+
+ common
+
+
+ common
+
+
+ common
+
+
+ common
+
+
+ common
+
+
+ common
+
+
+ common
+
+
+ common
+
+
+ common
+
+
+ common
+
+
+ common
+
+
+ common
+
+
+ common
+
+
+ common
+
+
+ common
+
+
+ common
+
+
+ common
+
+
+ common
+
+
+ common
+
+
+ common
+
+
+ common
+
+
+ common
+
+
+ common
+
+
+ common
+
+
+ common
+
+
+ common
+
+
+ common
+
+
+ common
+
+
+ common
+
+
+ common
+
+
+ common
+
+
+ common
+
+
+ common
+
+
+ common
+
+
+ common
+
+
+ common
+
+
+ common
+
+
+ common
+
+
+ common
+
+
+ common
+
+
+ common
+
+
+ common
+
+
+ common
+
+
+ common
+
+
+ common
+
+
+ common
+
+
+ common
+
+
+ common
+
+
+ common
+
+
+ common
+
+
+ common
+
+
+ common
+
+
+ common
+
+
+ common
+
+
+ common
+
+
+ common
+
+
+ common
+
+
+ common
+
+
+ common
+
+
+ common
+
+
+ common
+
+
+ common
+
+
+ common
+
+
+ common
+
+
+ common
+
+
+ common
+
+
+ common
+
+
+ common
+
+
+ common
+
+
+ common
+
+
+ common
+
+
+ common
+
+
+ common
+
+
+ common
+
+
+ common
+
+
+ common
+
+
+ common
+
+
+ common
+
+
+ common
+
+
+ common
+
+
+ common
+
+
+ common
+
+
+ common
+
+
+ common
+
+
+ common
+
+
+ common
+
+
+ common
+
+
+ common
+
+
+ common
+
+
+ common
+
+
+ common
+
+
+ common
+
+
+ common
+
+
+ common
+
+
+ common
+
+
+ common
+
+
+ common
+
+
+ common
+
+
+ common
+
+
+ common
+
+
+ common
+
+
+ common
+
+
+ common
+
+
+ common
+
+
+ common
+
+
+ common
+
+
+ common
+
+
+ common
+
+
+ common
+
+
+ i18n
+
+
+ i18n
+
+
+ i18n
+
+
+ i18n
+
+
+ i18n
+
+
+ i18n
+
+
+ i18n
+
+
+ i18n
+
+
+ i18n
+
+
+ i18n
+
+
+ i18n
+
+
+ i18n
+
+
+ i18n
+
+
+ i18n
+
+
+ i18n
+
+
+ i18n
+
+
+ i18n
+
+
+ i18n
+
+
+ i18n
+
+
+ i18n
+
+
+ i18n
+
+
+ i18n
+
+
+ i18n
+
+
+ i18n
+
+
+ i18n
+
+
+ i18n
+
+
+ i18n
+
+
+ i18n
+
+
+ i18n
+
+
+ i18n
+
+
+ i18n
+
+
+ i18n
+
+
+ i18n
+
+
+ i18n
+
+
+ i18n
+
+
+ i18n
+
+
+ i18n
+
+
+ i18n
+
+
+ i18n
+
+
+ i18n
+
+
+ i18n
+
+
+ i18n
+
+
+ i18n
+
+
+ i18n
+
+
+ i18n
+
+
+ i18n
+
+
+ i18n
+
+
+ i18n
+
+
+ i18n
+
+
+ i18n
+
+
+ i18n
+
+
+ i18n
+
+
+ i18n
+
+
+ i18n
+
+
+ i18n
+
+
+ i18n
+
+
+ i18n
+
+
+ i18n
+
+
+ i18n
+
+
+ i18n
+
+
+ i18n
+
+
+ i18n
+
+
+ i18n
+
+
+ i18n
+
+
+ i18n
+
+
+ i18n
+
+
+ i18n
+
+
+ i18n
+
+
+ i18n
+
+
+ i18n
+
+
+ i18n
+
+
+ i18n
+
+
+ i18n
+
+
+ i18n
+
+
+ i18n
+
+
+ i18n
+
+
+ i18n
+
+
+ i18n
+
+
+ i18n
+
+
+ i18n
+
+
+ i18n
+
+
+ i18n
+
+
+ i18n
+
+
+ i18n
+
+
+ i18n
+
+
+ i18n
+
+
+ i18n
+
+
+ i18n
+
+
+ i18n
+
+
+ i18n
+
+
+ i18n
+
+
+ i18n
+
+
+ i18n
+
+
+ i18n
+
+
+ i18n
+
+
+ i18n
+
+
+ i18n
+
+
+ i18n
+
+
+ i18n
+
+
+ i18n
+
+
+ i18n
+
+
+ i18n
+
+
+ i18n
+
+
+ i18n
+
+
+ i18n
+
+
+ i18n
+
+
+ i18n
+
+
+ i18n
+
+
+ i18n
+
+
+ i18n
+
+
+ i18n
+
+
+ i18n
+
+
+ i18n
+
+
+ i18n
+
+
+ i18n
+
+
+ i18n
+
+
+ i18n
+
+
+ i18n
+
+
+ i18n
+
+
+ i18n
+
+
+ i18n
+
+
+ i18n
+
+
+ i18n
+
+
+ i18n
+
+
+ i18n
+
+
+ i18n
+
+
+ i18n
+
+
+ i18n
+
+
+ i18n
+
+
+ i18n
+
+
+ i18n
+
+
+ i18n
+
+
+ i18n
+
+
+ i18n
+
+
+ i18n
+
+
+ i18n
+
+
+ i18n
+
+
+ i18n
+
+
+ i18n
+
+
+ i18n
+
+
+ i18n
+
+
+ i18n
+
+
+ i18n
+
+
+ i18n
+
+
+ i18n
+
+
+ i18n
+
+
+ i18n
+
+
+ i18n
+
+
+ i18n
+
+
+ i18n
+
+
+ i18n
+
+
+ i18n
+
+
+ i18n
+
+
+ i18n
+
+
+ i18n
+
+
+ i18n
+
+
+ i18n
+
+
+ i18n
+
+
+ i18n
+
+
+ i18n
+
+
+ i18n
+
+
+ i18n
+
+
+ i18n
+
+
+ i18n
+
+
+ i18n
+
+
+ i18n
+
+
+ i18n
+
+
+ i18n
+
+
+ i18n
+
+
+ i18n
+
+
+ i18n
+
+
+ i18n
+
+
+ i18n
+
+
+ i18n
+
+
+ i18n
+
+
+ i18n
+
+
+ i18n
+
+
+ i18n
+
+
+ i18n
+
+
+ i18n
+
+
+ i18n
+
+
+ i18n
+
+
+ i18n
+
+
+ i18n
+
+
+ i18n
+
+
+
+
+
+ common
+
+
+ common
+
+
+ common
+
+
+ common
+
+
+ common
+
+
+ common
+
+
+ common
+
+
+ common
+
+
+ common
+
+
+ common
+
+
+ common
+
+
+ common
+
+
+ common
+
+
+ common
+
+
+ common
+
+
+ common
+
+
+ common
+
+
+ common
+
+
+ common
+
+
+ common
+
+
+ common
+
+
+ common
+
+
+ common
+
+
+ common
+
+
+ common
+
+
+ common
+
+
+ common
+
+
+ common
+
+
+ common
+
+
+ common
+
+
+ common
+
+
+ common
+
+
+ common
+
+
+ common
+
+
+ common
+
+
+ common
+
+
+ common
+
+
+ common
+
+
+ common
+
+
+ common
+
+
+ common
+
+
+ common
+
+
+ common
+
+
+ common
+
+
+ common
+
+
+ common
+
+
+ common
+
+
+ common
+
+
+ common
+
+
+ common
+
+
+ common
+
+
+ common
+
+
+ common
+
+
+ common
+
+
+ common
+
+
+ common
+
+
+ common
+
+
+ common
+
+
+ common
+
+
+ common
+
+
+ common
+
+
+ common
+
+
+ common
+
+
+ common
+
+
+ common
+
+
+ common
+
+
+ common
+
+
+ common
+
+
+ common
+
+
+ common
+
+
+ common
+
+
+ common
+
+
+ common
+
+
+ common
+
+
+ common
+
+
+ common
+
+
+ common
+
+
+ common
+
+
+ common
+
+
+ common
+
+
+ common
+
+
+ common
+
+
+ common
+
+
+ common
+
+
+ common
+
+
+ common
+
+
+ common
+
+
+ common
+
+
+ common
+
+
+ common
+
+
+ common
+
+
+ common
+
+
+ common
+
+
+ common
+
+
+ common
+
+
+ i18n
+
+
+ i18n
+
+
+ i18n
+
+
+ i18n
+
+
+ i18n
+
+
+ i18n
+
+
+ i18n
+
+
+ i18n
+
+
+ i18n
+
+
+ i18n
+
+
+ i18n
+
+
+ i18n
+
+
+ i18n
+
+
+ i18n
+
+
+ i18n
+
+
+ i18n
+
+
+ i18n
+
+
+ i18n
+
+
+ i18n
+
+
+ i18n
+
+
+ i18n
+
+
+ i18n
+
+
+ i18n
+
+
+ i18n
+
+
+ i18n
+
+
+ i18n
+
+
+ i18n
+
+
+ i18n
+
+
+ i18n
+
+
+ i18n
+
+
+ i18n
+
+
+ i18n
+
+
+ i18n
+
+
+ i18n
+
+
+ i18n
+
+
+ i18n
+
+
+ i18n
+
+
+ i18n
+
+
+ i18n
+
+
+ i18n
+
+
+ i18n
+
+
+ i18n
+
+
+ i18n
+
+
+ i18n
+
+
+ i18n
+
+
+ i18n
+
+
+ i18n
+
+
+ i18n
+
+
+ i18n
+
+
+ i18n
+
+
+ i18n
+
+
+ i18n
+
+
+ i18n
+
+
+ i18n
+
+
+ i18n
+
+
+ i18n
+
+
+ i18n
+
+
+ i18n
+
+
+ i18n
+
+
+ i18n
+
+
+ i18n
+
+
+ i18n
+
+
+ i18n
+
+
+ i18n
+
+
+ i18n
+
+
+ i18n
+
+
+ i18n
+
+
+ i18n
+
+
+ i18n
+
+
+ i18n
+
+
+ i18n
+
+
+ i18n
+
+
+ i18n
+
+
+ i18n
+
+
+ i18n
+
+
+ i18n
+
+
+ i18n
+
+
+ i18n
+
+
+ i18n
+
+
+ i18n
+
+
+ i18n
+
+
+ i18n
+
+
+ i18n
+
+
+ i18n
+
+
+ i18n
+
+
+ i18n
+
+
+ i18n
+
+
+ i18n
+
+
+ i18n
+
+
+ i18n
+
+
+ i18n
+
+
+ i18n
+
+
+ i18n
+
+
+ i18n
+
+
+ i18n
+
+
+ i18n
+
+
+ i18n
+
+
+ i18n
+
+
+ i18n
+
+
+ i18n
+
+
+ i18n
+
+
+ i18n
+
+
+ i18n
+
+
+ i18n
+
+
+ i18n
+
+
+ i18n
+
+
+ i18n
+
+
+ i18n
+
+
+ i18n
+
+
+ i18n
+
+
+ i18n
+
+
+ i18n
+
+
+ i18n
+
+
+ i18n
+
+
+ i18n
+
+
+ i18n
+
+
+ i18n
+
+
+ i18n
+
+
+ i18n
+
+
+ i18n
+
+
+ i18n
+
+
+ i18n
+
+
+ i18n
+
+
+
+
+ {12edb004-4c5b-4b0d-ae85-3dd475dbb4c3}
+
+
+ {7d3ae04e-88bb-462a-8923-eb7438de142e}
+
+
+
\ No newline at end of file
diff --git a/build/icu/pack-dt.lua b/build/icu/pack-dt.lua
new file mode 100644
index 000000000..0e95ed1e7
--- /dev/null
+++ b/build/icu/pack-dt.lua
@@ -0,0 +1,47 @@
+-- Copyright (c) 2014, Thomas Goyne
+--
+-- Permission to use, copy, modify, and distribute this software for any
+-- purpose with or without fee is hereby granted, provided that the above
+-- copyright notice and this permission notice appear in all copies.
+--
+-- THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+-- WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+-- MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+-- ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+-- WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+-- ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+-- OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+--
+-- Aegisub Project http://www.aegisub.org/
+
+local ICU_VERSION = 'icudt53'
+
+local function try_open(filename, mode)
+ local file, err = io.open(filename, mode)
+ if not file then
+ io.stdout:write(string.format('Failed to open "%s": %s\n', filename, err))
+ os.exit(1)
+ end
+ return file
+end
+
+local icu_root, out_path = ...
+
+local infile = try_open(string.format('%s/data/in/%sl.dat', icu_root, ICU_VERSION), 'rb')
+local outfile = try_open(out_path, 'w')
+
+outfile:write("const unsigned char " .. ICU_VERSION .. "_dat[] = {")
+
+local len = 0
+while true do
+ local bytes = infile:read(65536)
+ if not bytes then break end
+
+ for i = 1, #bytes do
+ if len > 0 then outfile:write(',') end
+ outfile:write(string.format('%d', bytes:byte(i)))
+ len = len + 1
+ end
+end
+outfile:write('};\n')
+
diff --git a/tools/respack.lua b/tools/respack.lua
index 1e978e5c5..f7a487af8 100755
--- a/tools/respack.lua
+++ b/tools/respack.lua
@@ -50,12 +50,14 @@ for line in manifest:lines() do
local len = 0
while true do
- local b = file:read(1)
- if not b then break end
+ local bytes = file:read(65536)
+ if not bytes then break end
- if len > 0 then out_cpp:write(',') end
- out_cpp:write(string.format('%d', b:byte()))
- len = len + 1
+ for i = 1, #bytes do
+ if len > 0 then out_cpp:write(',') end
+ out_cpp:write(string.format('%d', bytes:byte(i)))
+ len = len + 1
+ end
end
out_cpp:write('};\n')
out_h:write(string.format('extern const unsigned char %s[%d];\n', id, len))