Giter VIP home page Giter VIP logo

Comments (6)

mat007 avatar mat007 commented on September 28, 2024 1

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.

from go-msi.

 avatar commented on September 28, 2024

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?

from go-msi.

mh-cbon avatar mh-cbon commented on September 28, 2024

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

from go-msi.

 avatar commented on September 28, 2024

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?

from go-msi.

mh-cbon avatar mh-cbon commented on September 28, 2024

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

from go-msi.

mat007 avatar mat007 commented on September 28, 2024

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…

from go-msi.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.