[atk] Visual Studio Builds: Don't Generate atk.def



commit e9fc7ac5abfcea9cc59fd6119ccdb6a818f088ee
Author: Chun-wei Fan <fanchunwei src gnome org>
Date:   Fri Apr 25 11:32:33 2014 +0800

    Visual Studio Builds: Don't Generate atk.def
    
    Update the config.h.win32.in template to define _ATK_EXTERN as
    __declspec(dllexport) extern for Visual Studio builds, so that the public
    symbols and variables can be exported during the build, and generating
    atk.def will no longer be needed.  Update the projects and property sheets
    accordingly.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=728031

 build/win32/vs10/atk-gen-src.props     |    8 ------
 build/win32/vs10/atk.vcxproj.filtersin |    1 -
 build/win32/vs10/atk.vcxprojin         |   18 ---------------
 build/win32/vs9/atk-gen-src.vsprops    |    7 ------
 build/win32/vs9/atk.vcprojin           |   38 --------------------------------
 config.h.win32.in                      |    7 ++++++
 6 files changed, 7 insertions(+), 72 deletions(-)
---
diff --git a/build/win32/vs10/atk-gen-src.props b/build/win32/vs10/atk-gen-src.props
index 60783a8..4c1fb10 100644
--- a/build/win32/vs10/atk-gen-src.props
+++ b/build/win32/vs10/atk-gen-src.props
@@ -20,11 +20,6 @@ $(GLibEtcInstallRoot)\bin\glib-genmarshal --prefix=atk_marshal atkmarshal.list -
 
 cd $(SolutionDir)
     </GenMarshalSrc>
-    <GenerateAtkDef>
-echo EXPORTS &gt; $(DefDir)\atk.def
-
-cl /EP ..\..\..\atk\atk.symbols &gt;&gt; $(DefDir)\atk.def
-    </GenerateAtkDef>
   </PropertyGroup>
   <PropertyGroup>
     <_PropertySheetDisplayName>atkgensrcprops</_PropertySheetDisplayName>
@@ -36,8 +31,5 @@ cl /EP ..\..\..\atk\atk.symbols &gt;&gt; $(DefDir)\atk.def
     <BuildMacro Include="GenMarshalSrc">
       <Value>$(GenMarshalSrc)</Value>
     </BuildMacro>
-    <BuildMacro Include="GenerateAtkDef">
-      <Value>$(GenerateAtkDef)</Value>
-    </BuildMacro>
   </ItemGroup>
 </Project>
diff --git a/build/win32/vs10/atk.vcxproj.filtersin b/build/win32/vs10/atk.vcxproj.filtersin
index d83ee42..cbc94a4 100644
--- a/build/win32/vs10/atk.vcxproj.filtersin
+++ b/build/win32/vs10/atk.vcxproj.filtersin
@@ -20,7 +20,6 @@
   <ItemGroup>
     <CustomBuild Include="..\..\..\config.h.win32"><Filter>Resource Files</Filter></CustomBuild>
     <CustomBuild Include="..\..\..\atk\atkmarshal.list"><Filter>Resource Files</Filter></CustomBuild>
-    <CustomBuild Include="..\..\..\atk\atk.symbols"><Filter>Resource Files</Filter></CustomBuild>
   </ItemGroup>
   <ItemGroup>
     <ResourceCompile Include="..\..\..\atk\atk.rc">
diff --git a/build/win32/vs10/atk.vcxprojin b/build/win32/vs10/atk.vcxprojin
index 66eb5fc..f37b8c9 100644
--- a/build/win32/vs10/atk.vcxprojin
+++ b/build/win32/vs10/atk.vcxprojin
@@ -86,7 +86,6 @@
     <Link>
       <OutputFile>$(OutDir)$(AtkDllPrefix)$(ProjectName)$(AtkDllSuffix).dll</OutputFile>
       <IgnoreSpecificDefaultLibraries>%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
-      <ModuleDefinitionFile>$(IntDir)\atk.def</ModuleDefinitionFile>
       <GenerateDebugInformation>true</GenerateDebugInformation>
       <SubSystem>Windows</SubSystem>
       <ImportLibrary>$(OutDir)$(ProjectName)-$(ApiVersion).lib</ImportLibrary>
