| OLD | NEW |
| (Empty) |
| 1 #!/usr/bin/python2.4 | |
| 2 # | |
| 3 # Copyright 2009-2010 Google Inc. | |
| 4 # | |
| 5 # Licensed under the Apache License, Version 2.0 (the "License"); | |
| 6 # you may not use this file except in compliance with the License. | |
| 7 # You may obtain a copy of the License at | |
| 8 # | |
| 9 # http://www.apache.org/licenses/LICENSE-2.0 | |
| 10 # | |
| 11 # Unless required by applicable law or agreed to in writing, software | |
| 12 # distributed under the License is distributed on an "AS IS" BASIS, | |
| 13 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | |
| 14 # See the License for the specific language governing permissions and | |
| 15 # limitations under the License. | |
| 16 # ======================================================================== | |
| 17 | |
| 18 | |
| 19 Import('env') | |
| 20 | |
| 21 | |
| 22 # | |
| 23 # Build executecustomaction.dll | |
| 24 # | |
| 25 | |
| 26 lib_target_name = 'executecustomaction_lib' | |
| 27 | |
| 28 lib_env = env.Clone() | |
| 29 | |
| 30 lib_inputs = [ | |
| 31 'execute_repair_file.cc', | |
| 32 ] | |
| 33 if env.Bit('use_precompiled_headers'): | |
| 34 lib_inputs += lib_env.EnablePrecompile(lib_target_name) | |
| 35 | |
| 36 lib_output = lib_env.ComponentLibrary( | |
| 37 lib_name=lib_target_name, | |
| 38 source=lib_inputs, | |
| 39 ) | |
| 40 | |
| 41 lib_env.OmahaUnittest( | |
| 42 name='repair_exe_custom_action_unittest', | |
| 43 source='execute_repair_file_unittest.cc', | |
| 44 LIBS=lib_target_name + '.lib', | |
| 45 ) | |
| 46 | |
| 47 | |
| 48 dll_target_name = 'executecustomaction' | |
| 49 | |
| 50 dll_env = env.Clone( | |
| 51 # Build a dll, not a lib. | |
| 52 COMPONENT_STATIC = False, | |
| 53 ) | |
| 54 | |
| 55 dll_env.Append( | |
| 56 LIBS = [ | |
| 57 ('atls.lib', 'atlsd.lib')[dll_env.Bit('debug')], | |
| 58 ('libcmt.lib', 'libcmtd.lib')[dll_env.Bit('debug')], | |
| 59 ('libcpmt.lib', 'libcpmtd.lib')[dll_env.Bit('debug')], | |
| 60 '$LIB_DIR/base.lib', | |
| 61 '$LIB_DIR/google_update_recovery.lib', | |
| 62 '$LIB_DIR/repair_goopdate.lib', | |
| 63 'crypt32.lib', | |
| 64 'msi.lib', | |
| 65 'wintrust.lib', | |
| 66 | |
| 67 # These are required by base.lib | |
| 68 'netapi32.lib', | |
| 69 'psapi.lib', | |
| 70 'rasapi32.lib', | |
| 71 'shlwapi.lib', | |
| 72 'userenv.lib', | |
| 73 'version.lib', | |
| 74 'wtsapi32.lib', | |
| 75 lib_target_name + '.lib', | |
| 76 ], | |
| 77 | |
| 78 CPPDEFINES = [ | |
| 79 '_USRDLL', | |
| 80 ], | |
| 81 ) | |
| 82 | |
| 83 dll_inputs = [ | |
| 84 'executecustomaction.cc', | |
| 85 'executecustomaction.def', | |
| 86 ] | |
| 87 if env.Bit('use_precompiled_headers'): | |
| 88 dll_inputs += dll_env.EnablePrecompile(dll_target_name) | |
| 89 | |
| 90 dll_env.ComponentLibrary( | |
| 91 lib_name=dll_target_name, | |
| 92 source=dll_inputs, | |
| 93 ) | |
| 94 | |
| 95 | |
| 96 # | |
| 97 # Build testelevateusingmsp.exe | |
| 98 # | |
| 99 test_env = env.Clone() | |
| 100 | |
| 101 test_env['LIBS'] += [ | |
| 102 ('atls.lib', 'atlsd.lib')[test_env.Bit('debug')], | |
| 103 ('libcmt.lib', 'libcmtd.lib')[test_env.Bit('debug')], | |
| 104 ('libcpmt.lib', 'libcpmtd.lib')[test_env.Bit('debug')], | |
| 105 '$LIB_DIR/base.lib', | |
| 106 '$LIB_DIR/repair_goopdate.lib', | |
| 107 'crypt32.lib', | |
| 108 'msi.lib', | |
| 109 'wintrust.lib', | |
| 110 # These are required by base.lib | |
| 111 'netapi32.lib', | |
| 112 'psapi.lib', | |
| 113 'rasapi32.lib', | |
| 114 'shlwapi.lib', | |
| 115 'userenv.lib', | |
| 116 'version.lib', | |
| 117 'wtsapi32.lib', | |
| 118 ] | |
| 119 | |
| 120 # This is a console application. | |
| 121 test_env.FilterOut(LINKFLAGS = ['/SUBSYSTEM:WINDOWS']) | |
| 122 test_env['LINKFLAGS'] += ['/SUBSYSTEM:CONSOLE'] | |
| 123 | |
| 124 target_name = 'testelevateusingmsp' | |
| 125 | |
| 126 test_inputs = [ | |
| 127 'testelevateusingmsp.cc', | |
| 128 ] | |
| 129 if env.Bit('use_precompiled_headers'): | |
| 130 test_inputs += test_env.EnablePrecompile(target_name) | |
| 131 | |
| 132 # This test requires arguments, so do not create a run alias. | |
| 133 test_env.ComponentTestProgram( | |
| 134 prog_name=target_name, | |
| 135 source=test_inputs, | |
| 136 COMPONENT_TEST_RUNNABLE=False | |
| 137 ) | |
| OLD | NEW |