å€ãã®ããã°ã©ããŒã¯ããœãããŠã§ã¢è£œåã®ã€ã³ã¹ããŒã©ãŒãäœæããã¿ã¹ã¯ã«çŽé¢ããŠãããšæããŸãã ããã§åãéåœãç§ã襲ã£ãã WiXã䜿çšããããšã«ãªããŸããã ãã«ããµãŒããŒã§ã€ã³ã¹ããŒã©ãŒã®èªåã¢ã»ã³ããªãäœæããå¿ èŠããããŸããã ãã¡ã€ã«ãã€ã³ã¹ããŒã«çšã«ååŸããããããžã§ã¯ãã¯å€æŽãããå¯èœæ§ããããããã€ã³ã¹ããŒã©ãŒã«è¿œå ããå¿ èŠããããã¡ã€ã«ã®ãªã¹ããå³å¯ã«æå®ããããšã¯ã§ããŸããã
ãããžã§ã¯ãã¯MS Visual Studio 2010ã§äœæãããŠããŸãããããžã§ã¯ããäœæãããã€ã³ã¹ããŒã©ãŒã®äœæã®ã¿ã«äœ¿çšãã人ã«ãšã£ãŠã¯ããã®èšäºã¯èå³æ·±ããã®ã«ãªããŸãã
WiXã«ã¯heat.exeãŠãŒãã£ãªãã£ããã³ãã«ãããŠããŸããããã¯ããã©ã«ããŸãã¯ãããžã§ã¯ããããã¡ã€ã«ãèªåçã«åéããããã®ããŒã«ãšããŠæ©èœããŸãïŒããã«ããã€ãã®ãªãã·ã§ã³ããããŸãïŒã ã³ãã³ããããã«ããã³ã³ãœãŒã«ã¢ããªã±ãŒã·ã§ã³ã
åé¡ã®æåã®èª¿æ»äžã«ããããžã§ã¯ãã®åºåãã©ã«ããããã¡ã€ã«ãèªåçã«åéãããªãã·ã§ã³ãæé©ã§æã䟿å©ãªãªãã·ã§ã³ã§ãããšæãããŸããã ãããè¡ãã«ã¯ãåºåãååŸãããããžã§ã¯ããã¡ã€ã«ã«å°ããªå€æŽãå ããå¿ èŠããããããžã§ã¯ããžã®ãªã³ã¯ãè¿œå ããã ãã§ãïŒVSã§éçºãã人ã«ãšã£ãŠã®å©ç¹ïŒã ãããããã®å¯èœæ§ãç 究ããéçšã§ãheat.exeãŠãŒãã£ãªãã£ã¯* .exeãããžã§ã¯ããã¡ã€ã«ãšæ§æãã¡ã€ã«ä»¥å€ã®åºåããäœãåéããªãããšãå€æããŸããã ãã®åé¡ã®åå ãé·æã«ããã£ãŠèª¿æ»ããçµæã2010幎3æ以éããã®ãããªãšã©ãŒã¯ãã§ã«å€æããŠããŸããããŸã 解決ãããŠããŸããã
ãã®ãããæã䟿å©ãªãªãã·ã§ã³ã¯ãªããªããŸããããåé¡ã¯åããŸãŸã§ããããã¡ã€ã«ãèªåçã«è¿œå ããå¿ èŠããããä»ã®ãœãªã¥ãŒã·ã§ã³ãæ€èšããããã»ã¹ãéå§ãããŸããã å°æ¥ãèŠæ®ããŠããã¡ãã解決çãèŠã€ãã£ããšèšããŸãïŒ
heat.exeãŠãŒãã£ãªãã£ã«ã¯ãäžèšã®ããã«ãããžã§ã¯ããããã¡ã€ã«ãè¿œå ããæ©èœã ãã§ãªããæå®ã§ãããã©ã«ããŒãããã¡ã€ã«ãåéããæ©èœããããŸãã ç§ã¯ãã®ãªãã·ã§ã³ã調æ»ãå§ããŸããã heat.exeã¯ããããžã§ã¯ãããã§ã¯ãªãããã©ã«ããããã¹ãŠã®ãã¡ã€ã«ãæ¢ã«è¿œå ããéžæçãªãã¡ã€ã«ã®ã¿ãè¿œå ããŠããããšãå€æããŸããã ãã§ã«å°ããªåå©ã§ããã ããããéã®è£å°ã¯ãããŸããã
heat.exeãŠãŒãã£ãªãã£ãå®è¡ãããšãã«ããã©ã«ããŒããåéãããã¡ã€ã«ã®çš®é¡ãæå®ã§ããŸãã ããã€ããªããšãã³ã³ãã³ãããšãã2ã€ã®ã«ããŽãªã«èå³ããããŸããã æåã®ã«ããŽãªã¯* .dllããã³* .exeãã¡ã€ã«ãæ åœãã2çªç®ã¯æ§æãã¡ã€ã«ãæ åœããŸãã å®éã«ã¯ããããã®ãã©ã¡ãŒã¿ãæž¡ããŠãæž¡ããªããŠããŠãŒãã£ãªãã£ã¯æ°ã«ããªãããšãå€æããŸããã 圌女ã¯ãäœãèµ·ãããªãã£ãããã«ããã©ã«ããŒå ã®ãã¹ãŠãåéãç¶ããŸããã ãã®ãªãã·ã§ã³ã¯ç§ã«ã¯åããŠããŸããã
ãŠãŒãã£ãªãã£èªäœããå°ãè±ç·ããæçµçã«ã¯äœãååŸããããã«ã€ããŠè©±ããŸãããã ç®çã®åœ¢åŒã®ãã¡ã€ã«ã®èª¬æãå«ããã¡ã€ã«ãååŸããå¿ èŠããããŸãã ãã¡ã€ã«ã¯ããã¡ã€ã«ã®èå¥åãšãã®ãã¹ãæ ŒçŽããxmlããã¥ã¡ã³ãã§ãã èå¥åã¯GUIDã§ãã èªååãããããŒã«ã䜿çšããããã®ãããªãã¡ã€ã«ãæã§è©°ããããšã¯æ¥œããäœæ¥ã§ã¯ãããŸããã
heat.exeãŠãŒãã£ãªãã£ã¯ããã®ãããªãã¡ã€ã«ãçæããã ãã§ãã ããããç§ã®å Žåã¯ããŽããå ¥ããŸãã ãã ããããã¯xmlããã¥ã¡ã³ãã§ãããããXSLTå€æãé©çšã§ããŸãã çµæã®ãã¡ã€ã«ããäžèŠãªãã¡ã€ã«ã®èª¬æãåé€ããã ãã§ååã§ãã ãããŠãå¬ããããšã«ãheat.exeã¯ãã®ãããªãã¡ã€ã«ããã©ã¡ãŒã¿ãŒãšããŠåãå ¥ããããšãã§ããŸãã
ãã®çµæãå€æãå«ããã¡ã€ã«ãäœæããå ¥åheat.exeã«è»¢éããŸããã ãããŠä»ãç§ã¯ãã§ã«å¿ èŠãªãã¡ã€ã«ã®ææè ãèªãã«æã£ãŠããŸãã ã€ã³ã¹ããŒã©ãŒãããžã§ã¯ãã®ãã«ãåã€ãã³ãã«æ£ããheat.exeéå§è¡ãæžã蟌ã¿ãçæããããã¡ã€ã«ããããžã§ã¯ãã«è¿œå ããã ãã§ãã é·ãä»äºã®ææã¯æåããç®æšã¯éæãããŸããã ã€ã³ã¹ããŒã©ãŒã¯ãçç©ã®ä»å ¥ãªãã«èªåçã«ãã«ãããŸãã
ããã§ããèè ã®èµ€ãèšèã®ããã«ãã®èšäºãèªãã§ããããã§ã¯ãããŸãããããã®äžé£ã®æåå šäœãå®çšçãªãããžã§ã¯ãã«å€ããæ¹æ³ãç解ããããšèããŠããŸãã
æ°ããã€ã³ã¹ããŒã©ãŒãããžã§ã¯ããäœæãããAutoAddingFilesInstallerããšåŒã³ãŸãã ãããžã§ã¯ãã«æ°ãããã¡ã€ã«ãè¿œå ããŸããããããåºåããšåŒã³ãŸãã 1ã
å³1ãããžã§ã¯ããã¡ã€ã«ã®å 容
ãã®ãã¡ã€ã«ã«ã¯ããã¡ã€ã«ã°ã«ãŒãã®èª¬æãè¿œå ããŸãã ç§ã®ãããžã§ã¯ãã§ã¯ããã¡ã€ã«ã2ã€ã®ã°ã«ãŒãã«åããŸãããheat.exeã䜿çšããã®ãšåãã°ã«ãŒãã§ãã
- ãã€ããª-ãã¹ãŠã®* .dllããã³* .exeãã¡ã€ã«ã
- ã³ã³ãã³ã-æ§æãã¡ã€ã«ã
ãã¡ã€ã«ã¯ã©ã®ããã«ãªããŸããïŒ åœŒãèŠãŠã¿ãŸãããã
<? xml version ="1.0" encoding ="UTF-8" ? > < Wix xmlns ="http://schemas.microsoft.com/wix/2006/wi" > < Fragment > < DirectoryRef Id ="INSTALLLOCATION" > < Directory Id ="BinariesDir" ComponentGuidGenerationSeed ="DBA8384E-CE1B-41af-B573-4203FB8A6A3B" > < Directory Id ="Output.Binaries" /> </ Directory > </ DirectoryRef > < DirectoryRef Id ="INSTALLLOCATION" > < Directory Id ="ContentDir" ComponentGuidGenerationSeed ="35A3DCB8-4F85-4e3f-AC83-C51B78C04B94" Name ="NewConfigurationFiles" > < Directory Id ="Output.Content" /> </ Directory > </ DirectoryRef > < ComponentGroup Id ="OutputGroup" > < ComponentGroupRef Id ="Output.Binaries" /> < ComponentGroupRef Id ="Output.Content" /> </ ComponentGroup > </ Fragment > </ Wix > * This source code was highlighted with Source Code Highlighter .
<? xml version ="1.0" encoding ="UTF-8" ? > < Wix xmlns ="http://schemas.microsoft.com/wix/2006/wi" > < Fragment > < DirectoryRef Id ="INSTALLLOCATION" > < Directory Id ="BinariesDir" ComponentGuidGenerationSeed ="DBA8384E-CE1B-41af-B573-4203FB8A6A3B" > < Directory Id ="Output.Binaries" /> </ Directory > </ DirectoryRef > < DirectoryRef Id ="INSTALLLOCATION" > < Directory Id ="ContentDir" ComponentGuidGenerationSeed ="35A3DCB8-4F85-4e3f-AC83-C51B78C04B94" Name ="NewConfigurationFiles" > < Directory Id ="Output.Content" /> </ Directory > </ DirectoryRef > < ComponentGroup Id ="OutputGroup" > < ComponentGroupRef Id ="Output.Binaries" /> < ComponentGroupRef Id ="Output.Content" /> </ ComponentGroup > </ Fragment > </ Wix > * This source code was highlighted with Source Code Highlighter .
<? xml version ="1.0" encoding ="UTF-8" ? > < Wix xmlns ="http://schemas.microsoft.com/wix/2006/wi" > < Fragment > < DirectoryRef Id ="INSTALLLOCATION" > < Directory Id ="BinariesDir" ComponentGuidGenerationSeed ="DBA8384E-CE1B-41af-B573-4203FB8A6A3B" > < Directory Id ="Output.Binaries" /> </ Directory > </ DirectoryRef > < DirectoryRef Id ="INSTALLLOCATION" > < Directory Id ="ContentDir" ComponentGuidGenerationSeed ="35A3DCB8-4F85-4e3f-AC83-C51B78C04B94" Name ="NewConfigurationFiles" > < Directory Id ="Output.Content" /> </ Directory > </ DirectoryRef > < ComponentGroup Id ="OutputGroup" > < ComponentGroupRef Id ="Output.Binaries" /> < ComponentGroupRef Id ="Output.Content" /> </ ComponentGroup > </ Fragment > </ Wix > * This source code was highlighted with Source Code Highlighter .
<? xml version ="1.0" encoding ="UTF-8" ? > < Wix xmlns ="http://schemas.microsoft.com/wix/2006/wi" > < Fragment > < DirectoryRef Id ="INSTALLLOCATION" > < Directory Id ="BinariesDir" ComponentGuidGenerationSeed ="DBA8384E-CE1B-41af-B573-4203FB8A6A3B" > < Directory Id ="Output.Binaries" /> </ Directory > </ DirectoryRef > < DirectoryRef Id ="INSTALLLOCATION" > < Directory Id ="ContentDir" ComponentGuidGenerationSeed ="35A3DCB8-4F85-4e3f-AC83-C51B78C04B94" Name ="NewConfigurationFiles" > < Directory Id ="Output.Content" /> </ Directory > </ DirectoryRef > < ComponentGroup Id ="OutputGroup" > < ComponentGroupRef Id ="Output.Binaries" /> < ComponentGroupRef Id ="Output.Content" /> </ ComponentGroup > </ Fragment > </ Wix > * This source code was highlighted with Source Code Highlighter .
<? xml version ="1.0" encoding ="UTF-8" ? > < Wix xmlns ="http://schemas.microsoft.com/wix/2006/wi" > < Fragment > < DirectoryRef Id ="INSTALLLOCATION" > < Directory Id ="BinariesDir" ComponentGuidGenerationSeed ="DBA8384E-CE1B-41af-B573-4203FB8A6A3B" > < Directory Id ="Output.Binaries" /> </ Directory > </ DirectoryRef > < DirectoryRef Id ="INSTALLLOCATION" > < Directory Id ="ContentDir" ComponentGuidGenerationSeed ="35A3DCB8-4F85-4e3f-AC83-C51B78C04B94" Name ="NewConfigurationFiles" > < Directory Id ="Output.Content" /> </ Directory > </ DirectoryRef > < ComponentGroup Id ="OutputGroup" > < ComponentGroupRef Id ="Output.Binaries" /> < ComponentGroupRef Id ="Output.Content" /> </ ComponentGroup > </ Fragment > </ Wix > * This source code was highlighted with Source Code Highlighter .
<? xml version ="1.0" encoding ="UTF-8" ? > < Wix xmlns ="http://schemas.microsoft.com/wix/2006/wi" > < Fragment > < DirectoryRef Id ="INSTALLLOCATION" > < Directory Id ="BinariesDir" ComponentGuidGenerationSeed ="DBA8384E-CE1B-41af-B573-4203FB8A6A3B" > < Directory Id ="Output.Binaries" /> </ Directory > </ DirectoryRef > < DirectoryRef Id ="INSTALLLOCATION" > < Directory Id ="ContentDir" ComponentGuidGenerationSeed ="35A3DCB8-4F85-4e3f-AC83-C51B78C04B94" Name ="NewConfigurationFiles" > < Directory Id ="Output.Content" /> </ Directory > </ DirectoryRef > < ComponentGroup Id ="OutputGroup" > < ComponentGroupRef Id ="Output.Binaries" /> < ComponentGroupRef Id ="Output.Content" /> </ ComponentGroup > </ Fragment > </ Wix > * This source code was highlighted with Source Code Highlighter .
<? xml version ="1.0" encoding ="UTF-8" ? > < Wix xmlns ="http://schemas.microsoft.com/wix/2006/wi" > < Fragment > < DirectoryRef Id ="INSTALLLOCATION" > < Directory Id ="BinariesDir" ComponentGuidGenerationSeed ="DBA8384E-CE1B-41af-B573-4203FB8A6A3B" > < Directory Id ="Output.Binaries" /> </ Directory > </ DirectoryRef > < DirectoryRef Id ="INSTALLLOCATION" > < Directory Id ="ContentDir" ComponentGuidGenerationSeed ="35A3DCB8-4F85-4e3f-AC83-C51B78C04B94" Name ="NewConfigurationFiles" > < Directory Id ="Output.Content" /> </ Directory > </ DirectoryRef > < ComponentGroup Id ="OutputGroup" > < ComponentGroupRef Id ="Output.Binaries" /> < ComponentGroupRef Id ="Output.Content" /> </ ComponentGroup > </ Fragment > </ Wix > * This source code was highlighted with Source Code Highlighter .
<? xml version ="1.0" encoding ="UTF-8" ? > < Wix xmlns ="http://schemas.microsoft.com/wix/2006/wi" > < Fragment > < DirectoryRef Id ="INSTALLLOCATION" > < Directory Id ="BinariesDir" ComponentGuidGenerationSeed ="DBA8384E-CE1B-41af-B573-4203FB8A6A3B" > < Directory Id ="Output.Binaries" /> </ Directory > </ DirectoryRef > < DirectoryRef Id ="INSTALLLOCATION" > < Directory Id ="ContentDir" ComponentGuidGenerationSeed ="35A3DCB8-4F85-4e3f-AC83-C51B78C04B94" Name ="NewConfigurationFiles" > < Directory Id ="Output.Content" /> </ Directory > </ DirectoryRef > < ComponentGroup Id ="OutputGroup" > < ComponentGroupRef Id ="Output.Binaries" /> < ComponentGroupRef Id ="Output.Content" /> </ ComponentGroup > </ Fragment > </ Wix > * This source code was highlighted with Source Code Highlighter .
<? xml version ="1.0" encoding ="UTF-8" ? > < Wix xmlns ="http://schemas.microsoft.com/wix/2006/wi" > < Fragment > < DirectoryRef Id ="INSTALLLOCATION" > < Directory Id ="BinariesDir" ComponentGuidGenerationSeed ="DBA8384E-CE1B-41af-B573-4203FB8A6A3B" > < Directory Id ="Output.Binaries" /> </ Directory > </ DirectoryRef > < DirectoryRef Id ="INSTALLLOCATION" > < Directory Id ="ContentDir" ComponentGuidGenerationSeed ="35A3DCB8-4F85-4e3f-AC83-C51B78C04B94" Name ="NewConfigurationFiles" > < Directory Id ="Output.Content" /> </ Directory > </ DirectoryRef > < ComponentGroup Id ="OutputGroup" > < ComponentGroupRef Id ="Output.Binaries" /> < ComponentGroupRef Id ="Output.Content" /> </ ComponentGroup > </ Fragment > </ Wix > * This source code was highlighted with Source Code Highlighter .
<? xml version ="1.0" encoding ="UTF-8" ? > < Wix xmlns ="http://schemas.microsoft.com/wix/2006/wi" > < Fragment > < DirectoryRef Id ="INSTALLLOCATION" > < Directory Id ="BinariesDir" ComponentGuidGenerationSeed ="DBA8384E-CE1B-41af-B573-4203FB8A6A3B" > < Directory Id ="Output.Binaries" /> </ Directory > </ DirectoryRef > < DirectoryRef Id ="INSTALLLOCATION" > < Directory Id ="ContentDir" ComponentGuidGenerationSeed ="35A3DCB8-4F85-4e3f-AC83-C51B78C04B94" Name ="NewConfigurationFiles" > < Directory Id ="Output.Content" /> </ Directory > </ DirectoryRef > < ComponentGroup Id ="OutputGroup" > < ComponentGroupRef Id ="Output.Binaries" /> < ComponentGroupRef Id ="Output.Content" /> </ ComponentGroup > </ Fragment > </ Wix > * This source code was highlighted with Source Code Highlighter .
<? xml version ="1.0" encoding ="UTF-8" ? > < Wix xmlns ="http://schemas.microsoft.com/wix/2006/wi" > < Fragment > < DirectoryRef Id ="INSTALLLOCATION" > < Directory Id ="BinariesDir" ComponentGuidGenerationSeed ="DBA8384E-CE1B-41af-B573-4203FB8A6A3B" > < Directory Id ="Output.Binaries" /> </ Directory > </ DirectoryRef > < DirectoryRef Id ="INSTALLLOCATION" > < Directory Id ="ContentDir" ComponentGuidGenerationSeed ="35A3DCB8-4F85-4e3f-AC83-C51B78C04B94" Name ="NewConfigurationFiles" > < Directory Id ="Output.Content" /> </ Directory > </ DirectoryRef > < ComponentGroup Id ="OutputGroup" > < ComponentGroupRef Id ="Output.Binaries" /> < ComponentGroupRef Id ="Output.Content" /> </ ComponentGroup > </ Fragment > </ Wix > * This source code was highlighted with Source Code Highlighter .
<? xml version ="1.0" encoding ="UTF-8" ? > < Wix xmlns ="http://schemas.microsoft.com/wix/2006/wi" > < Fragment > < DirectoryRef Id ="INSTALLLOCATION" > < Directory Id ="BinariesDir" ComponentGuidGenerationSeed ="DBA8384E-CE1B-41af-B573-4203FB8A6A3B" > < Directory Id ="Output.Binaries" /> </ Directory > </ DirectoryRef > < DirectoryRef Id ="INSTALLLOCATION" > < Directory Id ="ContentDir" ComponentGuidGenerationSeed ="35A3DCB8-4F85-4e3f-AC83-C51B78C04B94" Name ="NewConfigurationFiles" > < Directory Id ="Output.Content" /> </ Directory > </ DirectoryRef > < ComponentGroup Id ="OutputGroup" > < ComponentGroupRef Id ="Output.Binaries" /> < ComponentGroupRef Id ="Output.Content" /> </ ComponentGroup > </ Fragment > </ Wix > * This source code was highlighted with Source Code Highlighter .
<? xml version ="1.0" encoding ="UTF-8" ? > < Wix xmlns ="http://schemas.microsoft.com/wix/2006/wi" > < Fragment > < DirectoryRef Id ="INSTALLLOCATION" > < Directory Id ="BinariesDir" ComponentGuidGenerationSeed ="DBA8384E-CE1B-41af-B573-4203FB8A6A3B" > < Directory Id ="Output.Binaries" /> </ Directory > </ DirectoryRef > < DirectoryRef Id ="INSTALLLOCATION" > < Directory Id ="ContentDir" ComponentGuidGenerationSeed ="35A3DCB8-4F85-4e3f-AC83-C51B78C04B94" Name ="NewConfigurationFiles" > < Directory Id ="Output.Content" /> </ Directory > </ DirectoryRef > < ComponentGroup Id ="OutputGroup" > < ComponentGroupRef Id ="Output.Binaries" /> < ComponentGroupRef Id ="Output.Content" /> </ ComponentGroup > </ Fragment > </ Wix > * This source code was highlighted with Source Code Highlighter .
<? xml version ="1.0" encoding ="UTF-8" ? > < Wix xmlns ="http://schemas.microsoft.com/wix/2006/wi" > < Fragment > < DirectoryRef Id ="INSTALLLOCATION" > < Directory Id ="BinariesDir" ComponentGuidGenerationSeed ="DBA8384E-CE1B-41af-B573-4203FB8A6A3B" > < Directory Id ="Output.Binaries" /> </ Directory > </ DirectoryRef > < DirectoryRef Id ="INSTALLLOCATION" > < Directory Id ="ContentDir" ComponentGuidGenerationSeed ="35A3DCB8-4F85-4e3f-AC83-C51B78C04B94" Name ="NewConfigurationFiles" > < Directory Id ="Output.Content" /> </ Directory > </ DirectoryRef > < ComponentGroup Id ="OutputGroup" > < ComponentGroupRef Id ="Output.Binaries" /> < ComponentGroupRef Id ="Output.Content" /> </ ComponentGroup > </ Fragment > </ Wix > * This source code was highlighted with Source Code Highlighter .
<? xml version ="1.0" encoding ="UTF-8" ? > < Wix xmlns ="http://schemas.microsoft.com/wix/2006/wi" > < Fragment > < DirectoryRef Id ="INSTALLLOCATION" > < Directory Id ="BinariesDir" ComponentGuidGenerationSeed ="DBA8384E-CE1B-41af-B573-4203FB8A6A3B" > < Directory Id ="Output.Binaries" /> </ Directory > </ DirectoryRef > < DirectoryRef Id ="INSTALLLOCATION" > < Directory Id ="ContentDir" ComponentGuidGenerationSeed ="35A3DCB8-4F85-4e3f-AC83-C51B78C04B94" Name ="NewConfigurationFiles" > < Directory Id ="Output.Content" /> </ Directory > </ DirectoryRef > < ComponentGroup Id ="OutputGroup" > < ComponentGroupRef Id ="Output.Binaries" /> < ComponentGroupRef Id ="Output.Content" /> </ ComponentGroup > </ Fragment > </ Wix > * This source code was highlighted with Source Code Highlighter .
<? xml version ="1.0" encoding ="UTF-8" ? > < Wix xmlns ="http://schemas.microsoft.com/wix/2006/wi" > < Fragment > < DirectoryRef Id ="INSTALLLOCATION" > < Directory Id ="BinariesDir" ComponentGuidGenerationSeed ="DBA8384E-CE1B-41af-B573-4203FB8A6A3B" > < Directory Id ="Output.Binaries" /> </ Directory > </ DirectoryRef > < DirectoryRef Id ="INSTALLLOCATION" > < Directory Id ="ContentDir" ComponentGuidGenerationSeed ="35A3DCB8-4F85-4e3f-AC83-C51B78C04B94" Name ="NewConfigurationFiles" > < Directory Id ="Output.Content" /> </ Directory > </ DirectoryRef > < ComponentGroup Id ="OutputGroup" > < ComponentGroupRef Id ="Output.Binaries" /> < ComponentGroupRef Id ="Output.Content" /> </ ComponentGroup > </ Fragment > </ Wix > * This source code was highlighted with Source Code Highlighter .
<? xml version ="1.0" encoding ="UTF-8" ? > < Wix xmlns ="http://schemas.microsoft.com/wix/2006/wi" > < Fragment > < DirectoryRef Id ="INSTALLLOCATION" > < Directory Id ="BinariesDir" ComponentGuidGenerationSeed ="DBA8384E-CE1B-41af-B573-4203FB8A6A3B" > < Directory Id ="Output.Binaries" /> </ Directory > </ DirectoryRef > < DirectoryRef Id ="INSTALLLOCATION" > < Directory Id ="ContentDir" ComponentGuidGenerationSeed ="35A3DCB8-4F85-4e3f-AC83-C51B78C04B94" Name ="NewConfigurationFiles" > < Directory Id ="Output.Content" /> </ Directory > </ DirectoryRef > < ComponentGroup Id ="OutputGroup" > < ComponentGroupRef Id ="Output.Binaries" /> < ComponentGroupRef Id ="Output.Content" /> </ ComponentGroup > </ Fragment > </ Wix > * This source code was highlighted with Source Code Highlighter .
<? xml version ="1.0" encoding ="UTF-8" ? > < Wix xmlns ="http://schemas.microsoft.com/wix/2006/wi" > < Fragment > < DirectoryRef Id ="INSTALLLOCATION" > < Directory Id ="BinariesDir" ComponentGuidGenerationSeed ="DBA8384E-CE1B-41af-B573-4203FB8A6A3B" > < Directory Id ="Output.Binaries" /> </ Directory > </ DirectoryRef > < DirectoryRef Id ="INSTALLLOCATION" > < Directory Id ="ContentDir" ComponentGuidGenerationSeed ="35A3DCB8-4F85-4e3f-AC83-C51B78C04B94" Name ="NewConfigurationFiles" > < Directory Id ="Output.Content" /> </ Directory > </ DirectoryRef > < ComponentGroup Id ="OutputGroup" > < ComponentGroupRef Id ="Output.Binaries" /> < ComponentGroupRef Id ="Output.Content" /> </ ComponentGroup > </ Fragment > </ Wix > * This source code was highlighted with Source Code Highlighter .
<? xml version ="1.0" encoding ="UTF-8" ? > < Wix xmlns ="http://schemas.microsoft.com/wix/2006/wi" > < Fragment > < DirectoryRef Id ="INSTALLLOCATION" > < Directory Id ="BinariesDir" ComponentGuidGenerationSeed ="DBA8384E-CE1B-41af-B573-4203FB8A6A3B" > < Directory Id ="Output.Binaries" /> </ Directory > </ DirectoryRef > < DirectoryRef Id ="INSTALLLOCATION" > < Directory Id ="ContentDir" ComponentGuidGenerationSeed ="35A3DCB8-4F85-4e3f-AC83-C51B78C04B94" Name ="NewConfigurationFiles" > < Directory Id ="Output.Content" /> </ Directory > </ DirectoryRef > < ComponentGroup Id ="OutputGroup" > < ComponentGroupRef Id ="Output.Binaries" /> < ComponentGroupRef Id ="Output.Content" /> </ ComponentGroup > </ Fragment > </ Wix > * This source code was highlighted with Source Code Highlighter .
<? xml version ="1.0" encoding ="UTF-8" ? > < Wix xmlns ="http://schemas.microsoft.com/wix/2006/wi" > < Fragment > < DirectoryRef Id ="INSTALLLOCATION" > < Directory Id ="BinariesDir" ComponentGuidGenerationSeed ="DBA8384E-CE1B-41af-B573-4203FB8A6A3B" > < Directory Id ="Output.Binaries" /> </ Directory > </ DirectoryRef > < DirectoryRef Id ="INSTALLLOCATION" > < Directory Id ="ContentDir" ComponentGuidGenerationSeed ="35A3DCB8-4F85-4e3f-AC83-C51B78C04B94" Name ="NewConfigurationFiles" > < Directory Id ="Output.Content" /> </ Directory > </ DirectoryRef > < ComponentGroup Id ="OutputGroup" > < ComponentGroupRef Id ="Output.Binaries" /> < ComponentGroupRef Id ="Output.Content" /> </ ComponentGroup > </ Fragment > </ Wix > * This source code was highlighted with Source Code Highlighter .
<? xml version ="1.0" encoding ="UTF-8" ? > < Wix xmlns ="http://schemas.microsoft.com/wix/2006/wi" > < Fragment > < DirectoryRef Id ="INSTALLLOCATION" > < Directory Id ="BinariesDir" ComponentGuidGenerationSeed ="DBA8384E-CE1B-41af-B573-4203FB8A6A3B" > < Directory Id ="Output.Binaries" /> </ Directory > </ DirectoryRef > < DirectoryRef Id ="INSTALLLOCATION" > < Directory Id ="ContentDir" ComponentGuidGenerationSeed ="35A3DCB8-4F85-4e3f-AC83-C51B78C04B94" Name ="NewConfigurationFiles" > < Directory Id ="Output.Content" /> </ Directory > </ DirectoryRef > < ComponentGroup Id ="OutputGroup" > < ComponentGroupRef Id ="Output.Binaries" /> < ComponentGroupRef Id ="Output.Content" /> </ ComponentGroup > </ Fragment > </ Wix > * This source code was highlighted with Source Code Highlighter .
äœããããŸããïŒ 2ã€ã®ãã£ã¬ã¯ããªïŒãBinariesDirãããContentDirãïŒãäœæããŸããããããã¯ãããã°ã©ã ãã€ã³ã¹ããŒã«ãããŠãããã©ã«ããŒãINSTALLLOCATIONãã«ãããŸãã ãããã£ãŠããã¡ã€ã«ãå«ããã£ã¬ã¯ããªããããžã§ã¯ãã«è¿œå ããã2ã€ã®ãªã³ã¯ãäœæããŸããã
次ã«ãéžæãããã¹ãŠã®ãã¡ã€ã«ã¿ã€ããå«ãã³ã³ããŒãã³ãã®ã°ã«ãŒããäœæããå¿ èŠããããŸãã ããããOutputGroupããšåŒã³ãŸãããã äœæããããã£ã¬ã¯ããªãžã®ãªã³ã¯ãä¿åããŸãã ãããã£ãŠãæã ã¯ãããããæ å ±ãåéããããšèšããŸãã
ããã§ããã¡ã€ã«ãOutputFilesããäœæããŸãããã®ãã¡ã€ã«ã«ã¯ããã¡ã€ã«ã®ãªã¹ããä¿åãããŸãã ãã®ãã¡ã€ã«ã¯ãheat.exeãŠãŒãã£ãªãã£ã«ãã£ãŠèªåçã«æžã蟌ãŸããŸãã ä»ã®ãšããããã®ãã¡ã€ã«ãã»ãšãã©ç©ºã«ããŸãã äœæãããã©ã«ããžã®ãªã³ã¯ã®ã¿ãè¿œå ããŸãã 次ã®ããã«ãªããŸãã
*ãã®ãœãŒã¹ã³ãŒãã¯ã ãœãŒã¹ã³ãŒããã€ã©ã€ã¿ãŒã§åŒ·èª¿è¡šç€ºãããŸããã
- <ïŒ xml ããŒãžã§ã³ = "1.0" encoding = "utf-8" ïŒ >
- < Wix xmlns = "http://schemas.microsoft.com/wix/2006/wi" >
- < ãã©ã°ã¡ã³ã >
- < DirectoryRef Id = "Output.Content" >
- </ DirectoryRef >
- < DirectoryRef Id = "Output.Binaries" >
- </ DirectoryRef >
- </ ãã©ã°ã¡ã³ã >
- < ãã©ã°ã¡ã³ã >
- < ComponentGroup Id = "Output.Content" >
- </ ComponentGroup >
- < ComponentGroup Id = "Output.Binaries" >
- </ ComponentGroup >
- </ ãã©ã°ã¡ã³ã >
- </ Wix >
ããã§ãã°ã«ãŒããOutputGroupãã®èª¬æããFichaãã«è¿œå ããŠãã€ã³ã¹ããŒã©ãŒããããèªåã«è¿œå ããå¿ èŠãããããšãèªèã§ããããã«ããå¿ èŠããããŸãã ãããè¡ãã«ã¯ããã¡ã€ã³ããã¡ã€ã«ã«ç§»åãããã®äžã®ãæ©èœãã¿ã°ãèŠã€ããŸãã ãã®äžã«ç§ãã¡ã®ã°ã«ãŒãã®èšé²ã眮ããŸãã ãã®çµæã次ã®ããã«ãªããŸãã
*ãã®ãœãŒã¹ã³ãŒãã¯ã ãœãŒã¹ã³ãŒããã€ã©ã€ã¿ãŒã§åŒ·èª¿è¡šç€ºãããŸããã
- < æ©èœ ID = "ProductFeature" ã¿ã€ãã« = "AutoAddingFilesInstaller" ã¬ãã« = "1" >
- < ComponentGroupRef Id = "OutputGroup" />
- < ComponentGroupRef Id = "Product.Generated" />
- </ æ©èœ >
ãã¹ãŠãæ£ããæžãããŠããããšã確èªããåŸïŒããããcopy-paste'noã§ãïŒããããžã§ã¯ããçµã¿ç«ãŠãããšããŸãã ãã¹ãŠããšã©ãŒãªãå®è¡ãããã¯ãã§ãã
æ£åžžã«äœæããããã¹ãŠã®ã€ã³ãã©ã¹ãã©ã¯ãã£ã 次ã«ãheat.exeãŠãŒãã£ãªãã£ã«çŽæ¥æž¡ããŸãã ãããžã§ã¯ãã®ããããã£ã«ç§»åãã[ã€ãã³ãã®ãã«ã]ã¿ãã«ç§»åããŸãã ãã®ã¿ãã«ã¯ãããã«ãåã®ã€ãã³ãã³ãã³ãã©ã€ã³ããŠã£ã³ããŠããããŸãã ãããžã§ã¯ããã«ããååŸããã«ã¯ãã¡ã€ã«ã«é¢ããæ å ±ãå¿ èŠãªã®ã§ããã®ãŠã£ã³ããŠã«ãŠãŒãã£ãªãã£åŒã³åºããè¿œå ããŸãã
ã³ãŒã«ã©ã€ã³ã圢æãå§ããŸãã æåã«ãïŒ WIXïŒ \ bin \ heat.exeããè¿œå ããŸãã ãããã£ãŠããŠãŒãã£ãªãã£ãžã®ãã¹ããããŸãã ããã§ããdirããã©ã¡ãŒã¿ãŒãè¿œå ããŸãã ããã¯ããã©ã«ããŒããæ å ±ãåéããããšãæå³ããŸãã
å°ã圢åŒçã ãããžã§ã¯ãã®ãã©ã«ããŒã«ç§»åããããã«æ°ãããã©ã«ããŒããœãŒã¹ããäœæããŸãã åŠçããããã¡ã€ã«ãå ¥ããŸãã ãããžã§ã¯ãã®åºåããããã©ã«ããŒããŸãã¯è€æ°ã®ãããžã§ã¯ãããå¿ èŠãªãã¡ã€ã«ãåéããããã©ã«ããŒãæå®ã§ããŸãã ãããžã§ã¯ããæ©èœããŠããããšã確èªããããã«ããã¹ãã®ããã ãã«ãããè¡ããŸãã ããã¯ãå³2å ã®ãã¹ããã©ã«ããŒã®å€èŠ³ã§ãã
å³2ãã¡ã€ã«ã®ååŸå ã®ãã©ã«ããŒã®å 容
ãïŒ WIXïŒ \ bin \ heat.exeãdir $ïŒProjectDirïŒsource ã "ãã¡ã€ã«æ å ±ãçæããããã¡ã€ã«ããã®è¡ã«è¿œå ããŸãããã®ãããªãã¡ã€ã«ã¯æ¢ã«äœæãããŠããŸãã ãOutputFilesãã§ãã
ãã®çµæãã©ã€ã³ã次ã®åœ¢åŒãååŸããŠããããšãããããŸãã ãïŒ WIXïŒ \ bin \ heat.exeãdirã$ïŒProjectDirïŒsourceã-oã$ïŒProjectDirïŒOutputFiles.wxsã-gg -sfrag
heat.exeã®å¯èœæ§ãæ¢ããšãããã©ã«ããŒå ã®ãã¡ã€ã«ã®çš®é¡ããã£ã«ã¿ãŒåŠçã§ããªãããšãæ¢ã«ããã£ãŠããŸãã ãã ããxsltå€æã¯äœ¿çšã§ããŸãã Wix.xsltãã¡ã€ã«ãäœæãããçæãããheat.exeãã¡ã€ã«ã®å€æãè¡ãããŸãã ãã®ãã¡ã€ã«ã¯æ¬¡ã®ããã«ãªããŸãã
*ãã®ãœãŒã¹ã³ãŒãã¯ã ãœãŒã¹ã³ãŒããã€ã©ã€ã¿ãŒã§åŒ·èª¿è¡šç€ºãããŸããã
- <ïŒ xml ããŒãžã§ã³ = "1.0" encoding = "utf-8" ïŒ >
- < xslïŒã¹ã¿ã€ã«ã·ãŒã ããŒãžã§ã³ = "1.0" xmlnsïŒxsl = "http://www.w3.org/1999/XSL/Transform"
- xmlnsïŒwix = "http://schemas.microsoft.com/wix/2006/wi"
- xmlns = "http://schemas.microsoft.com/wix/2006/wi"
- exclude-result-prefixes = "wix"
- >
- < xslïŒåºå ã¡ãœãã = "xml" ã€ã³ãã³ã = "yes" />
- < xslïŒtemplate match = "wixïŒwix" >
- <ïŒ-vshostããã³App.configãé€ã* .configãéžæããŸã->
- < xslïŒå€æ° å = "content" select = "wixïŒãã©ã°ã¡ã³ã/ wixïŒDirectoryRef / wixïŒãã£ã¬ã¯ããª/ wixïŒã³ã³ããŒãã³ã[substringïŒwixïŒFile / @ Sourceãstring-lengthïŒwixïŒFile / @ SourceïŒ-5 ïŒ= 'config' and notïŒcontainsïŒwixïŒFile / @ Sourceã 'vshost'ïŒïŒand notïŒsubstringïŒwixïŒFile / @ Sourceãstring-lengthïŒwixïŒFile / @ SourceïŒ-9ïŒ= ' App.config 'ïŒ] " />
- <ïŒ-vshostãé€ã* .exeïŒ* .dllãéžæ->
- < xslïŒå€æ° å = "binaries" select = "wixïŒFragment / wixïŒDirectoryRef / wixïŒDirectory / wixïŒComponent [substringïŒwixïŒFile / @ Sourceãstring-lengthïŒwixïŒFile / @ SourceïŒ-2 ïŒ= 'dll'ãŸãã¯ãµãã¹ããªã³ã°ïŒwixïŒFile / @ Sourceãstring-lengthïŒwixïŒFile / @ SourceïŒ-2ïŒ= 'exe' and notïŒcontainsïŒwixïŒFile / @ Sourceã 'vshost'ïŒïŒ ] " />
- < Wix >
- < ãã©ã°ã¡ã³ã >
- < DirectoryRef Id = "Output.Content" >
- < xslïŒapply-templates select = "$ content" />
- </ DirectoryRef >
- < DirectoryRef Id = "Output.Binaries" >
- < xslïŒapply-templates select = "$ãã€ããª" />
- </ DirectoryRef >
- </ ãã©ã°ã¡ã³ã >
- < ãã©ã°ã¡ã³ã >
- < ComponentGroup Id = "Output.Content" >
- < xslïŒfor-each select = "$ content" >
- < ComponentRef Id = "{@ Id}" />
- </ xslïŒfor-each >
- </ ComponentGroup >
- < ComponentGroup Id = "Output.Binaries" >
- < xslïŒfor-each select = "$ãã€ããª" >
- < ComponentRef Id = "{@ Id}" />
- </ xslïŒfor-each >
- </ ComponentGroup >
- </ ãã©ã°ã¡ã³ã >
- </ Wix >
- </ xslïŒãã³ãã¬ãŒã >
- < xslïŒtemplate match = "wixïŒComponent" >
- < ã³ã³ããŒãã³ã ID = "{@ Id}" Guid = "{@ Guid}" >
- < File Id = "{wixïŒFile / @ Id}" Source = "{concatïŒ '.. \ .. \ source'ãsubstringïŒwixïŒFile / @ Sourceã10ïŒïŒ}" />
- </ ã³ã³ããŒãã³ã >
- </ xslïŒãã³ãã¬ãŒã >
- </ xslïŒã¹ã¿ã€ã«ã·ãŒã >
ãã®ãã¡ã€ã«ã«ã¯ãã°ã«ãŒãã®ååãšããœãŒã¹ããã©ã«ããŒãžã®ãã¹ãæžã蟌ãŸããŸãã ç¬èªã®ç®çã§äœ¿çšããå Žåã¯ããããã®ãã£ãŒã«ãã®ã¿ãå€æŽããå¿ èŠããããŸãã
ããããã¹ãŠã®ã¢ã¯ã·ã§ã³ã®çµæãšããŠããPre-build Event Command LineããŠã£ã³ããŠã«ã¬ã³ãŒããå¿ èŠã§ãã
"ïŒ WIXïŒ \ bin \ heat.exe" dir "$ïŒProjectDirïŒsource" -t "$ïŒProjectDirïŒWix.xslt" -o "$ïŒProjectDirïŒOutputFiles.wxs" -gg âsfrag
ãã®åŸããããžã§ã¯ããçµã¿ç«ãŠãŠããOutputFilesããã¡ã€ã«ãå€æŽãããããšã確èªã§ããŸãã
ããã¯æ¬¡ã®ããã«ãªããŸãã
*ãã®ãœãŒã¹ã³ãŒãã¯ã ãœãŒã¹ã³ãŒããã€ã©ã€ã¿ãŒã§åŒ·èª¿è¡šç€ºãããŸããã
- <ïŒ xml ããŒãžã§ã³ = "1.0" encoding = "utf-8" ïŒ >
- < Wix xmlns = "http://schemas.microsoft.com/wix/2006/wi" >
- < ãã©ã°ã¡ã³ã >
- < DirectoryRef Id = "Output.Content" >
- < ã³ã³ããŒãã³ã ID = "cmpD86120B7C4146F9A886C539A986173D0" Guid = "{1B979A9E-BB11-48FD-B5B6-96FB50A94837}" >
- < ãã¡ã€ã« ID = "fil1A7C67BC02C177948357049406DE080B" ãœãŒã¹ = ".. \ .. \ source \ ExampleConfigurationFile.config" />
- </ ã³ã³ããŒãã³ã >
- </ DirectoryRef >
- < DirectoryRef Id = "Output.Binaries" >
- < ã³ã³ããŒãã³ã ID = "cmp8DD829F42DCE2122C6CC695CE5584A8E" Guid = "{7578DAA3-70C9-4565-A755-91EC145DF679}" >
- < ãã¡ã€ã« ID = "filE6BF179915D90D217649A4511F1C7745" ãœãŒã¹ = ".. \ .. \ source \ ExampleDll.dll" />
- </ ã³ã³ããŒãã³ã >
- < ã³ã³ããŒãã³ã ID = "cmp6594B36D2CD42159E7EB3F6B4AAE8285" Guid = "{AB0630AA-7EB5-4A8C-8DD3-A4C23742D954}" >
- < ãã¡ã€ã« ID = "fil008A960D6DBFFE7FBE45D2B2AF6AFA3B" ãœãŒã¹ = ".. \ .. \ source \ ExampleExe.exe" />
- </ ã³ã³ããŒãã³ã >
- </ DirectoryRef >
- </ ãã©ã°ã¡ã³ã >
- < ãã©ã°ã¡ã³ã >
- < ComponentGroup Id = "Output.Content" >
- < ComponentRef Id = "cmpD86120B7C4146F9A886C539A986173D0" />
- </ ComponentGroup >
- < ComponentGroup Id = "Output.Binaries" >
- < ComponentRef Id = "cmp8DD829F42DCE2122C6CC695CE5584A8E" />
- < ComponentRef Id = "cmp6594B36D2CD42159E7EB3F6B4AAE8285" />
- </ ComponentGroup >
- </ ãã©ã°ã¡ã³ã >
- </ Wix >
Orcaã䜿çšããŠåä¿¡ããã€ã³ã¹ããŒã«ãã¡ã€ã«ãAutoAddingFilesInstaller.msiããéããšããFileãã»ã¯ã·ã§ã³ã«3ã€ã®ãã¡ã€ã«ã«é¢ãããšã³ããªãããããšãããããŸãã 3ã
å³3ã€ã³ã¹ããŒã©ãŒãã¡ã€ã«ã®å 容
ããã§ãç§ã®èšäºãå®æããããã 圌女ãã€ã³ã¹ããŒã©ãŒã®éçºãæ¯æŽããå¯èœãªéãèªååãããäœæãè¡ããããšãé¡ã£ãŠããŸãã