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.

137 lines
4.4 KiB

  1. #ifndef __INSTALLER_H_
  2. #define __INSTALLER_H_
  3. #include "stdio.h"
  4. #include "string.h"
  5. #include <windows.h>
  6. #include <fdi.h>
  7. #ifdef _DEBUG
  8. #define INIFILE TEXT(".\\layout.inf")
  9. #endif
  10. #define MUIINFFILENAME TEXT("mui.inf")
  11. #define MUIINF TEXT(".\\mui.inf")
  12. #define HELPDIR TEXT("HELP\\MUI")
  13. #define MUI_LANGUAGES_SECTION TEXT("Languages")
  14. #define MUI_COMPONENTS_SECTION TEXT("Components")
  15. #define MUI_LANGPACK_SECTION TEXT("LanguagePack")
  16. #define MUI_DISPLAYNAME_SECTION TEXT("LanguageDisplayName")
  17. #define MUI_COUNTRYNAME_SECTION TEXT("UseCountryName")
  18. #define MUI_UIFILESIZE_SECTION TEXT("FileSize_UI")
  19. #define MUI_UIFILESIZE_SECTION_IA64 TEXT("FileSize_UI_IA64")
  20. #define MUI_LPKFILESIZE_SECTION TEXT("FileSize_LPK")
  21. #define MUI_LPKFILESIZE_SECTION_IA64 TEXT("FileSize_LPK_IA64")
  22. #define MUI_CDLAYOUT_SECTION TEXT("CD_LAYOUT")
  23. #define MUI_CDLAYOUT_SECTION_IA64 TEXT("CD_LAYOUT_IA64")
  24. #define MUI_FILELAYOUT_SECTION TEXT("File_Layout")
  25. #define MUI_NOFALLBACK_SECTION TEXT("FileType_NoFallback")
  26. #define MUI_CDLABEL TEXT("cdlabel")
  27. #define MUI_LIP_LANGUAGES_SECTION TEXT("LIP_Languages")
  28. #define MUI_LIP_ALLOW_SWITCH_SECTION TEXT("LIP_Allow_Switch")
  29. #define PLATFORMNAME_PRO TEXT("P")
  30. #define PLATFORMNAME_SRV TEXT("S")
  31. #define PLATFORMNAME_AS TEXT("A")
  32. #define PLATFORMNAME_DTC TEXT("D")
  33. #define IE5_MUIINF_FILE TEXT("ie5ui.inf")
  34. #define IE5_MUI_DIR TEXT("ie5")
  35. #define IE5_INSTALL_SECTION TEXT("DefaultInstall")
  36. #define IE5_UNINSTALL_SECTION TEXT("Uninstall")
  37. #define IE5_Satellite_HOME TEXT("Program Files\\Internet Explorer\\MUI\\")
  38. #define IE5_Satellite_WEB TEXT("web\\mui\\")
  39. #define IE5_Satellite_JAVA TEXT("Java\\Help\\")
  40. #define IE5_Satellite_HH TEXT("system32\\mui\\")
  41. #define DEFAULT_CD_NUMBER 2
  42. #define MFL 20
  43. #define DIRNUMBER 100
  44. #define FILERENAMENUMBER 200
  45. #define NOTFALLBACKNUMBER 20
  46. #define MUIDIR TEXT("MUI")
  47. #define FALLBACKDIR TEXT("\\MUI\\FALLBACK")
  48. //
  49. // max size of fontlink string, same as GRE
  50. //
  51. #define FONTLINK_BUF_SIZE MAX_PATH+LF_FACESIZE
  52. //
  53. // Diamond definitions/structures (diamond.c)
  54. //
  55. #define DIAMOND_NONE 0x00000000
  56. #define DIAMOND_GET_DEST_FILE_NAME 0x00000001
  57. #define DIAMOND_FILE 0x00000002
  58. #define MUI_IS_WIN2K_PRO 0
  59. #define MUI_IS_WIN2K_SERVER 1
  60. #define MUI_IS_WIN2K_ADV_SERVER_OR_DATACENTER 2
  61. #define MUI_IS_WIN2K_DATACENTER 3
  62. #define MUI_IS_WIN2K_DC 4
  63. #define MUI_IS_WIN2K_ENTERPRISE 5
  64. #define MUI_IS_WIN2K_DC_DATACENTER 6
  65. #define MUI_IS_WIN2K_PERSONAL 7
  66. typedef struct
  67. {
  68. UINT flags;
  69. char szSrcFileName[ MAX_PATH ];
  70. char szSrcFilePath[ MAX_PATH ];
  71. char szDestFilePath[ MAX_PATH ];
  72. } DIAMOND_PACKET, *PDIAMOND_PACKET;
  73. //
  74. // Diamond APIs (diamond.c)
  75. //
  76. HFDI Muisetup_InitDiamond();
  77. BOOL Muisetup_FreeDiamond();
  78. void Muisetup_DiamondReset(
  79. PDIAMOND_PACKET pDiamond);
  80. BOOL Muisetup_IsDiamondFile(
  81. PWSTR pwszFileName,
  82. PWSTR pwszOriginalName,
  83. INT nSize,
  84. PDIAMOND_PACKET pDiamond);
  85. BOOL Muisetup_CopyDiamondFile(
  86. PDIAMOND_PACKET pDiamond,
  87. PWSTR pwszCopyTo);
  88. int EnumLanguages(LPTSTR Languages, BOOL bCheckDir = TRUE);
  89. BOOL checkversion(BOOL bMatchBuildNumber);
  90. BOOL FileExists(LPTSTR szFile);
  91. BOOL EnumDirectories(void);
  92. BOOL EnumFileRename();
  93. BOOL EnumTypeNotFallback();
  94. BOOL CopyFileFailed(LPTSTR lpFile, DWORD dwErrorCode);
  95. BOOL CopyFiles(HWND hWnd, LPTSTR Languages);
  96. BOOL MofCompileLanguages(LPTSTR Languages);
  97. BOOL UpdateRegistry(LPTSTR Languages,BOOL *lpbFontLinkRegistryTouched);
  98. BOOL UpdateRegistry_FontLink(LPTSTR Languages,BOOL *lpbFontLinkRegistryTouched);
  99. BOOL MakeDir(LPTSTR szTarget);
  100. BOOL MakeDirFailed(LPTSTR lpDirectory);
  101. BOOL ExecuteComponentINF(
  102. HWND hDlg, PTSTR pComponentName, PTSTR pComponentInfFile, PTSTR pInstallSection, BOOL bInstall);
  103. BOOL CheckLanguageDirectoryExist(LPTSTR Languages);
  104. BOOL CheckProductType(INT_PTR nType);
  105. BOOL CompareMuisetupVersion(LPTSTR pszSrc,LPTSTR pszTarget);
  106. BOOL IsFileBeRenamed(LPTSTR lpszSrc,LPTSTR lpszDest);
  107. BOOL IsFileInRenameTable(LPTSTR lpszSrc);
  108. BOOL InstallComponentsMUIFiles(PTSTR pszLangSourceDir, PTSTR pszLanguage, BOOL isInstall);
  109. #endif //__INSTALLER_H