agc93 / ClickTwice

Improved ClickOnce publishing tools and helpers
MIT License
10 stars 3 forks source link

Publish for installation from the "web" #4

Open Lakritzator opened 7 years ago

Lakritzator commented 7 years ago

Before I knew of ClickTwice, I did the publishing from a cake build myself.

This is essentially the code I used from the build.cake:

    MSBuild(<path to csproj>,
        new MSBuildSettings {
        Verbosity = Verbosity.Minimal,
        ToolVersion = MSBuildToolVersion.VS2017,
        Configuration = configuration,
        PlatformTarget = PlatformTarget.MSIL
    }   .WithTarget("PublishOnly")
            .WithProperty("PublishDir", publishDir.Quote())
            .WithProperty("InstallUrl", installUrl.Quote())
            .WithProperty("PublishUrl", publishUrl.Quote())
            .WithProperty("IsWebBootstrapper", isWebBootstrapper)
            .WithProperty("BootstrapperEnabled", "true")
            .WithProperty("InstallFrom", installFrom)
            .WithProperty("ApplicationVersion",version.AssemblySemVer)
        );

The PublishDir decides where the files are copied to, the InstallUrl where the ClickOnce application is intalled and where the "setup.exe" is looking for the files. I also force that a web bootstrapper is created, which knows how to download. Depending on the build, if it's locally or on the build server, different variables are used (installFrom can be "Web" or "Unc".

For ClickTwice I am missing how I can specify the InstallUrl? And how does ClickTwice know it's a web-installation?