diff options
author | Eric Albright <eric_albright@sil.org> | 2007-12-20 14:16:43 +0000 |
---|---|---|
committer | Eric Albright <eric_albright@sil.org> | 2007-12-20 14:16:43 +0000 |
commit | 97f3d56e554c6d2ca1c4d6b3130558df3e8b83b8 (patch) | |
tree | 2d1c8f545b910fd485f59904d39903be5be8b051 | |
parent | 7c947fcc252ce5bf85895bfc150101f25cf939ef (diff) | |
download | enchant-97f3d56e554c6d2ca1c4d6b3130558df3e8b83b8.tar.gz |
Get aspell provider working on Windows, support using previously installed aspell on Windows
git-svn-id: svn+ssh://svn.abisource.com/svnroot/enchant/trunk@22378 bcba8976-2d24-0410-9c9c-aab3bd5fdfd6
-rw-r--r-- | msvc/enchant.sln | 2 | ||||
-rw-r--r-- | msvc/libenchant_aspell.vcproj | 10 | ||||
-rw-r--r-- | src/aspell/aspell_provider.c | 14 |
3 files changed, 22 insertions, 4 deletions
diff --git a/msvc/enchant.sln b/msvc/enchant.sln index eef34ec..bd87f5f 100644 --- a/msvc/enchant.sln +++ b/msvc/enchant.sln @@ -141,7 +141,9 @@ Global {E0DB6274-F44C-48E6-AE30-C00D59864569}.Release|Win32.ActiveCfg = Release|Win32
{E0DB6274-F44C-48E6-AE30-C00D59864569}.Release|Win32.Build.0 = Release|Win32
{E948850F-C9DA-4824-876D-4FE97B88E79F}.Debug|Win32.ActiveCfg = Debug|Win32
+ {E948850F-C9DA-4824-876D-4FE97B88E79F}.Debug|Win32.Build.0 = Debug|Win32
{E948850F-C9DA-4824-876D-4FE97B88E79F}.Release|Win32.ActiveCfg = Release|Win32
+ {E948850F-C9DA-4824-876D-4FE97B88E79F}.Release|Win32.Build.0 = Release|Win32
{AA6839DF-19CB-49DD-8258-ABB86B5B0428}.Debug|Win32.ActiveCfg = Debug|Win32
{AA6839DF-19CB-49DD-8258-ABB86B5B0428}.Release|Win32.ActiveCfg = Release|Win32
{6FA58A42-075E-4671-BBB4-F7AA8061F839}.Debug|Win32.ActiveCfg = Debug|Win32
diff --git a/msvc/libenchant_aspell.vcproj b/msvc/libenchant_aspell.vcproj index 9fc92da..84980a5 100644 --- a/msvc/libenchant_aspell.vcproj +++ b/msvc/libenchant_aspell.vcproj @@ -61,9 +61,10 @@ />
<Tool
Name="VCLinkerTool"
- AdditionalDependencies="glib-2.0-vs8.lib"
+ AdditionalDependencies="glib-2.0-vs8.lib aspell-15.lib"
LinkIncremental="2"
- AdditionalLibraryDirectories=""$(SolutionDir)..\lib\glib\$(ConfigurationName)""
+ AdditionalLibraryDirectories=""$(SolutionDir)..\lib\glib\$(ConfigurationName)";"$(SolutionDir)..\lib\aspell\""
+ DelayLoadDLLs="aspell-15.dll"
GenerateDebugInformation="true"
SubSystem="2"
TargetMachine="1"
@@ -137,9 +138,10 @@ />
<Tool
Name="VCLinkerTool"
- AdditionalDependencies="glib-2.0-vs8.lib"
+ AdditionalDependencies="glib-2.0-vs8.lib aspell-15.lib"
LinkIncremental="1"
- AdditionalLibraryDirectories=""$(SolutionDir)..\lib\glib\$(ConfigurationName)""
+ AdditionalLibraryDirectories=""$(SolutionDir)..\lib\glib\$(ConfigurationName)";"$(SolutionDir)..\lib\aspell\""
+ DelayLoadDLLs="aspell-15.dll"
GenerateDebugInformation="true"
SubSystem="2"
OptimizeReferences="2"
diff --git a/src/aspell/aspell_provider.c b/src/aspell/aspell_provider.c index a7956f7..84722d9 100644 --- a/src/aspell/aspell_provider.c +++ b/src/aspell/aspell_provider.c @@ -295,6 +295,20 @@ init_enchant_provider (void) { EnchantProvider *provider; +#if defined(_WIN32) + char* szModule; + + szModule = enchant_get_registry_value ("Aspell", "Module"); + if(szModule) + { + WCHAR* wszModule; + + wszModule = g_utf8_to_utf16 (szModule, -1, NULL, NULL, NULL); + LoadLibrary(wszModule); + g_free(wszModule); + } +#endif + provider = g_new0 (EnchantProvider, 1); provider->dispose = aspell_provider_dispose; provider->request_dict = aspell_provider_request_dict; |