Leaked source code of windows server 2003
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.

90 lines
3.3 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. MSPATCHA_FILE_LIST=\
  15. !if "$(MSI_BUILD_UNICODE)"=="1"
  16. $(MSI_BASE_TREE)\Instmsi\unicode\msi_bins\mspatcha.dll
  17. !else
  18. $(MSI_BASE_TREE)\Instmsi\ansi\msi_bins\mspatcha.dll
  19. !endif
  20. INSTMSI_FILE_LIST=\
  21. $(MSI_BASE_TREE)\msi_bins\msiinst.exe
  22. INSTMSI_FILE_LIST=$(MAKEFILE) instmsi.sed instmsi.msi $(MSI_FILE_LIST) $(INSTMSI_FILE_LIST)
  23. !if "$(MSI_BUILD_UNICODE)"=="1"
  24. INSTMSI_FILE_LIST=$(INSTMSI_FILE_LIST) msi.cat mspatcha.cat
  25. !endif
  26. $(POSTBUILD_TARGET)\InstMsi.exe: $(INSTMSI_FILE_LIST)
  27. @echo MSI_BUILD_NUMBER=$(MSI_BUILD_NUMBER)
  28. @echo TARGET=$(TARGET)
  29. @echo REGSIP_DIR=$(REGSIP_DIR)
  30. @echo MSI_ALT_TARGET=$(MSI_ALT_TARGET)
  31. @echo MSI_BUILD_UNICODE=$(MSI_BUILD_UNICODE)
  32. @echo POSTBUILD_TARGET=$(POSTBUILD_TARGET)
  33. @echo TARGET_BINARIES=$(TARGET_BINARIES)
  34. @echo MSI_BASE_TREE=$(MSI_BASE_TREE)
  35. @echo MSI_FILE_LIST=$(MSI_FILE_LIST)
  36. iexpress /Q /M /N $(POSTBUILD_TARGET)\InstMsi.sed
  37. -$(POSTBUILD_TARGET)\msi_bins\jdate2.exe -x -version 1$(MSI_BUILD_NUMBER) $@
  38. instmsi.sed: msi_bins\$(@F)
  39. perl -p -e "s'_NTTREE'$(_NTPOSTBLD)'gi;s'_NTPOSTBLD'$(_NTPOSTBLD)'gi" msi_bins\$(@F) > $@
  40. msi.cat: $(MAKEFILE) msi.cdf $(MSI_FILE_LIST)
  41. !if "$(MSI_BUILD_UNICODE)"=="1"
  42. rebase -b 0x770f0000 msi.dll
  43. copy /y msi.cdf msi.tmp.cdf
  44. perl -pi.bak -e "s'MSI_BASE_TREE'$(MSI_BASE_TREE)'gi;s'TARGET'$(TARGET)'gi" msi.tmp.cdf
  45. perl -pi.bak -e "s'_NTTREE'$(_NTPOSTBLD)'gi;s'_NTPOSTBLD'$(_NTPOSTBLD)'gi" msi.tmp.cdf
  46. makecat.exe msi.tmp.cdf
  47. ntsign.cmd -f $@
  48. !else
  49. msi.cdf:
  50. #this file does not exist in ANSI instmsi
  51. !endif
  52. mspatcha.cat: $(MAKEFILE) mspatcha.cdf $(MSPATCHA_FILE_LIST)
  53. !if "$(MSI_BUILD_UNICODE)"=="1"
  54. copy /y mspatcha.cdf mspatcha.tmp.cdf
  55. perl -pi.bak -e "s'MSI_BASE_TREE'$(MSI_BASE_TREE)'gi;s'TARGET'$(TARGET)'gi" mspatcha.tmp.cdf
  56. perl -pi.bak -e "s'_NTTREE'$(_NTPOSTBLD)'gi;s'_NTPOSTBLD'$(_NTPOSTBLD)'gi" mspatcha.tmp.cdf
  57. makecat.exe mspatcha.tmp.cdf
  58. ntsign.cmd -f $@
  59. !else
  60. mspatcha.cdf:
  61. #this file does not exist in ANSI instmsi
  62. !endif
  63. instmsi.msi: $(POSTBUILD_TARGET)\binary\regsip.dll $(MAKEFILE) $(POSTBUILD_TARGET)\binary\msiregmv.exe
  64. msidb.exe -i -f$(_NTPOSTBLD)\$(TARGET) -dinstmsi.msi binary.idt
  65. # temp fix: use different directory around msifiler calls to prevent msifiler from picking up the incorrect msi.dll
  66. cd $(_NTDRIVE)$(_NTROOT)
  67. msifiler.exe -d $(_NTPOSTBLD)\$(TARGET)\instmsi.msi -s $(_NTPOSTBLD)\ >>NUL
  68. msifiler.exe -d $(_NTPOSTBLD)\$(TARGET)\instmsi.msi -s $(POSTBUILD_TARGET)\ >> NUL
  69. msifiler.exe -d $(_NTPOSTBLD)\$(TARGET)\instmsi.msi -s $(POSTBUILD_TARGET)\msi_bins\ >> NUL
  70. msifiler.exe -d $(_NTPOSTBLD)\$(TARGET)\instmsi.msi -s $(_NTPOSTBLD)\idw\ >>NUL
  71. cd $(MAKEDIR)
  72. $(TARGET_BINARIES)\regsip.dll: $(_NTPOSTBLD)\$(REGSIP_DIR)\$(@F)
  73. if not exist $(TARGET_BINARIES) md $(TARGET_BINARIES)
  74. xcopy /y $(_NTPOSTBLD)\$(REGSIP_DIR)\$(@F) $(@D)
  75. $(TARGET_BINARIES)\msiregmv.exe: $(_NTPOSTBLD)\$(@F)
  76. if not exist $(TARGET_BINARIES) md $(TARGET_BINARIES)
  77. xcopy /y $(_NTPOSTBLD)\$(@F) $(@D)