-
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
Created script to automatically create an archive containing the Windows #8
Conversation
installer files to create the service from our application. More details can be found in windows-installer/README.md or the Jira task itself.
@barelyThinkingBagOfWater Don't change the application.properties file just yet. We need to do a harmonising exercise later on these config items as certain aspects of the application are currently working with it as is and all tests are passing the last time I checked. I've invited @OmarMalass to assist with this review as well as both of you have some overlap on this task. |
@barelyThinkingBagOfWater the code looks quite good to me. Especially running the app as windows service is an awesome feature. @barelyThinkingBagOfWater can you ping me if it takes longer than 3 days to merge this? We are on a very tight timeline and we have to make sure to integrate code in a fast way. My personal opinion is, that architecture review before any code is written makes a lot more sense than code review. |
As this is related to the installer, I'll write a short description of the current state of the installer before writing my comments. A brief background and the current installer-state
My comments on the pull request:Testing the script:I ran the Is the .exe file important? Can the service installation process be done entirely in a bat file?Currently, you run the bat file, which starts the .exe. Is there a way to make everything compact in the .bat file? I suppose this way it would all be contained in the .bat file. Replacing the hardcoded path in
|
The script is made to be run on Linux as I work on Ubuntu, it won't work on Windows (only in WSL). If you have Java installed on Windows (I forgot to add this as a prerequisite) and you put it in the correct path it will work. You can check the service log to see what's happening on your side I surmise. The exe file is important as it creates and then starts the service, the bat script just runs it with the correct parameters to simplify the commands. I'll make the path dynamic then with some scripting. About the application properties : I just removed the environment variables hardcoded in it as anyway the env variables can override the local variables if you use the correct name (ENV_FOO will automatically override env.foo as with Spring and Micronaut) but I understand your concern and will let these files as they were before. |
Now the path is dynamically resolved in Windows, you can extract the archive anywhere.
Now the path is dynamically resolved during installation, you can extract the archive anywhere. |
Tested it, the service was installed and it works great. |
We can always in the future put the wrapper exe in the part with the $PATH template variable before and remove the argument part in the xml configuration file. I can take care of it if you want when the wrapper will be ready. |
Final conclusion before merging:To set the wrapper as the executable, we update the configuration in the
Since the wrapper is not available in the main repo at the time, we will keep the executable pointing at the jar file. |
Created script to automatically create an archive containing the Windows
You can now use a script in the folder windows-installer to create an zip archive that contains:
For now the instruction are to extract this archive in Windows under c:\ere-ps-app and run the bat file.
The instructions reside in windows-installer/README.md.
Tested on my Windows 10 partition, service still works after restart.