mirror of https://github.com/odrling/Aegisub
Build ICU on Windows
This commit is contained in:
parent
855902edb8
commit
91e43d3c17
13
Aegisub.sln
13
Aegisub.sln
|
@ -70,6 +70,8 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "PortableInstaller", "aegisu
|
|||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "boost", "aegisub\build\boost\boost.vcxproj", "{A649D828-A399-4D81-ADEF-94CFDBA7847F}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "icu", "aegisub\build\icu\icu.vcxproj", "{F934AB7B-186B-4E96-B20C-A58C38C1B818}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Win32 = Debug|Win32
|
||||
|
@ -294,6 +296,17 @@ Global
|
|||
{A649D828-A399-4D81-ADEF-94CFDBA7847F}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{A649D828-A399-4D81-ADEF-94CFDBA7847F}.Release|Win32.Build.0 = Release|Win32
|
||||
{A649D828-A399-4D81-ADEF-94CFDBA7847F}.Release|x64.ActiveCfg = Release|Win32
|
||||
{F934AB7B-186B-4E96-B20C-A58C38C1B818}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{F934AB7B-186B-4E96-B20C-A58C38C1B818}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{F934AB7B-186B-4E96-B20C-A58C38C1B818}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{F934AB7B-186B-4E96-B20C-A58C38C1B818}.Debug|x64.Build.0 = Debug|x64
|
||||
{F934AB7B-186B-4E96-B20C-A58C38C1B818}.Debug-MinDep|Win32.ActiveCfg = Debug|Win32
|
||||
{F934AB7B-186B-4E96-B20C-A58C38C1B818}.Debug-MinDep|x64.ActiveCfg = Debug|x64
|
||||
{F934AB7B-186B-4E96-B20C-A58C38C1B818}.Debug-MinDep|x64.Build.0 = Debug|x64
|
||||
{F934AB7B-186B-4E96-B20C-A58C38C1B818}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{F934AB7B-186B-4E96-B20C-A58C38C1B818}.Release|Win32.Build.0 = Release|Win32
|
||||
{F934AB7B-186B-4E96-B20C-A58C38C1B818}.Release|x64.ActiveCfg = Release|x64
|
||||
{F934AB7B-186B-4E96-B20C-A58C38C1B818}.Release|x64.Build.0 = Release|x64
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
|
|
|
@ -63,6 +63,9 @@
|
|||
<ProjectReference Include="..\hunspell\hunspell.vcxproj">
|
||||
<Project>{cc791693-6b28-40ac-879d-64a6c16468e3}</Project>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\icu\icu.vcxproj">
|
||||
<Project>{f934ab7b-186b-4e96-b20c-a58c38c1b818}</Project>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\libaegisub\libaegisub.vcxproj">
|
||||
<Project>{bb3fed86-db7a-4dc7-964a-260fb86cde61}</Project>
|
||||
</ProjectReference>
|
||||
|
|
|
@ -235,6 +235,14 @@
|
|||
Description="Location of Fontconfig source code."
|
||||
/>
|
||||
|
||||
<StringProperty
|
||||
Subtype="folder"
|
||||
Name="IcuSrcDir"
|
||||
Category="Paths"
|
||||
DisplayName="ICU source path"
|
||||
Description="Location of ICU source code."
|
||||
/>
|
||||
|
||||
<StringProperty
|
||||
Subtype="folder"
|
||||
Name="LibassSrcDir"
|
||||
|
|
|
@ -59,6 +59,7 @@
|
|||
<Freetype2SrcDir>..\..\..\deps\freetype2</Freetype2SrcDir>
|
||||
<FribidiSrcDir>..\..\..\deps\fribidi</FribidiSrcDir>
|
||||
<FontconfigSrcDir>..\..\..\deps\fontconfig</FontconfigSrcDir>
|
||||
<IcuSrcDir>..\..\..\deps\icu\source</IcuSrcDir>
|
||||
<LibassSrcDir>..\..\..\deps\libass</LibassSrcDir>
|
||||
<WxSrcDir>..\..\..\deps\wxWidgets</WxSrcDir>
|
||||
<ZlibSrcDir>..\..\..\deps\zlib</ZlibSrcDir>
|
||||
|
|
|
@ -0,0 +1,111 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup Label="Globals">
|
||||
<ProjectGuid>{F934AB7B-186B-4E96-B20C-A58C38C1B818}</ProjectGuid>
|
||||
<Keyword>MakeFileProj</Keyword>
|
||||
<ConfigurationType>Makefile</ConfigurationType>
|
||||
</PropertyGroup>
|
||||
|
||||
<!-- Aegisub project configuration -->
|
||||
<ImportGroup Label="PropertySheets">
|
||||
<Import Project="$(MSBuildThisFileDirectory)..\aegisub.props" />
|
||||
</ImportGroup>
|
||||
|
||||
<PropertyGroup Label="ConfigArgs">
|
||||
<CfgDebug Condition="'$(Configuration)' == 'Debug'">--enable-debug --disable-release CFLAGS=-MDd CXXFLAGS=-MDd</CfgDebug>
|
||||
<CfgDebug Condition="'$(Configuration)' == 'Release'">--disable-debug --enable-release CFLAGS=-MD CXXFLAGS=-MD</CfgDebug>
|
||||
<CfgArgs>
|
||||
CC=cl
|
||||
CXX=cl
|
||||
--enable-static
|
||||
--disable-shared
|
||||
--disable-extras
|
||||
--disable-icuio
|
||||
--disable-layout
|
||||
--disable-tests
|
||||
--disable-samples
|
||||
$(CfgDebug)
|
||||
</CfgArgs>
|
||||
<AbsSrcDir>$([System.IO.Path]::GetFullPath('$(MSBuildThisFileDirectory)$(IcuSrcDir)'))</AbsSrcDir>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ConfigureInput Include="$(AbsSrcDir)\configure" />
|
||||
<ConfigureOutput Include="$(AegisubObjectDir)Makefile" />
|
||||
</ItemGroup>
|
||||
|
||||
<Target Name="Configure"
|
||||
Inputs="@(ConfigureInput)"
|
||||
Outputs="@(ConfigureOutput)"
|
||||
>
|
||||
<Delete Files="$(AegisubObjectDir)build.timestamp" />
|
||||
|
||||
<Copy
|
||||
SourceFiles="mh-msys-msvc"
|
||||
DestinationFiles="$(IcuSrcDir)\config\mh-cygwin-msvc"
|
||||
SkipUnchangedFiles="true"
|
||||
/>
|
||||
|
||||
<MsysPath Path="$(AegisubObjectDir)\temp">
|
||||
<Output TaskParameter="Result" PropertyName="CfgPrefix" />
|
||||
</MsysPath>
|
||||
|
||||
<MsysPath Path="$(MSBuildThisFileDirectory)../../include">
|
||||
<Output TaskParameter="Result" PropertyName="CfgIncludePrefix" />
|
||||
</MsysPath>
|
||||
|
||||
<MsysPath Path="$(AegisubLibraryDir)">
|
||||
<Output TaskParameter="Result" PropertyName="CfgLibPrefix" />
|
||||
</MsysPath>
|
||||
|
||||
<ExecShellScript
|
||||
Command="$(AbsSrcDir)\configure"
|
||||
Arguments="$(CfgArgs) --prefix=$(CfgPrefix) --libdir=$(CfgLibPrefix) --includedir=$(CfgIncludePrefix)"
|
||||
WorkingDirectory="$(AegisubObjectDir)"
|
||||
Configuration="@(ExecShellScript)"
|
||||
/>
|
||||
|
||||
<!-- Ensure that Makefile has a recent modified time to avoid
|
||||
rerunning configure pointlessly -->
|
||||
<Touch Files="@(ConfigureOutput)" />
|
||||
</Target>
|
||||
|
||||
<ItemGroup>
|
||||
<OutputLibraries Include="$(AegisubObjectDir)lib\*" />
|
||||
</ItemGroup>
|
||||
|
||||
<Target Name="Compile"
|
||||
Inputs="$(IcuSrcDir)"
|
||||
Outputs="$(AegisubObjectDir)build.timestamp"
|
||||
>
|
||||
<ExecShellScript
|
||||
Command="make"
|
||||
Arguments="-j$(NUMBER_OF_PROCESSORS)"
|
||||
WorkingDirectory="$(AegisubObjectDir)"
|
||||
Configuration="@(ExecShellScript)"
|
||||
/>
|
||||
|
||||
<ExecShellScript
|
||||
Command="make install"
|
||||
WorkingDirectory="$(AegisubObjectDir)"
|
||||
Configuration="@(ExecShellScript)"
|
||||
/>
|
||||
|
||||
<Touch Files="$(AegisubObjectDir)build.timestamp" AlwaysCreate="true" />
|
||||
</Target>
|
||||
|
||||
<Target Name="Build">
|
||||
<Error Condition="!Exists('$(AbsSrcDir)')" Text="ICU source not found at '$(AbsSrcDir)'" />
|
||||
|
||||
<CallTarget Targets="Configure" />
|
||||
<CallTarget Targets="Compile" />
|
||||
</Target>
|
||||
|
||||
<Target Name="Clean">
|
||||
<RemoveDir Directories="$(AegisubObjectDir)" ContinueOnError="WarnAndContinue" />
|
||||
</Target>
|
||||
|
||||
<Target Name="Rebuild">
|
||||
<CallTarget Targets="Clean;Build" />
|
||||
</Target>
|
||||
</Project>
|
|
@ -0,0 +1,84 @@
|
|||
# ICU's mh-cygwin-msvc doesn't work with msys or Visual Studio 2012.
|
||||
# There's a whole bunch of incompatibilities, so this is a complete replacement
|
||||
# rather than just a patch.
|
||||
|
||||
sbindir=$(bindir)
|
||||
CPPFLAGS += -DU_STATIC_IMPLEMENTATION -DUCONFIG_NO_LEGACY_CONVERSION=1 -DU_ENABLE_DYLOAD=0 -DUCONFIG_NO_FILE_IO=1 -DU_CHARSET_IS_UTF8=1
|
||||
|
||||
ifeq ($(ENABLE_DEBUG),1)
|
||||
CPPFLAGS+=-D_DEBUG=1
|
||||
CFLAGS+=-Z7
|
||||
CXXFLAGS+=-Z7
|
||||
else
|
||||
CPPFLAGS+=-DU_RELEASE=1
|
||||
endif
|
||||
|
||||
CFLAGS+=-GF -nologo
|
||||
CXXFLAGS+=-GF -nologo -EHsc -Zc:wchar_t
|
||||
CPPFLAGS+=-D_CRT_SECURE_NO_DEPRECATE
|
||||
DEFS+=-DWIN32 -DCYGWINMSVC
|
||||
LDFLAGS+=-nologo
|
||||
|
||||
COMPILE.c= $(CC) $(CPPFLAGS) $(DEFS) $(CFLAGS) -c
|
||||
COMPILE.cc= $(CXX) $(CPPFLAGS) $(DEFS) $(CXXFLAGS) -c
|
||||
LINK.c= LINK.EXE -subsystem:console $(LDFLAGS)
|
||||
LINK.cc= LINK.EXE -subsystem:console $(LDFLAGS)
|
||||
|
||||
OUTOPT = -out:
|
||||
|
||||
LIBSICU = $(STATIC_PREFIX)$(ICUPREFIX)
|
||||
A = lib
|
||||
STATIC_O=o
|
||||
|
||||
AR = LIB.EXE
|
||||
ARFLAGS := -nologo $(ARFLAGS:r=)
|
||||
RANLIB = ls -s
|
||||
AR_OUTOPT = -OUT:
|
||||
|
||||
IMPORT_LIB_EXT = .lib
|
||||
|
||||
LIBPREFIX=
|
||||
DEFAULT_LIBS = advapi32.lib
|
||||
|
||||
DATA_STUBNAME = dt
|
||||
I18N_STUBNAME = in
|
||||
LIBICU = $(STATIC_PREFIX_WHEN_USED)$(ICUPREFIX)
|
||||
|
||||
ifeq ($(wildcard $(LIBDIR)/$(LIBICU)$(DATA_STUBNAME)$(ICULIBSUFFIX).lib),)
|
||||
LIBICUDT= $(top_builddir)/stubdata/$(LIBICU)$(DATA_STUBNAME)$(ICULIBSUFFIX).lib
|
||||
else
|
||||
LIBICUDT= $(LIBDIR)/$(LIBICU)$(DATA_STUBNAME)$(ICULIBSUFFIX).lib
|
||||
endif
|
||||
LIBICUUC= $(LIBDIR)/$(LIBICU)$(COMMON_STUBNAME)$(ICULIBSUFFIX).lib $(LIBICUDT)
|
||||
LIBICUI18N= $(LIBDIR)/$(LIBICU)$(I18N_STUBNAME)$(ICULIBSUFFIX).lib
|
||||
LIBICULE= $(LIBDIR)/$(LIBICU)$(LAYOUT_STUBNAME)$(ICULIBSUFFIX).lib
|
||||
LIBICULX= $(LIBDIR)/$(LIBICU)$(LAYOUTEX_STUBNAME)$(ICULIBSUFFIX).lib
|
||||
LIBICUIO= $(LIBDIR)/$(LIBICU)$(IO_STUBNAME)$(ICULIBSUFFIX).lib
|
||||
LIBICUTOOLUTIL= $(LIBDIR)/$(LIBICU)$(TOOLUTIL_STUBNAME)$(ICULIBSUFFIX).lib
|
||||
|
||||
LDFLAGSICUDT+= /base:"0x4ad00000" -NOENTRY# The NOENTRY option is required for creating a resource-only DLL.
|
||||
LDFLAGSICUUC= /base:"0x4a800000"# in-uc = 1MB
|
||||
LDFLAGSICUI18N= /base:"0x4a900000"# io-in = 2MB
|
||||
LDFLAGSICUIO= /base:"0x4ab00000"# le-io = 1MB
|
||||
LDFLAGSICULE= /base:"0x4ac00000"# lx-le = 512KB
|
||||
LDFLAGSICULX= /base:"0x4ac80000"
|
||||
LDFLAGSICUTOOLUTIL= /base:"0x4ac00000"# Same as layout. Layout and tools probably won't mix.
|
||||
|
||||
%.o: $(srcdir)/%.c
|
||||
$(COMPILE.c) $(STATICCPPFLAGS) $(STATICCFLAGS) -Fo$@ $<
|
||||
|
||||
%.o: $(srcdir)/%.cpp
|
||||
$(COMPILE.cc) $(STATICCPPFLAGS) $(STATICCXXFLAGS) -Fo$@ $<
|
||||
|
||||
%.res : $(srcdir)/%.rc
|
||||
rc.exe -fo$@ $(CPPFLAGS) $<
|
||||
|
||||
ICUPKGDATA_INSTALL_DIR = $(libdir)
|
||||
|
||||
ICULIBSUFFIX_VERSION = $(LIB_VERSION_MAJOR)
|
||||
|
||||
INSTALL-L=$(INSTALL_PROGRAM)
|
||||
|
||||
LDLIBRARYPATH_ENVVAR = PATH
|
||||
|
||||
PKGDATA_INVOKE_OPTS = MAKEFLAGS=
|
|
@ -23,6 +23,7 @@
|
|||
<PreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalLibraryDirectories>$(AegisubLibraryDir);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
<SubSystem>Console</SubSystem>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
|
|
|
@ -25,6 +25,7 @@
|
|||
$(AegisubSourceBase)src\msvc;
|
||||
$(AegisubSourceBase)\include;
|
||||
$(BoostPath);
|
||||
$(IcuSrcDir)\include;
|
||||
%(AdditionalIncludeDirectories)
|
||||
</AdditionalIncludeDirectories>
|
||||
<DisableSpecificWarnings>4345</DisableSpecificWarnings>
|
||||
|
|
Loading…
Reference in New Issue