Patchwork [V2] wix: add help for bundle and changegroup topics

login
register
mail settings
Submitter Matt Harbison
Date Dec. 21, 2015, 6:11 a.m.
Message ID <fedf1803f4703558e633.1450678275@Envy>
Download mbox | patch
Permalink /patch/12201/
State Changes Requested
Delegated to: Yuya Nishihara
Headers show

Comments

Matt Harbison - Dec. 21, 2015, 6:11 a.m.
# HG changeset patch
# User Matt Harbison <matt_harbison@yahoo.com>
# Date 1450405448 18000
#      Thu Dec 17 21:24:08 2015 -0500
# Node ID fedf1803f4703558e63342d25d8063b6a1a63827
# Parent  7a92182315d3ade8b736687eb0aafd3511c27709
wix: add help for bundle and changegroup topics

This makes the changes in a79cba6cb206 and 84784f834b3a available on Windows.

I'm not setup to make the installer, so someone with experience in this area
should probably give it a look.  In looking around to try to figure out how to
build the installer, it looks like the Makefile may need an update to $DOCFILES.
Yuya Nishihara - Dec. 22, 2015, 3:34 p.m.
On Mon, 21 Dec 2015 01:11:15 -0500, Matt Harbison wrote:
> # HG changeset patch
> # User Matt Harbison <matt_harbison@yahoo.com>
> # Date 1450405448 18000
> #      Thu Dec 17 21:24:08 2015 -0500
> # Node ID fedf1803f4703558e63342d25d8063b6a1a63827
> # Parent  7a92182315d3ade8b736687eb0aafd3511c27709
> wix: add help for bundle and changegroup topics
> 
> This makes the changes in a79cba6cb206 and 84784f834b3a available on Windows.
> 
> I'm not setup to make the installer, so someone with experience in this area
> should probably give it a look.  In looking around to try to figure out how to
> build the installer, it looks like the Makefile may need an update to $DOCFILES.
> 
> diff --git a/contrib/wix/guids.wxi b/contrib/wix/guids.wxi
> --- a/contrib/wix/guids.wxi
> +++ b/contrib/wix/guids.wxi
> @@ -20,6 +20,7 @@
>  
>    <!-- help.wxs -->
>    <?define helpFolder.guid = {9FA957DB-6DFE-44f2-AD03-293B2791CF17} ?>
> +  <?define help.internals.guid = {2DD7669D-0DB8-4C39-9806-78E6475E7ACC} ?>
>  
>    <!-- i18n.wxs -->
>    <?define i18nFolder.guid = {1BF8026D-CF7C-4174-AEE6-D6B7BF119248} ?>
> diff --git a/contrib/wix/help.wxs b/contrib/wix/help.wxs
> --- a/contrib/wix/help.wxs
> +++ b/contrib/wix/help.wxs
> @@ -28,6 +28,14 @@
>            <File Name="templates.txt" />
>            <File Name="urls.txt" />
>          </Component>
> +
> +        <Directory Id="help.internaldir" Name="internals">
> +          <Component Id="help.internals" Guid="$(var.help.internals.guid)" Win64='$(var.IsX64)'>
> +            <File Id="internals.bundles.txt"      Name="bundles.txt" KeyPath="yes" />
> +            <File Id="internals.changegroups.txt" Name="changegroups.txt" />
> +          </Component>
> +        </Directory>

Ok, I managed to run wix. (it's annoying that wix errors don't appear in msys
bash.) It said in cmd.exe:

  help.wxs(33) : error LGHT0267 : Found orphaned Component 'help.internals'.
  If this is a Product, every Component must have at least one parent Feature.
  To include a Component in a Module, you must include it directly as a
  Component element of the Module element or indirectly via ComponentRef,
  ComponentGroup, or ComponentGroupRef elements.

Perhaps we'll need a ComponentGroup that contains help.root and
help.internaldir?
Matt Harbison - Dec. 22, 2015, 6:04 p.m.
On Tue, 22 Dec 2015 10:34:58 -0500, Yuya Nishihara <yuya@tcha.org> wrote:

> On Mon, 21 Dec 2015 01:11:15 -0500, Matt Harbison wrote:
>> # HG changeset patch
>> # User Matt Harbison <matt_harbison@yahoo.com>
>> # Date 1450405448 18000
>> #      Thu Dec 17 21:24:08 2015 -0500
>> # Node ID fedf1803f4703558e63342d25d8063b6a1a63827
>> # Parent  7a92182315d3ade8b736687eb0aafd3511c27709
>> wix: add help for bundle and changegroup topics
>>
>> This makes the changes in a79cba6cb206 and 84784f834b3a available on  
>> Windows.
>>
>> I'm not setup to make the installer, so someone with experience in this  
>> area
>> should probably give it a look.  In looking around to try to figure out  
>> how to
>> build the installer, it looks like the Makefile may need an update to  
>> $DOCFILES.
>>
>> diff --git a/contrib/wix/guids.wxi b/contrib/wix/guids.wxi
>> --- a/contrib/wix/guids.wxi
>> +++ b/contrib/wix/guids.wxi
>> @@ -20,6 +20,7 @@
>>
>>    <!-- help.wxs -->
>>    <?define helpFolder.guid = {9FA957DB-6DFE-44f2-AD03-293B2791CF17} ?>
>> +  <?define help.internals.guid =  
>> {2DD7669D-0DB8-4C39-9806-78E6475E7ACC} ?>
>>
>>    <!-- i18n.wxs -->
>>    <?define i18nFolder.guid = {1BF8026D-CF7C-4174-AEE6-D6B7BF119248} ?>
>> diff --git a/contrib/wix/help.wxs b/contrib/wix/help.wxs
>> --- a/contrib/wix/help.wxs
>> +++ b/contrib/wix/help.wxs
>> @@ -28,6 +28,14 @@
>>            <File Name="templates.txt" />
>>            <File Name="urls.txt" />
>>          </Component>
>> +
>> +        <Directory Id="help.internaldir" Name="internals">
>> +          <Component Id="help.internals"  
>> Guid="$(var.help.internals.guid)" Win64='$(var.IsX64)'>
>> +            <File Id="internals.bundles.txt"      Name="bundles.txt"  
>> KeyPath="yes" />
>> +            <File Id="internals.changegroups.txt"  
>> Name="changegroups.txt" />
>> +          </Component>
>> +        </Directory>
>
> Ok, I managed to run wix. (it's annoying that wix errors don't appear in  
> msys
> bash.) It said in cmd.exe:
>
>   help.wxs(33) : error LGHT0267 : Found orphaned Component  
> 'help.internals'.
>   If this is a Product, every Component must have at least one parent  
> Feature.
>   To include a Component in a Module, you must include it directly as a
>   Component element of the Module element or indirectly via ComponentRef,
>   ComponentGroup, or ComponentGroupRef elements.
>
> Perhaps we'll need a ComponentGroup that contains help.root and
> help.internaldir?

