Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

impossible to list absolute paths to directories #19

Open
ghost opened this issue Apr 1, 2017 · 6 comments
Open

impossible to list absolute paths to directories #19

ghost opened this issue Apr 1, 2017 · 6 comments

Comments

@ghost
Copy link

ghost commented Apr 1, 2017

No description provided.

@ghost ghost closed this as completed Apr 1, 2017
@ghost ghost reopened this Apr 1, 2017
@ghost
Copy link
Author

ghost commented Apr 1, 2017

there's a "reldirs" key in the wix json struct, but it's not possible to set this with the json, or am I wrong?

@mh-cbon
Copy link
Owner

mh-cbon commented Apr 2, 2017

HI!

Thanks for report.

I understand it has to be something related to heat and xml file generation phase.

I see you have several others issues that need to be solved.

To help you best i d like to suggest to clone this repo, and make a working example
of your setup under the folder
https://github.com/mh-cbon/go-msi/tree/master/testing/

You can use the hello program as a template to yours,
https://github.com/mh-cbon/go-msi/tree/master/testing/hello/

Assume the sources are located at
c:/gopath/src/github.com/mh-cbon/go-msi/testing/[yours]
as defined at https://github.com/mh-cbon/go-msi/blob/master/testing/main.go#L30

Then propose a pr.

Doing so i ll be able to run it through CI / Vagrant and operate updates.

Let me know

@ghost
Copy link
Author

ghost commented Apr 2, 2017

What I suspect is happening is that go_msi is not setting the basename in the wix files. Here is the specific error:

C:\Users\appveyor\AppData\Local\Temp\1\go-msi636575199\product.wxs(69) : error CNDL0027 : The Directory/@Name attribute's value, 'C:\projects\pyinstaller-utils\tests\functional\bleach\build\exe.win32-3.4\Include', is not a valid long name because it contains illegal characters.  Legal long names contain no more than 260 characters and must contain at least one non-period character.  Any character except for the follow may be used: \ ? | > < : / * ".

If you wouldn't mind, where are you setting this attribute?

@mh-cbon
Copy link
Owner

mh-cbon commented Apr 3, 2017

Hi,

thanks that helps!

Something you might want to check is

1- https://github.com/mh-cbon/go-msi#-go-msi-generate-templates--h
generate the wix template

2- https://github.com/mh-cbon/go-msi#-go-msi-gen-wix-cmd--h
generate a batch of the wix commands

3- https://github.com/mh-cbon/go-msi#-go-msi-run-wix-cmd--h
run wix commands only

I m unsure which basepath you are talking about, it might be an option i m simply not aware of,
the wix template are available here
https://github.com/mh-cbon/go-msi/tree/master/templates.
I know the paths have to be managed with heat, and its little weird

Let me know

@mat007
Copy link

mat007 commented Aug 8, 2018

Hi,

I'm facing the same issue i.e. if I have this in my wix.json

  "directories": [
    "build/d4w/artifacts"
  ],

I get the following error

C:\Users\MATHIE~1\AppData\Local\Temp\go-msi881807651>candle -dSourceDir0=..\..\..\..\..\..\dev\src\github.com\someproject\win\build\d4w\artifacts AppFiles0.wxs LicenseAgreementDlg_HK.wxs WixUI_HK.wxs product.wxs
Windows Installer XML Toolset Compiler version 3.11.1.2318
Copyright (c) .NET Foundation and contributors. All rights reserved.

AppFiles0.wxs
LicenseAgreementDlg_HK.wxs
WixUI_HK.wxs
product.wxs
C:\Users\Mathieu Champlon\AppData\Local\Temp\go-msi881807651\product.wxs(37) : error CNDL0027 : The Directory/@Name attribute's value, 'build/d4w/artifacts', is not a valid long name because it contains illegal characters.  Legal long names contain no more than 260 characters and must contain at least one non-period character.  Any character except for the follow may be used: \ ? | > < : / * ".

But if I move the folder and change the wix.json file to

  "directories": [
    "artifacts"
  ],

it passes the candle stage successfully.

The problem is on that line in the generated product.wxs file

               <Directory Id="APPDIR0" Name="build/d4w/artifacts" />

This could for instance be solved by replacing forbidden characters by e.g. - or _.

Opened #33 for this.

@mat007
Copy link

mat007 commented Aug 8, 2018

Actually my diagnostic wasn't accurate as the issue is more that Name="build/d4w/artifacts" should actually be Name="artifacts".
I updated the PR to reflect that…

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants