| #!/usr/bin/python2.4 |
| # |
| # Copyright 2009 Google Inc. |
| # |
| # Licensed under the Apache License, Version 2.0 (the "License"); |
| # you may not use this file except in compliance with the License. |
| # You may obtain a copy of the License at |
| # |
| # http://www.apache.org/licenses/LICENSE-2.0 |
| # |
| # Unless required by applicable law or agreed to in writing, software |
| # distributed under the License is distributed on an "AS IS" BASIS, |
| # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| # See the License for the specific language governing permissions and |
| # limitations under the License. |
| # ======================================================================== |
| |
| Import('env') |
| |
| # |
| # Build uninstall_action.dll |
| # |
| dll_env = env.Clone( |
| # Build a dll, not a lib. |
| COMPONENT_STATIC = False, |
| ) |
| |
| dll_env.Append( |
| LIBS = [ |
| ('atls.lib', 'atlsd.lib')[dll_env.Bit('debug')], |
| ('libcmt.lib', 'libcmtd.lib')[dll_env.Bit('debug')], |
| ('libcpmt.lib', 'libcpmtd.lib')[dll_env.Bit('debug')], |
| 'msi.lib', |
| 'shlwapi.lib', |
| ], |
| |
| CPPDEFINES = [ |
| '_USRDLL', |
| '_WIN32_IE=0x0602', # Need this for the Shell reg functions. |
| ], |
| ) |
| |
| signed_target_name = 'uninstall_action' |
| target_name = signed_target_name + '_unsigned' |
| |
| dll_inputs = [ |
| 'uninstall_action.cc', |
| 'uninstall_action.def', |
| ] |
| |
| unsigned_dll = dll_env.ComponentLibrary( |
| lib_name=target_name, |
| source=dll_inputs, |
| ) |
| |
| signed_dll = dll_env.SignedBinary( |
| target=signed_target_name + '.dll', |
| source=unsigned_dll, |
| ) |
| |
| dll_env.Replicate('$STAGING_DIR', signed_dll) |
| dll_env.Replicate('$STAGING_DIR', |
| [f for f in unsigned_dll if f.suffix == '.pdb']) |