What command line did you use, so I can check it?  After installing wix,  
there is only help in the start menu.  A flow diagram appears to show that  
wixcop.exe is what processes the *.wxs files.  But when I ran it on some  
of the *.wxs without my changes, it complained about not declaring the  
encoding as utf-8 and then spewed about whitespace errors.  So I figured I  
was doing it wrong.
Yuya Nishihara - Dec. 23, 2015, 5:17 a.m.
On Tue, 22 Dec 2015 13:04:45 -0500, Matt Harbison wrote:
> On Tue, 22 Dec 2015 10:34:58 -0500, Yuya Nishihara <yuya@tcha.org> wrote:
> >   help.wxs(33) : error LGHT0267 : Found orphaned Component  
> > 'help.internals'.
> >   If this is a Product, every Component must have at least one parent  
> > Feature.
> >   To include a Component in a Module, you must include it directly as a
> >   Component element of the Module element or indirectly via ComponentRef,
> >   ComponentGroup, or ComponentGroupRef elements.
> >
> > Perhaps we'll need a ComponentGroup that contains help.root and
> > help.internaldir?
> 
> What command line did you use, so I can check it?  After installing wix,  
> there is only help in the start menu.  A flow diagram appears to show that  
> wixcop.exe is what processes the *.wxs files.  But when I ran it on some  
> of the *.wxs without my changes, it complained about not declaring the  
> encoding as utf-8 and then spewed about whitespace errors.  So I figured I  
> was doing it wrong.

I've checked out thg-winbuild, disabled several error checks about missing
tools, made dummy files that would be built, and run it.

  (on Linux host)
  % hg clone https://bitbucket.org/tortoisehg/thg-winbuild/
  % cd thg-winbuild
  % mkdir build ../output
  % cd build
  % ln -s ../../hg
  % cd hg
  % for n in doc/*.?.txt; do touch ${n%.txt}.html; done

  (on Windows guest)
  > cd thg-winbuild
  > set PYTHONPATH=build\hg
  > python setup.py --hg-dev
  (.. comment out error checks in setup.py until it can run ..)
  > python setup.py --hg-dev --only-msi

As you can see, this isn't right way to build msi. I did that way because
my Windows VM is XP and I don't want to make it connected to the internet.

Patch

diff --git a/contrib/wix/guids.wxi b/contrib/wix/guids.wxi
--- a/contrib/wix/guids.wxi
+++ b/contrib/wix/guids.wxi
@@ -20,6 +20,7 @@ 
 
   <!-- help.wxs -->
   <?define helpFolder.guid = {9FA957DB-6DFE-44f2-AD03-293B2791CF17} ?>
+  <?define help.internals.guid = {2DD7669D-0DB8-4C39-9806-78E6475E7ACC} ?>
 
   <!-- i18n.wxs -->
   <?define i18nFolder.guid = {1BF8026D-CF7C-4174-AEE6-D6B7BF119248} ?>
diff --git a/contrib/wix/help.wxs b/contrib/wix/help.wxs
--- a/contrib/wix/help.wxs
+++ b/contrib/wix/help.wxs
@@ -28,6 +28,14 @@ 
           <File Name="templates.txt" />
           <File Name="urls.txt" />
         </Component>
+
+        <Directory Id="help.internaldir" Name="internals">
+          <Component Id="help.internals" Guid="$(var.help.internals.guid)" Win64='$(var.IsX64)'>
+            <File Id="internals.bundles.txt"      Name="bundles.txt" KeyPath="yes" />
+            <File Id="internals.changegroups.txt" Name="changegroups.txt" />
+          </Component>
+        </Directory>
+
       </Directory>
     </DirectoryRef>
   </Fragment>
diff --git a/tests/test-install.t b/tests/test-install.t
--- a/tests/test-install.t
+++ b/tests/test-install.t
@@ -102,8 +102,6 @@ 
     help/hg.1.txt
     help/hgignore.5.txt
     help/hgrc.5.txt
-    help/internals/bundles.txt
-    help/internals/changegroups.txt
   Not tracked:
 
   $ python wixxml.py templates