Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

71 lines
2.6 KiB

  1. POSTBUILD_TARGET=$(_NTPOSTBLD)\$(TARGET)
  2. TARGET_BINARIES=$(POSTBUILD_TARGET)\binary
  3. MSI_BASE_TREE=$(_NTPOSTBLD)$(MSI_ALT_TARGET)
  4. MSI_FILE_LIST=\
  5. $(MSI_BASE_TREE)\msihnd.dll \
  6. $(MSI_BASE_TREE)\msiexec.exe \
  7. $(MSI_BASE_TREE)\msisip.dll \
  8. $(_NTPOSTBLD)\msimsg.dll \
  9. !if "$(MSI_BUILD_UNICODE)"=="1"
  10. $(POSTBUILD_TARGET)\msi.dll
  11. !else
  12. $(MSI_BASE_TREE)\msi.dll
  13. !endif
  14. INSTMSI_FILE_LIST=\
  15. $(MSI_BASE_TREE)\dump\msiinst.exe
  16. INSTMSI_FILE_LIST=$(MAKEFILE) instmsi.sed instmsi.msi $(MSI_FILE_LIST) $(INSTMSI_FILE_LIST)
  17. !if "$(MSI_BUILD_UNICODE)"=="1"
  18. INSTMSI_FILE_LIST=$(INSTMSI_FILE_LIST) msi.cat
  19. !endif
  20. $(POSTBUILD_TARGET)\InstMsi.exe: $(INSTMSI_FILE_LIST)
  21. @echo MSI_BUILD_NUMBER=$(MSI_BUILD_NUMBER)
  22. @echo TARGET=$(TARGET)
  23. @echo REGSIP_DIR=$(REGSIP_DIR)
  24. @echo MSI_ALT_TARGET=$(MSI_ALT_TARGET)
  25. @echo MSI_BUILD_UNICODE=$(MSI_BUILD_UNICODE)
  26. @echo POSTBUILD_TARGET=$(POSTBUILD_TARGET)
  27. @echo TARGET_BINARIES=$(TARGET_BINARIES)
  28. @echo MSI_BASE_TREE=$(MSI_BASE_TREE)
  29. @echo MSI_FILE_LIST=$(MSI_FILE_LIST)
  30. iexpress /Q /M /N $(POSTBUILD_TARGET)\InstMsi.sed
  31. -$(POSTBUILD_TARGET)\dump\jdate2.exe -x -version 1$(MSI_BUILD_NUMBER) $@
  32. instmsi.sed: dump\$(@F)
  33. perl -p -e "s'_NTTREE'$(_NTPOSTBLD)'gi;s'_NTPOSTBLD'$(_NTPOSTBLD)'gi" dump\$(@F) > $@
  34. msi.cat: $(MAKEFILE) msi.cdf $(MSI_FILE_LIST)
  35. !if "$(MSI_BUILD_UNICODE)"=="1"
  36. rebase -b 0x770f0000 msi.dll
  37. copy /y msi.cdf msi.tmp.cdf
  38. perl -pi.bak -e "s'MSI_BASE_TREE'$(MSI_BASE_TREE)'gi;s'TARGET'$(TARGET)'gi" msi.tmp.cdf
  39. perl -pi.bak -e "s'_NTTREE'$(_NTPOSTBLD)'gi;s'_NTPOSTBLD'$(_NTPOSTBLD)'gi" msi.tmp.cdf
  40. makecat.exe msi.tmp.cdf
  41. ntsign.cmd -f $@
  42. !else
  43. msi.cdf:
  44. #this file does not exist in ANSI instmsi
  45. !endif
  46. instmsi.msi: $(POSTBUILD_TARGET)\binary\regsip.dll $(MAKEFILE) $(POSTBUILD_TARGET)\binary\msiregmv.exe
  47. msidb.exe -i -f$(_NTPOSTBLD)\$(TARGET) -dinstmsi.msi binary.idt
  48. # temp fix: use different directory around msifiler calls to prevent msifiler from picking up the incorrect msi.dll
  49. cd $(_NTDRIVE)$(_NTROOT)
  50. msifiler.exe -d $(_NTPOSTBLD)\$(TARGET)\instmsi.msi -s $(_NTPOSTBLD)\ >>NUL
  51. msifiler.exe -d $(_NTPOSTBLD)\$(TARGET)\instmsi.msi -s $(POSTBUILD_TARGET)\ >> NUL
  52. msifiler.exe -d $(_NTPOSTBLD)\$(TARGET)\instmsi.msi -s $(POSTBUILD_TARGET)\dump\ >> NUL
  53. msifiler.exe -d $(_NTPOSTBLD)\$(TARGET)\instmsi.msi -s $(_NTPOSTBLD)\support\tools\ >>NUL
  54. cd $(MAKEDIR)
  55. $(TARGET_BINARIES)\regsip.dll: $(_NTPOSTBLD)\$(REGSIP_DIR)\$(@F)
  56. if not exist $(TARGET_BINARIES) md $(TARGET_BINARIES)
  57. xcopy /y $(_NTPOSTBLD)\$(REGSIP_DIR)\$(@F) $(@D)
  58. $(TARGET_BINARIES)\msiregmv.exe: $(_NTPOSTBLD)\$(@F)
  59. if not exist $(TARGET_BINARIES) md $(TARGET_BINARIES)
  60. xcopy /y $(_NTPOSTBLD)\$(@F) $(@D)