@@ -108,7 +107,6 @@
     <Link>
       <OutputFile>$(OutDir)$(AtkDllPrefix)$(ProjectName)$(AtkDllSuffix).dll</OutputFile>
       <IgnoreSpecificDefaultLibraries>%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
-      <ModuleDefinitionFile>$(IntDir)\atk.def</ModuleDefinitionFile>
       <GenerateDebugInformation>true</GenerateDebugInformation>
       <SubSystem>Windows</SubSystem>
       <OptimizeReferences>true</OptimizeReferences>
@@ -132,7 +130,6 @@
     <Link>
       <AdditionalDependencies>%(AdditionalDependencies)</AdditionalDependencies>
       <OutputFile>$(OutDir)$(AtkDllPrefix)$(ProjectName)$(AtkDllSuffix).dll</OutputFile>
-      <ModuleDefinitionFile>$(IntDir)\atk.def</ModuleDefinitionFile>
       <GenerateDebugInformation>true</GenerateDebugInformation>
       <SubSystem>Windows</SubSystem>
       <ImportLibrary>$(TargetDir)$(ProjectName)-$(ApiVersion).lib</ImportLibrary>
@@ -151,7 +148,6 @@
     <Link>
       <AdditionalDependencies>%(AdditionalDependencies)</AdditionalDependencies>
       <OutputFile>$(OutDir)$(AtkDllPrefix)$(ProjectName)$(AtkDllSuffix).dll</OutputFile>
-      <ModuleDefinitionFile>$(IntDir)\atk.def</ModuleDefinitionFile>
       <GenerateDebugInformation>true</GenerateDebugInformation>
       <SubSystem>Windows</SubSystem>
       <OptimizeReferences>true</OptimizeReferences>
@@ -192,20 +188,6 @@
       <Command Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(GenMarshalSrc)</Command>
       <Outputs 
Condition="'$(Configuration)|$(Platform)'=='Release|x64'">..\..\..\atk\atkmarshal.h;..\..\..\atk\atkmarshal.c;%(Outputs)</Outputs>
     </CustomBuild>
-    <CustomBuild Include="..\..\..\atk\atk.symbols">
-      <Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Generating atk.def...</Message>
-      <Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(GenerateAtkDef)</Command>
-      <Outputs 
Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(IntDir)atk.def;%(Outputs)</Outputs>
-      <Message Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Generating atk.def...</Message>
-      <Command Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(GenerateAtkDef)</Command>
-      <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(IntDir)atk.def;%(Outputs)</Outputs>
-      <Message Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Generating atk.def...</Message>
-      <Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(GenerateAtkDef)</Command>
-      <Outputs 
Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(IntDir)atk.def;%(Outputs)</Outputs>
-      <Message Condition="'$(Configuration)|$(Platform)'=='Release|x64'">Generating atk.def...</Message>
-      <Command Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(GenerateAtkDef)</Command>
-      <Outputs 
Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(IntDir)atk.def;%(Outputs)</Outputs>
-    </CustomBuild>
   </ItemGroup>
   <ItemGroup>
     <ResourceCompile Include="..\..\..\atk\atk.rc" />
diff --git a/build/win32/vs9/atk-gen-src.vsprops b/build/win32/vs9/atk-gen-src.vsprops
index d3fc31f..6641ee9 100644
--- a/build/win32/vs9/atk-gen-src.vsprops
+++ b/build/win32/vs9/atk-gen-src.vsprops
@@ -22,11 +22,4 @@ $(GLibEtcInstallRoot)\bin\glib-genmarshal --prefix=atk_marshal atkmarshal.list -
 cd $(SolutionDir)&#x0D;&#x0A;
                      "
        />
-       <UserMacro
-               Name="GenerateAtkDef"
-               Value="
-echo EXPORTS &gt; $(DefDir)\atk.def&#x0D;&#x0A;
-cl /EP ..\..\..\atk\atk.symbols &gt;&gt; $(DefDir)\atk.def
-                     "
-       />
 </VisualStudioPropertySheet>
