Giter Site home page Giter Site logo

Comments (4)

oleg-shilo avatar oleg-shilo commented on July 26, 2024 1

You managed to solve it because you switched to an absolute path. Your process's current directory has no impact on absolute paths. Life is good. :)

However when you were using relative paths then they are always relative to the process current dir.

absolute_path = curr_dir + relative_path

When you set SourceBaseDir you are saying to to WixSharp compiler "during the build, do not use currentdir but SourceBaseDir for all MSI input files relative paths"

absolute_path = SourceBaseDir + relative_path

This will be happening during the execution of WiX compilers (project.BuildMsi() call) but not when you are calling your Path.GetFullPath(...)

from wixsharp.

oleg-shilo avatar oleg-shilo commented on July 26, 2024

I think the problem is caused by the SourceBaseDir being set to some location.
All relative paths are resolved against project.SourceBasedDir, which by default is a currentdir of the current process.

Thus you will need to find a way to adjust your relative path against your Constants.SOURCEDIR

from wixsharp.

abskulkarni avatar abskulkarni commented on July 26, 2024

I think the problem is caused by the SourceBaseDir being set to some location. All relative paths are resolved against project.SourceBasedDir, which by default is a currentdir of the current process.

Thus you will need to find a way to adjust your relative path against your Constants.SOURCEDIR

Hi @oleg-shilo
But Path.GetFullPath resolves to absolute path already (which is also proved working if I give whole absolute path in pfxPath.
So it is confusing me.

  1. Do you mean to say Path.GetFullPath gets resolved relative to SourceDir when MSI is being run?
  2. If yes to 1, is there a way I can use a public property for certificate path & set property at some event so that MSI can resolve digital signature?

from wixsharp.

abskulkarni avatar abskulkarni commented on July 26, 2024

I think the problem is caused by the SourceBaseDir being set to some location. All relative paths are resolved against project.SourceBasedDir, which by default is a currentdir of the current process.
Thus you will need to find a way to adjust your relative path against your Constants.SOURCEDIR

Hi @oleg-shilo But Path.GetFullPath resolves to absolute path already (which is also proved working if I give whole absolute path in pfxPath. So it is confusing me.

  1. Do you mean to say Path.GetFullPath gets resolved relative to SourceDir when MSI is being run?
  2. If yes to 1, is there a way I can use a public property for certificate path & set property at some event so that MSI can resolve digital signature?

Hi @oleg-shilo
I somehow resolved it by doing below steps, but I am still unclear about concept of relative path being used in WixSharp.

  1. I pasted licence.rtf & certificate file on the path where MSI gets generated.
  2. In the script, I took Path.GetFullPath of those files, like, Path.GetFullPath("licence.rtf") & Path.GetFullPath("certificate.p12") in respective variables licencePath & certificatePath.
  3. I used these variables in project.LicenceFile & DigitalSigntaure respectively.
  4. MSI got compiled and it got signed as well.

Please refer below screen shot for code changes.

image

Please refer below screen shot where I pasted files

image

Question : Can you please explain this concept of relative path as I am still confused why and how it worked?

from wixsharp.

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.