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.

185 lines
7.0 KiB

  1. /*****************************************************************************\
  2. * MODULE: genglobl.c
  3. *
  4. * The module contains global-vars for generation routines.
  5. *
  6. *
  7. * Copyright (C) 1996-1997 Microsoft Corporation
  8. * Copyright (C) 1996-1997 Hewlett Packard
  9. *
  10. * History:
  11. * 22-Nov-1996 <chriswil> Created.
  12. *
  13. \*****************************************************************************/
  14. #include "pch.h"
  15. // Synchonization section. We only allow one cab-generation at a time.
  16. //
  17. CRITICAL_SECTION g_csGenCab;
  18. // Command-Line Strings.
  19. //
  20. CONST TCHAR g_szCabCmd[] = TEXT("%s\\system32\\iexpress.exe /Q /N %s");
  21. CONST TCHAR g_szSedCmd[] = TEXT("wpnpinst.exe @%s.webpnp");
  22. CONST TCHAR g_szDatCmd[] = TEXT("/if\n/x\n/b \"%s\"\n/f \"%s\"\n/r \"%s\"\n/m \"%s\"\n/n \"%s\"\n/a \"%s\" /q\n");
  23. // Executable Names.
  24. //
  25. CONST TCHAR g_szNtPrintDll[] = TEXT("ntprint.dll");
  26. CONST TCHAR g_szCabName[] = TEXT("%04X%s%d");
  27. CONST TCHAR g_szDatName[] = TEXT("%04X");
  28. CONST TCHAR g_szDatFile[] = TEXT("cab_ipp.dat");
  29. // File-Extension Strings.
  30. //
  31. CONST TCHAR g_szDotCab[] = TEXT(".cab");
  32. CONST TCHAR g_szDotInf[] = TEXT(".inf");
  33. CONST TCHAR g_szDotSed[] = TEXT(".sed");
  34. CONST TCHAR g_szDotDat[] = TEXT(".dat");
  35. CONST TCHAR g_szDotBin[] = TEXT(".bin");
  36. CONST TCHAR g_szDotIpp[] = TEXT(".webpnp");
  37. CONST TCHAR g_szDotCat[] = TEXT(".cat");
  38. // Cab, Environment and Platform-Override strings. These strings
  39. // are built into a table in (genutil.cxx) which describes the various
  40. // architectures and version info.
  41. //
  42. CONST TCHAR g_szCabX86[] = TEXT("X86");
  43. CONST TCHAR g_szCabAXP[] = TEXT("AXP");
  44. CONST TCHAR g_szCabPPC[] = TEXT("PPC");
  45. CONST TCHAR g_szCabMIP[] = TEXT("MIP");
  46. CONST TCHAR g_szCabW9X[] = TEXT("W9X");
  47. CONST TCHAR g_szCabI64[] = TEXT("I64");
  48. CONST TCHAR g_szCabAMD64[] = TEXT("AMD64");
  49. CONST TCHAR g_szEnvX86[] = TEXT("Windows NT x86");
  50. CONST TCHAR g_szEnvAXP[] = TEXT("Windows NT Alpha_AXP");
  51. CONST TCHAR g_szEnvPPC[] = TEXT("Windows NT PowerPC");
  52. CONST TCHAR g_szEnvMIP[] = TEXT("Windows NT R4000");
  53. CONST TCHAR g_szEnvW9X[] = TEXT("Windows 4.0");
  54. CONST TCHAR g_szEnvI64[] = TEXT("Windows IA64");
  55. CONST TCHAR g_szEnvAMD64[] = TEXT("Windows AMD64");
  56. CONST TCHAR g_szPltX86[] = TEXT("i386");
  57. CONST TCHAR g_szPltAXP[] = TEXT("alpha");
  58. CONST TCHAR g_szPltPPC[] = TEXT("ppc");
  59. CONST TCHAR g_szPltMIP[] = TEXT("mips");
  60. CONST TCHAR g_szPltW9X[] = TEXT("i386");
  61. CONST TCHAR g_szPltI64[] = TEXT("ia64");
  62. CONST TCHAR g_szPltAMD64[] = TEXT("amd64");
  63. // Registry Strings.
  64. //
  65. CONST TCHAR g_szPrtReg[] = TEXT("SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\Print\\Printers");
  66. CONST TCHAR g_szIpAddr[] = TEXT("IpAddr");
  67. CONST TCHAR g_szPnpData[] = TEXT("PnpData");
  68. CONST TCHAR g_szMfgName[] = TEXT("Manufacturer");
  69. CONST TCHAR g_szPrtCabs[] = TEXT("PrtCabs");
  70. CONST TCHAR g_szPrtDir[] = TEXT("/Printers");
  71. // Metabase String for path to check for virtual roots
  72. //
  73. CONST TCHAR g_szMetabasePath[] = TEXT("LM/W3SVC/1/ROOT/PRINTERS");
  74. // NTPRINT Function-Pointers. These are used in GetProcAddress().
  75. // Therefore, require they be CHAR types.
  76. //
  77. CONST CHAR g_szSetupCreate[] = "PSetupCreatePrinterDeviceInfoList";
  78. CONST CHAR g_szSetupDestroy[] = "PSetupDestroyPrinterDeviceInfoList";
  79. CONST CHAR g_szSetupGet[] = "PSetupGetDriverInfForPrinter";
  80. // Common Strings.
  81. //
  82. CONST TCHAR g_szEmptyStr[] = TEXT("");
  83. CONST TCHAR g_szBkSlash[] = TEXT("\\");
  84. CONST TCHAR g_szVersionSect[] = TEXT("Version");
  85. // INF-File Strings.
  86. //
  87. CONST TCHAR g_szSkipDir[] = TEXT("A:\\__Skip__");
  88. CONST TCHAR g_szDestDirs[] = TEXT("DestinationDirs");
  89. CONST TCHAR g_szPrinterClass[] = TEXT("Printer");
  90. CONST TCHAR g_szCopyFiles[] = TEXT("CopyFiles");
  91. CONST TCHAR g_szLayoutKey[] = TEXT("LayoutFile");
  92. CONST TCHAR g_szWinDirSect[] = TEXT("WinntDirectories");
  93. CONST TCHAR g_szSrcDskFileSect[] = TEXT("SourceDisksFiles");
  94. // SED-File Strings.
  95. //
  96. CONST TCHAR g_szIExpress[] = TEXT("IExpress");
  97. CONST TCHAR g_szPackagePurpose[] = TEXT("PackagePurpose");
  98. CONST TCHAR g_szCreateCAB[] = TEXT("CreateCAB");
  99. CONST TCHAR g_szPostInstallCmd[] = TEXT("PostInstallCmd");
  100. CONST TCHAR g_szCompressionMemory[] = TEXT("CompressionMemory");
  101. CONST TCHAR g_szCompressionValue[] = TEXT("19");
  102. CONST TCHAR g_szCompressionType[] = TEXT("CompressionType");
  103. CONST TCHAR g_szCompressTypeVal[] = TEXT("LZX");
  104. CONST TCHAR g_szCompressionQuantum[] = TEXT("Quantum");
  105. CONST TCHAR g_szCompressionQuantVal[]= TEXT("7");
  106. CONST TCHAR g_szNone[] = TEXT("<None>");
  107. CONST TCHAR g_szClass[] = TEXT("Class");
  108. CONST TCHAR g_szSEDVersion[] = TEXT("SEDVersion");
  109. CONST TCHAR g_szOptions[] = TEXT("Options");
  110. CONST TCHAR g_szShowWindow[] = TEXT("ShowInstallProgramWindow");
  111. CONST TCHAR g_szUseLongFileName[] = TEXT("UseLongFileName");
  112. CONST TCHAR g_szHideAnimate[] = TEXT("HideExtractAnimation");
  113. CONST TCHAR g_szRebootMode[] = TEXT("RebootMode");
  114. CONST TCHAR g_szExtractorStub[] = TEXT("ExtractorStub");
  115. CONST TCHAR g_szSourceFiles[] = TEXT("SourceFiles");
  116. CONST TCHAR g_szStrings[] = TEXT("Strings");
  117. CONST TCHAR g_szTimeStamps[] = TEXT("TimeStamps");
  118. CONST TCHAR g_szSEDVersionNumber[] = TEXT("2.0");
  119. CONST TCHAR g_sz1[] = TEXT("1");
  120. CONST TCHAR g_sz0[] = TEXT("0");
  121. CONST TCHAR g_szNoReboot[] = TEXT("N");
  122. CONST TCHAR g_szTargetName[] = TEXT("TargetName");
  123. CONST TCHAR g_szAppLaunched[] = TEXT("AppLaunched");
  124. CONST TCHAR g_szTargetNameSection[] = TEXT("%TargetName%");
  125. CONST TCHAR g_szAppLaunchedSection[] = TEXT("%AppLaunched%");
  126. #if 0
  127. "ClassGUID = {4D36E979-E325-11CE-BFC1-08002BE10318}\r\n"
  128. #endif
  129. CONST CHAR g_szInfSctVer[] = "[Version]\r\n" \
  130. "Signature = \"$CHICAGO$\"\r\n" \
  131. "Class = Printer\r\n" \
  132. "InfVersion = 1.0.1\r\n" \
  133. "Provider = %MS%\r\n";
  134. CONST CHAR g_szInfSctMfg[] = "\r\n[Manufacturer]\r\n" \
  135. "%%MS%% = %hs\r\n";
  136. CONST CHAR g_szInfSctDrv[] = "\r\n[%hs]\r\n" \
  137. "\"%hs\" = %hs, InetPrinter\r\n";
  138. CONST CHAR g_szInfSctIns[] = "\r\n[%hs]\r\n" \
  139. "CopyFiles = FileList\r\n" \
  140. "DataSection = InetDriverData\r\n";
  141. CONST CHAR g_szInfSctFil[] = "\r\n[FileList]\r\n";
  142. CONST CHAR g_szInfSctDta[] = "\r\n[InetDriverData]\r\n" \
  143. "DataFile = %hs\r\n" \
  144. "HelpFile = %hs\r\n"; \
  145. CONST CHAR g_szInfSctStr[] = "\r\n[Strings]\r\n" \
  146. "MS = \"Inet\"\r\n" \
  147. "DISK1 = \"Disk1\"\r\n";
  148. CONST CHAR g_szInfSctSDN[] = "\r\n[SourceDisksNames]\r\n" \
  149. "1 = %DISK1%,, 0000-0000\r\n";
  150. CONST CHAR g_szInfSctSDF[] = "\r\n[SourceDisksFiles]\r\n";