-
Notifications
You must be signed in to change notification settings - Fork 39
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
GPII-1731: Windows Installer should be integrated with our deployment… #76
Conversation
Hey there, I've been trying this and the provision failed when trying to build the installer. Check this out. Also I've got a question, probably I'm missing some information but, does the build process make sense at provision time? Ideally, we should have a grunt task that is able to perform such build inside the vagrant box, isn't it? |
That's strange. I checked it again, set up a new VM from scratch and after "vagrant up" everything goes as expected and an installer is built (see http://pastebin.com/3PcHyQcj for the whole log). As for building an installer "on demand" and not as part of the CI build, you should be able to run the build-installer.bat script anytime. Just make sure the windows path is properly set before doing so (I have observed that the vagrant VM may need a restart before the path is properly persisted). |
I ran a vagrant destroy -f and then vagrant up. After the vagrant up, I force a reboot when provision is finished but still won't build. Any ideas why I'm having such problem? |
Can you open the verbose output of the "harvest" command? Use the existing VM, do not start from scratch. |
Could one of the admins verify that these changes are reasonable to test? If so, please reply with "ok to test". |
@javihernandez I managed to reproduce the issue you were having: I was using the (then) master branch and you were using the master branch plus the 35ccc28 commit. What happens is that the inclusion of the universal branch as an npm dependency creates unwieldy long paths that are problematic to handle under Windows. I had to use Still, the final installer can only be used to install GPII in "short" paths like C:\GPII and not longer ones (like C:\Program Files (x86)\GPII) because Windows won't allow it (see the attached screenshot). Unfortunately there is not much I can do about it. That is a known problem with Windows and the way npm handles dependencies. You either have to refactor somehow the dependencies of the universal repository or accept that the installer can only be used for installing in short paths. |
I can see only two forms of option - ii) Improve the installer so that it can use the special Windows filename format and API which allows for manipulation of long paths: http://superuser.com/a/760601 - it seems that this has been supported on Windows since Windows 7 SP1 as long as the filesystem is NTFS - https://support.microsoft.com/en-gb/kb/2891362 |
correct me if I'm wrong, but the problem is not during the "npm install" process but when trying to copy the already "npm-installed" files into a location. If so, I guess that "i" won't solve the problem but mitigate it a bit, so our best bet is going for "ii", isn't it? |
@javihernandez - not correct. npm 3 adopts a different, flatter layout during install, which will enable them to be successfully copied later. |
@javihernandez No, the problem is not while copying the repository. Robocopy handles long paths just fine. Running |
@amb26 The installer produces a standard .msi file and these do not seem to like very long paths nor can they use the @amb26 @javihernandez The installer is build using the Windows Installer SDK and the semi-official/Microsoft sanctioned WiX toolset. There is no magic switch that I can turn to make the .msi cope with long paths. Unless we switch to an all custom install solution I can't do much about the problem. By reading the long threads over at npm/npm#3697 and nodejs/node-v0.x-archive#6960, it seems to me that the only viable solution is switching to npm 3. |
@@ -0,0 +1,29 @@ | |||
pushd . | |||
|
|||
if not exist C:\installer\\. git clone https://github.com/gpii/gpii-wix-installer C:\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.
This needs to be updated so that the reference to the gpii-wix-installer can be somehow versioned, rather than just binding to master of the project. Without this, it will be impossible to test particular pull requests in our CI infrastructure. I don't know whether npm is a suitable option for this, but this dependency needs to be parameterised somehow.
@amb26 Would tagging work for versioning the gpii-wix-installer reference? |
As defined and decided in the several GPII Windows weekly meetings (https://pad.gpii.net/p/windows-summit-29-7-16-alr4n2a) we are moving to npm3 to fix this and other problems (like node-gyp problem in last windows-10-64bits (0.4.3) vagrant box). Migration to npm3 (and consequently to node.js 6) is tracked in the jira issue GPII-1929 after successful migration we will fix the issue with the execution of the GPII Windows installer. |
I updated the pull request to refer to a tagged commit (v1.0.0) of the gpii-wix-installer repository (see @amb26's comment about versioning references) |
@minogian perfect, thanks! |
ok to test |
CI job passed. |
… and CI infrastructure.
I updated the pull request but the current master does not build. |
CI job passed. |
It looks like this is ready to go. For the record, this addresses the inclusion of the installer into our CI (GPII-1763), all the information, next steps and related issues can be found in https://issues.gpii.net/browse/GPII-1731. |
… and CI infrastructure.
Added a build script for the vagrant provisioning stage that clones the installer repository (https://github.com/GPII/gpii-wix-installer) and builds an MSI installer for the project