diff --git a/build/win32/vs9/atk.vcprojin b/build/win32/vs9/atk.vcprojin
index ec1174c..5d2a578 100644
--- a/build/win32/vs9/atk.vcprojin
+++ b/build/win32/vs9/atk.vcprojin
@@ -44,7 +44,6 @@
                                OutputFile="$(OutDir)\$(AtkDllPrefix)$(ProjectName)$(AtkDllSuffix).dll"
                                LinkIncremental="2"
                                IgnoreDefaultLibraryNames=""
-                               ModuleDefinitionFile="$(IntDir)\atk.def"
                                GenerateDebugInformation="true"
                                SubSystem="2"
                                ImportLibrary="$(OutDir)\$(ProjectName)-$(ApiVersion).lib"
@@ -77,7 +76,6 @@
                                OutputFile="$(OutDir)\$(AtkDllPrefix)$(ProjectName)$(AtkDllSuffix).dll"
                                LinkIncremental="1"
                                IgnoreDefaultLibraryNames=""
-                               ModuleDefinitionFile="$(IntDir)\atk.def"
                                GenerateDebugInformation="true"
                                SubSystem="2"
                                OptimizeReferences="2"
@@ -111,7 +109,6 @@
                                AdditionalDependencies=""
                                OutputFile="$(OutDir)\$(AtkDllPrefix)$(ProjectName)$(AtkDllSuffix).dll"
                                LinkIncremental="2"
-                               ModuleDefinitionFile="$(IntDir)\atk.def"
                                GenerateDebugInformation="true"
                                SubSystem="2"
                                ImportLibrary="$(TargetDir)$(ProjectName)-$(ApiVersion).lib"
@@ -140,7 +137,6 @@
                                AdditionalDependencies=""
                                OutputFile="$(OutDir)\$(AtkDllPrefix)$(ProjectName)$(AtkDllSuffix).dll"
                                LinkIncremental="2"
-                               ModuleDefinitionFile="$(IntDir)\atk.def"
                                GenerateDebugInformation="true"
                                SubSystem="2"
                                OptimizeReferences="2"
@@ -239,40 +235,6 @@
                                        />
                                </FileConfiguration>
                        </File>
-                       <File RelativePath="..\..\..\atk\atk.symbols">
-                               <FileConfiguration Name="Debug|Win32">
-                                       <Tool
-                                               Name="VCCustomBuildTool"
-                                               Description="Generating atk.def..."
-                                               CommandLine="$(GenerateAtkDef)"
-                                               Outputs="$(IntDir)\atk.def"
-                                       />
-                               </FileConfiguration>
-                               <FileConfiguration Name="Release|Win32">
-                                       <Tool
-                                               Name="VCCustomBuildTool"
-                                               Description="Generating atk.def..."
-                                               CommandLine="$(GenerateAtkDef)"
-                                               Outputs="$(IntDir)\atk.def"
-                                       />
-                               </FileConfiguration>
-                               <FileConfiguration Name="Debug|x64">
-                                       <Tool
-                                               Name="VCCustomBuildTool"
-                                               Description="Generating atk.def..."
-                                               CommandLine="$(GenerateAtkDef)"
-                                               Outputs="$(IntDir)\atk.def"
-                                       />
-                               </FileConfiguration>
-                               <FileConfiguration Name="Release|x64">
-                                       <Tool
-                                               Name="VCCustomBuildTool"
-                                               Description="Generating atk.def..."
-                                               CommandLine="$(GenerateAtkDef)"
-                                               Outputs="$(IntDir)\atk.def"
-                                       />
-                               </FileConfiguration>
-                       </File>
                        <File RelativePath="..\..\..\atk\atk.rc" />
                </Filter>
        </Files>
diff --git a/config.h.win32.in b/config.h.win32.in
index c85f239..d815b58 100644
--- a/config.h.win32.in
+++ b/config.h.win32.in
@@ -98,3 +98,10 @@
 
 /* Version number of package */
 #define VERSION "@ATK_MAJOR_VERSION  @ATK_MINOR_VERSION  @ATK_MICRO_VERSION@"
+
+/* defines how to decorate public symbols while building */
+#ifdef _MSC_VER
+#define _ATK_EXTERN __declspec (dllexport) extern
+#else
+#define _ATK_EXTERN __attribute__((visibility("default"))) __declspec (dllexport) extern
+#endif


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]