| Index: installer/installer.gyp |
| =================================================================== |
| --- a/installer/installer.gyp |
| +++ b/installer/installer.gyp |
| @@ -671,35 +671,19 @@ |
| ################################## |
| ############# |
| - # Custom Action library for the installer |
| + # Custom Action DLL for the installer |
| ############# |
| { |
| 'target_name': 'installer-ca', |
| 'type': 'shared_library', |
| + 'dependencies': [ 'installer-library' ], |
| 'sources': |
| [ |
| - # |
| - # Custom Action |
| - # |
| 'src/custom-action/abp_ca.cpp', |
| 'src/custom-action/abp_ca.def', |
| 'src/custom-action/abp_ca.rc', |
| 'src/custom-action/close_application.cpp', |
| - # |
| - # Windows Installer library |
| - # |
| - 'src/installer-lib/database.cpp', |
| - 'src/installer-lib/database.h', |
| - 'src/installer-lib/DLL.cpp', |
| - 'src/installer-lib/DLL.h', |
| - 'src/installer-lib/interaction.cpp', |
| - 'src/installer-lib/interaction.h', |
| - 'src/installer-lib/property.cpp', |
| - 'src/installer-lib/property.h', |
| - 'src/installer-lib/record.cpp', |
| - 'src/installer-lib/record.h', |
| - 'src/installer-lib/session.cpp', |
| - 'src/installer-lib/session.h', |
| + 'src/custom-action/close_ie.wxi', |
| ], |
| 'include_dirs': |
| [ |
| @@ -719,14 +703,17 @@ |
| # Windows Installer library |
| ############# |
| { |
| - 'target_name': 'installer-ca-lib', |
| + 'target_name': 'installer-library', |
| 'type': 'static_library', |
| 'sources': |
| [ |
| + 'src/installer-lib/custom-i18n.h', |
| + 'src/installer-lib/custom-i18n.wxi', |
| 'src/installer-lib/database.cpp', |
| 'src/installer-lib/database.h', |
| 'src/installer-lib/DLL.cpp', |
| 'src/installer-lib/DLL.h', |
| + 'src/installer-lib/handle.h', |
| 'src/installer-lib/interaction.cpp', |
| 'src/installer-lib/interaction.h', |
| 'src/installer-lib/process.cpp', |
| @@ -742,6 +729,13 @@ |
| [ |
| 'src/installer-lib', |
| ], |
| + 'direct_dependent_settings': |
| + { |
| + 'include_dirs': |
| + [ |
| + 'src/installer-lib', |
| + ], |
| + }, |
| 'link_settings': |
| { |
| 'libraries': [ 'user32.lib', 'Shell32.lib', 'advapi32.lib', 'msi.lib', 'Version.lib' ] |
| @@ -752,25 +746,144 @@ |
| } |
| }, |
| + ############# |
| + # Custom actions for library test MSI |
| + ############# |
| + { |
| + 'target_name': 'installer-library-test-customactions', |
| + 'type': 'shared_library', |
| + 'dependencies': |
| + [ |
| + 'installer-library', |
| + ], |
| + 'sources': |
| + [ |
| + 'src/installer-lib/test/test-installer-lib-ca.cpp', |
| + 'src/installer-lib/test/test-installer-lib-ca.def', |
| + 'src/installer-lib/test/test-installer-lib-ca.rc', |
| + 'src/installer-lib/test/test-installer-lib-sandbox.cpp', |
| + 'src/installer-lib/test/custom-action-fail.cpp', |
| + 'src/custom-action/close_application.cpp', |
| + ], |
| + }, |
| + |
| + ############# |
| + # WiX compile for library test MSI |
| + ############# |
| + { |
| + 'target_name': 'installer-library-test-wix', |
| + 'type': 'none', |
| + 'sources': |
| + [ |
| + 'src/installer-lib/test/test-installer-lib.wxs', |
| + 'src/installer-lib/custom-i18n.wxi', |
| + ], |
| + 'actions': |
| + [ { |
| + 'action_name': 'WiX compile', |
| + 'message': 'Compiling WiX source', |
| + 'inputs': |
| + [ |
| + 'src/installer-lib/test/test-installer-lib.wxs' |
| + ], |
| + 'outputs': |
| + [ |
| + '<(build_dir_arch)/test-installer-lib.wixobj' |
| + ], |
| + 'action': |
| + [ 'candle -nologo -dNoDefault ', '-out', '<@(_outputs)', '<@(_inputs)' ] |
| + } ] |
| + }, |
| + |
| + ############# |
| + # WiX link for library test MSI |
| + ############# |
| + { |
| + 'target_name': 'installer-library-test-msi', |
| + 'type': 'none', |
| + 'dependencies': |
| + [ |
| + 'installer-library-test-customactions', |
| + 'installer-library-test-wix', |
| + ], |
| + 'sources': |
| + [ |
| + '<(build_dir_arch)/test-installer-lib.wixobj', |
| + ], |
| + 'actions': |
| + [ { |
| + 'action_name': 'WiX link', |
| + 'message': 'Linking WiX objects', |
| + 'linked_inputs': |
| + [ |
| + '<(build_dir_arch)/test-installer-lib.wixobj', |
| + ], |
| + 'localization_input': |
| + [ |
| + 'src/custom-action/close_ie_default.wxl', # Keep the .WXL file out of 'sources', since otherwise the custom rule will kick in |
| + ], |
| + 'inputs': |
| + [ |
| + '<@(_linked_inputs)', |
| + |
| + # Keep the .WXL file out of here, since otherwise the custom rule will kick in |
| + # This isn't the best solution, since it means manual recompilation it this file changes, |
| + # but it's easier to do this than to deal with how to change the default rule for '.wxl' that all the MSI targets use. |
| + #'<@(_localization_input)', |
| + |
| + 'src/custom-action/close_ie.wxi', |
| + '<(build_dir_arch)/Debug/installer-library-test-customactions.dll' |
| + ], |
| + 'outputs': |
| + [ |
| + '<(build_dir_arch)/test-installer-lib.msi' |
| + ], |
| + 'action': |
| + # ICE71: The Media table has no entries |
| + # Suppress ICE71 because the test MSI does not install any files. |
| + [ |
| + 'light -notidy -nologo -ext WixUIExtension -sice:ICE71', |
| + '<@(_linked_inputs)', |
| + '-out', '<(build_dir_arch)/test-installer-lib.msi', |
| + '-loc', '<@(_localization_input)' |
| + ] |
| + } ] |
| + }, |
| + |
| + ############# |
| + # Custom Action unit tests |
| + ############# |
| { |
| 'target_name': 'installer-ca-tests', |
| 'type': 'executable', |
| - 'dependencies': [ |
| - 'installer-ca-lib', |
| + 'dependencies': |
| + [ |
| + 'installer-library', |
| + 'installer-library-test-msi', # Some unit tests open the test MSI database |
| 'googletest.gyp:googletest_main', |
| ], |
| - 'sources': [ |
| + 'sources': |
| + [ |
| + 'src/installer-lib/test/database_test.cpp', |
| 'src/installer-lib/test/process_test.cpp', |
| + 'src/installer-lib/test/property_test.cpp', |
| 'src/installer-lib/test/record_test.cpp', |
| ], |
| - 'link_settings': { |
| + 'link_settings': |
| + { |
| 'libraries': [], |
| }, |
| - 'msvs_settings': { |
| - 'VCLinkerTool': { |
| + 'msvs_settings': |
| + { |
| + 'VCLinkerTool': |
| + { |
| 'SubSystem': '1', # Console |
| }, |
| }, |
| - } |
| + }, |
| + |
| ] |
| } |
| + |
| + |
| + |