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
"x86 + x64" installer #44
Conversation
There were some spaces intermixed with tabs which I fixed. You can apply this patch on top of this PR to fix them. I'll test this next. |
@@ -42,8 +45,7 @@ main() { | |||
--sign-pkcs12="${SIGN_PKCS12}" \ | |||
--sign-pkcs12-pass="${SIGN_PKCS12_PASS}" \ | |||
--sign-timestamp="${SIGN_TIMESTAMP_URL}" \ | |||
|| die "pack ${arch}" | |||
done | |||
|| "pack installer" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't this say || die "pack installer"
?
This PR basically worked, except for one rather major thing: on 64-bit Windows it puts all the files to C:\Program Files (x86)\OpenVPN, not to C:\Program files\OpenVPN. This is problematic for two reasons:
I took a quick look at openvpn.nsi, and it seems that you may need to adapt the .onInit function to fix this. Simply changing InstallDir based on bitness probably will not work, as the registry view also needs to be change, and that is done in .onInit. Once this issue is fixed, I will rebuild installers and send a notification to openvpn-devel and openvpn-users maling lists, so that more people can test it. Hopefully we can get this functionality merged with 2.4_rc1 installers, as it is genuinely useful. |
@@ -45,7 +45,7 @@ main() { | |||
--sign-pkcs12="${SIGN_PKCS12}" \ | |||
--sign-pkcs12-pass="${SIGN_PKCS12_PASS}" \ | |||
--sign-timestamp="${SIGN_TIMESTAMP_URL}" \ | |||
|| "pack installer" | |||
|| "die pack installer" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually, die is the function name and "pack installer" a parameter, so it should say die "pack installer"
(notice location of quotes).
I tested installer on x64. it is ok. I'll rebase as a single commit |
I'm testing the installer right now. There is one issue, though... While removing the InstallDir line seems seems harmless, it actually breaks silent installation to non-standard directories. That is a bit esoteric, but I know about it because I fixed that problem myself in commit a73a75. More details are available in Trac#249. |
ok, I'll test silent installation |
I tested installer based on this PR on Windows 7 Pro 64-bit, and @cron2 tested it on Windows 7 32-bit. In both cases the installer seemed to work as expected. We only tested manual installations. |
Oh, and this won't make it to OpenVPN 2.4_beta1 which is due in a few hours. However, RC1 is not far away, so the delay will be only a few weeks. This will also give independent tests more time to verify the functionality on various Windows versions. |
I tested, it works with custom install directory now. as for the rest, I'm aware of couple of things:
|
WriteRegDWORD HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\${PACKAGE_NAME}" "NoRepair" 1 | ||
WriteRegStr HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\${PACKAGE_NAME}" "Publisher" "${PRODUCT_PUBLISHER}" | ||
WriteRegStr HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\${PACKAGE_NAME}" "UninstallString" "$INSTDIR\Uninstall.exe" | ||
WriteRegStr HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\${PACKAGE_NAME}" "URLInfoAbout" "https://openvpn.net" | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What do the "Language", "NoModify" and "NoRepair" lines do exactly? Do they affect uninstall behavior?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
usually, in control panel you see "Uninstall/Change" button. As for NSIS installers, there's no "Change" or "Repair" possibility, so, using those values in registry will reduce button text to "Uninstall"
it is cosmetic, just as language.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, ok, that makes sense then.
Let's put the "fail on WinXP" and .Net 4 check to a separate PR. That way we can get the combined installer tested and merged more easily. |
The Travis failure is again due to build-snapshot. I committed a fix three hours ago, so it should go away on next build |
A build of OpenVPN 2.4_beta1 is ongoing. Once it is finished (in <20 minutes), a combined installer should be available here. We should advertise that installer on openvpn-devel list once it passes the basic tests. The things to test, in my opinion, are:
The installer also has openvpnserv2 v1.2.0.0, which includes the exit-event fix v2. So all the more reason to have this all tested by real users and the Powershell test suite. Anyways, let's not add any more "stuff" to this PR at this point, so that we don't have to do any more testing (assuming the installer + openvpnserv2 work correctly). |
yes, I saw travis failing. I didn't address that, because it will be automatically resolved after merge. |
do you want to make more wide announce of https://build.openvpn.net/downloads/snapshots/openvpn-install-2.4_beta1-I901.exe ? I tested for myself, it is ok |
as for uninstaller, it leaves openvpnserv2 log. I guess it is bug, but we could leave for now. I'm going to make test like "install installer, uninstall and check for files left" |
I ran openvpn-windows-test (in my case about 12 different connections with mix of IPv4 and IPv6 payloads - no issues with the installer. I will announce the installer on openvpn-devel mailing list. If nobody has found any issues by Monday I think we can merge this PR. |
Tested the snapshot installer (on windows 7: all good except
|
|
@selvanair , as for stopping services, I found http://nsis.sourceforge.net/NSIS_Simple_Service_Plugin should we merge "x86 + x64" PR and address other issues (like .net 4, Windows Vista instead of WinXP, stopping services) in later PRs ? |
On Sat, Nov 19, 2016 at 1:23 PM, Ilya Shipitsin notifications@github.com
Selva |
@selvanair : yes, let's address the other issues in a separate PR. |
so, can we merge it ? |
File "${OPENVPN_ROOT_X86_64}\bin\openvpnserv.exe" | ||
${Else} | ||
File "${OPENVPN_ROOT_I686}\bin\openvpnserv.exe" | ||
${EndIf} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here are spaces instead of tabs. We could add a client-side Git hook to prevent spaces for the openvpn-build project. Or maybe we could make Travis fail if there are spaces in certain files such as this one?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
git hooks are not platform independent. it is hard to make it work on unix/osx/windows
but we can do that with either Travis-CI or https://reviewable.io
I'll push a patch (with tabs) soon
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@chipitsine : I always use "git diff" to have a look at the changes before commit: in general it reveals these tabs vs. spaces quite nicely.
# This is required because of commit 2bb1726764344 ("Do not disconnect on suspend"). | ||
# Without this users will experience weired disconnections after suspend/resume. | ||
WriteRegStr "HKLM" "Software\OpenVPN-GUI" "disconnect_on_suspend" "0" | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a note for the posterity: we agreed on the mailing list to remove this registry string..
We already use sc.exe in openvpn.nsi, so it would be trivial to use it to shut down OpenVPNService and OpenVPNServiceLegacy when necessary. That should cover 95% of cases where openvpn.exe is running. That said, a question comes to mind:
As for merging this: as debbie10t had some issues I want to run a few more tests myself to figure out what is going on. |
as for discussion of sc.exe, it looks like we have not settled to move it to separate PR and continue to discuss it here. can we merge this PR ? as for sc.exe, actually, you make PR if you want |
Let's not add anything to this PR, otherwise we have to retest it again. I will run some additional tests for this PR on my Windows laptop later today. If all goes well, I'll merge this. |
So I ran some tests and the installer with this PR seemed to work as expected. I did a bunch of install/uninstall/reinstall cycles both silently (/S) to the default and non-standard directories (/D). I also tested the installer interactively to make sure behavior is consistent. Finally, I then verified that the official 2.4_beta1 installer works the same, and it did. In a nutshell I was unable to break this PR. As this PR also worked for Selva I'm confident in merging this. I did notice a bug in registry key handling, but that is unrelated to this PR, as it was reproducible also with the official 2.4_beta1 installers. |
No description provided.