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

Allow --releasify to specify the required .NET framework version #940

Merged
merged 5 commits into from
May 1, 2017

Conversation

NeilSorensen
Copy link
Contributor

A proposed solution for #341

@GorelH
Copy link

GorelH commented Feb 25, 2017

@NeilSorensen thanks you for your effort. is this testable ?

@NeilSorensen
Copy link
Contributor Author

NeilSorensen commented Mar 1, 2017

Unfortunately, I couldn't find any tests on any of the code that I changed. The most important change is also probably the least testable, because it depends on resources.

If I missed some tests, I'd be happy to modify them if you can point them out to me


WCHAR szTempPath[_MAX_PATH];
DWORD dwTempPathResult = GetTempPath(_MAX_PATH, szTempPath);

if (dwTempPathResult == 0) {
hr = AtlHresultFromLastError();
goto out;
} else if (dwTempPathResult > _MAX_PATH) {
}
else if (dwTempPathResult > _MAX_PATH) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Move this to the previous line

@@ -434,8 +436,14 @@ public void Releasify(string package, string targetDir = null, string packagesDi

var writeZipToSetup = findExecutable("WriteZipToSetup.exe");

try {
var result = Utility.InvokeProcessAsync(writeZipToSetup, String.Format("\"{0}\" \"{1}\"", targetSetupExe, zipPath), CancellationToken.None).Result;
try
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please match the existing code style with braces

try
{
var arguments = String.Format("\"{0}\" \"{1}\"", targetSetupExe, zipPath);
if (!String.IsNullOrEmpty(frameworkVersion))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we just default this to .NET 4.5?

if (argc == 5 && wcscmp(argv[3], L"--set-required-framework") == 0) {
setFramework = true;
}
else if (argc != 3) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⬆️

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm a little confused by what you'd like here. If --set-required-framework is unspecified, it will not overwrite the default value of net45, which is set in setup resources. Would you prefer WriteZipToSetup to always overwrite that value? Or are you suggesting making --set-required-framework a required flag for WriteZipToSetup?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nevermind, that's a style change...

@anaisbetts
Copy link
Contributor

This seems reasonable, I've marked some style changes but other than that, thanks for the PR

@Cheesebaron
Copy link

@NeilSorensen what can we do to get those style changes fixed so this PR can be merged?

@NeilSorensen
Copy link
Contributor Author

Sorry, life got in the way for a while. I'll get it updated today

@koliva8245
Copy link

@NeilSorensen Could you update this for .NET 4.7?

@NeilSorensen
Copy link
Contributor Author

@koliva8245 as I understand it, .NET 4.7 is not yet released for anything other than Windows 10 with the creator's update. Once it hits wide release, it should be fairly simple to add it as well

@anaisbetts
Copy link
Contributor

I'll try to get this out soon, if I forget please start harassing me on Twitter dot com until I do it :)

@chadgrant
Copy link

:(

@anaisbetts anaisbetts merged commit f92dc4e into Squirrel:master May 1, 2017
@anaisbetts
Copy link
Contributor

Thanks so much @NeilSorensen!

@vegardlarsen
Copy link
Contributor

Anyone working on getting .NET 4.7 support for this?

@danielkornev
Copy link

460798 is a Release number for .NET 4.7 on Windows 10 CU RTM (with latest cumulative updates):

Version: 4.7.02046

@dealproc
Copy link

Can someone add docs for this? I recalled this was available, but had to come back to this bug to find out the cmd line switch.

@cbenard
Copy link
Contributor

cbenard commented May 18, 2018

@dealproc Agreed. I'm not 100% either. Based on looking at the code, it looks like you pass --set-required-framework net471 to releasify. I don't see any docs in google mentioning --set-required-framework though.

@dealproc
Copy link

dealproc commented Jul 9, 2018

Options:
  -h, -?, --help             Display Help and exit
  -r, --releaseDir=VALUE     Path to a release directory to use with releasify
  -p, --packagesDir=VALUE    Path to the NuGet Packages directory for C# apps
      --bootstrapperExe=VALUE
                             Path to the Setup.exe to use as a template
  -g, --loadingGif=VALUE     Path to an animated GIF to be displayed during
                               installation
  -i, --icon=VALUE           Path to an ICO file that will be used for icon
                               shortcuts
      --setupIcon=VALUE      Path to an ICO file that will be used for the
                               Setup executable's icon
  -n, --signWithParams=VALUE Sign the installer via SignTool.exe with the
                               parameters given
  -s, --silent               Silent install
  -l, --shortcut-locations=VALUE
                             Comma-separated string of shortcut locations, e.g.
                               'Desktop,StartMenu'
      --no-msi               Don't generate an MSI package
      --no-delta             Don't generate delta packages to save time
      --framework-version=VALUE
                             Set the required .NET framework version, e.g.
                               net461

Thanks for the tip. I should have checked the console help (above) which has it.

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

Successfully merging this pull request may close these issues.

10 participants