Stream: clinic-arrivals
Topic: Installer
Brian Postlethwaite (Mar 27 2020 at 05:25):
Thought I'd create a topic specifically for this...
Vadim Peretokin (Mar 27 2020 at 05:34):
Yeah. I'd like to use squirrel - you've most likely already used it if you ever ran an electron app like postman or github desktop. It's super simple for the user: double-click, wait 30s looking at the Installing
picture, and the application launches. No wizards, no nothing.
Vadim Peretokin (Mar 27 2020 at 05:35):
Installs in appdata so needs no admin rights. But it's only going to do 1 shortcut, adding the 2nd simulator one - we can do that at runtime. It has hooks for uninstalling which we can use to remove it.
Brian Postlethwaite (Mar 27 2020 at 05:40):
ok, I haven't done anything in Squirrel, so can't be of much use.
I've only done ClickOnce, a few commercial packages and the MS Simple installer thing.
Brian Postlethwaite (Mar 27 2020 at 05:40):
Click Once would give you the updater stuff too, don't know if Squirrel has any story there
Brian Postlethwaite (Mar 27 2020 at 05:41):
@Brett Esler you did ClickOnce too yeah?
Brian Postlethwaite (Mar 27 2020 at 05:41):
That then has the code signing issues, so maybe not.
Vadim Peretokin (Mar 27 2020 at 05:44):
Squirrel is a better ClickOnce from what I understand - and you can do signing with it
Vadim Peretokin (Mar 27 2020 at 05:47):
@Grahame Grieve you have a code signing certificate?
Brian Postlethwaite (Mar 27 2020 at 05:47):
Not likely...
Vadim Peretokin (Mar 27 2020 at 05:48):
This is my latest research as of last week in this arena...
SSL.com: $116 for 2 years. Reliability: [to be determined]
Sertigo (formerly Comodo): $178 for 2 years. Reliability: [to be determined] [positive source]
Certrum: €289.00 for 2 years. Reliability: [to be determined. We might have used them before]
GlobalSign: $578 for 2 years. Reliability: [to be determined]
Entrust: $600 for 2 years. Reliability: [to be determined]. To get a real quote you have to submit a contact form which doesn't actually work.
Digicert: $950 for 2 years. Reliability: good.
Let’s Encrypt: not an alternative, they don't issue code signing certificates.
Vadim Peretokin (Mar 27 2020 at 05:50):
I got bitten by Digicert raising their 2 year price from $400 to $950, something to watch out for.
Grahame Grieve (Mar 27 2020 at 07:06):
I do have a code signing certificate
Vadim Peretokin (Mar 27 2020 at 08:29):
Automated release builds are a go: https://github.com/grahamegrieve/ClinicArrivals/pull/27
Vadim Peretokin (Mar 27 2020 at 08:30):
All you do is make a release using the standard github ui (instructions) and it'll drop in the zip to it.
I'll work on the installer next.
Vadim Peretokin (Mar 27 2020 at 10:35):
Important: GitHub since February 22, 2018 only support TLS 1.2 connections. The host application is therefore required to use .NET framework 4.6.1, otherwise TLS 1.1 is the default protocol and check for update won't work.
We settled on 4.6.2 - so we'll be good on this.
James Berry (Mar 27 2020 at 11:23):
Well what about ClinicArrivals\ClinicArrivals.Server\ClinicArrivals.Server.csproj
<RootNamespace>ClincArrivals.Server</RootNamespace>
<AssemblyName>ClincArrivals.Server</AssemblyName>
<TargetFrameworkVersion>v4.5.2</TargetFrameworkVersion>
Vadim Peretokin (Mar 27 2020 at 11:24):
@Brian Postlethwaite ?
Vadim Peretokin (Mar 27 2020 at 15:05):
.net has me stumped. The app runs fie out of the Release
folder just fine. If I rename the Release
folder, it still runs fine. If I move the Release
folder somewhere else - say, on the desktop - it fails to launch.
Vadim Peretokin (Mar 27 2020 at 15:05):
No error message, nothing in Windows Event logs, no information at all. If anyone knows what this could mean, let me know.
Vadim Peretokin (Mar 27 2020 at 15:41):
Got it sorted out :thumbs_up:
Vadim Peretokin (Mar 28 2020 at 04:32):
@James Berry It was actually crashing with an exception trying to load a relative file outside of the folder. I still didn't find a way to get an error message out of windows, but found the source of the problem, at least.
Vadim Peretokin (Mar 28 2020 at 04:55):
Test installer ready. @James Berry mind having a look? https://github.com/grahamegrieve/ClinicArrivals/releases/download/0.0.17/ClinicArrivals-0.0.17-win.exe
James Berry (Mar 28 2020 at 05:02):
Vadim Peretokin said:
Test installer ready. James Berry mind having a look? https://github.com/grahamegrieve/ClinicArrivals/releases/download/0.0.17/ClinicArrivals-0.0.17-win.exe
This app might harm your device
Microsoft Defender SmartScreen reported that this app is not commonly downloaded or is not signed by its publisher.
Name: ClinicArrivals-0.0.17-win.exe
Publisher: Unknown
Keep anyway
Report this app as safe
Learn more
Delete
Vadim Peretokin (Mar 28 2020 at 05:03):
Indeed, it was just made an hour ago and it's not signed :)
Vadim Peretokin (Mar 28 2020 at 05:03):
So the warning is correct and for now we ignore - will add code signing soon.
James Berry (Mar 28 2020 at 05:09):
Installs very quickly and opens by itself - is that what we want? Status has FHIR Starting. I guess for most users this is OK, as we want them to either update an existing instance or start using it for real? It doesn't ask where to install, so that should mean we have consistency and the data should be in the default location.
Brian Postlethwaite (Mar 28 2020 at 05:12):
Yup, no choice.
Brian Postlethwaite (Mar 28 2020 at 05:12):
It does the standard windows locations.
Brian Postlethwaite (Mar 28 2020 at 05:13):
Does it not require elevated permissions?
Vadim Peretokin (Mar 28 2020 at 05:14):
It doesn't, which is nice
Vadim Peretokin (Mar 28 2020 at 05:14):
Goes into appdata
Vadim Peretokin (Mar 28 2020 at 05:14):
This is the same installer you've used for postman/githubdesktop/slack/etc
James Berry (Mar 28 2020 at 05:14):
No elevated permissions. All I had to do was agree to keep it, then as soon as I clicked on it, it was up and running. No wizard. There is a shortcut on the desktop to '''C:\Users\james\AppData\Local\ClinicArrivals\ClinicArrivals.exe'''
Vadim Peretokin (Mar 28 2020 at 05:15):
And you'll find one in the startup menu, as well.
Vadim Peretokin (Mar 28 2020 at 05:15):
It's registered itself with Windows so you can uninstall the usual way.
James Berry (Mar 28 2020 at 05:15):
yep it's there. Lovely, well done
James Berry (Mar 28 2020 at 05:17):
On the Message Templates tab I noticed that the Video message seemed curtailed. I clicked on Reload and now the tab is blank
Vadim Peretokin (Mar 28 2020 at 05:17):
@Brian Postlethwaite your thoughts?
Vadim Peretokin (Mar 28 2020 at 05:17):
That would be an issue in the latest master
- could you file it?
Brian Postlethwaite (Mar 28 2020 at 05:19):
Would have to investigate.
Vadim Peretokin (Mar 28 2020 at 05:19):
And on the installer?
James Berry (Mar 28 2020 at 05:22):
Vadim Peretokin said:
That would be an issue in the latest
master
- could you file it?
Can we have the version of the program displayed on the About tab for reporting issues?
Vadim Peretokin (Mar 28 2020 at 05:23):
Also a good idea. Right now the installer sets it everywhere it should - on the dll's and in the windows programs panel
Vadim Peretokin (Mar 28 2020 at 05:23):
This is not a real version, I'll delete all of the test releases I made developing this
Vadim Peretokin (Mar 28 2020 at 05:27):
I updated github so there's no confusion later :)
Brian Postlethwaite (Mar 28 2020 at 05:30):
Cool.
Brian Postlethwaite (Mar 28 2020 at 05:30):
Haven't tried running it myself yet.
Vadim Peretokin (Mar 28 2020 at 05:32):
Okay. https://github.com/grahamegrieve/ClinicArrivals/pull/29 is ready for review, if you could drop the feedback there. Once it's merged I'll work on adding self-update functionality.
Vadim Peretokin (Mar 28 2020 at 05:41):
Test releases have been deleted, I'll let Grahame have the honours in the 1.0
James Berry (Mar 28 2020 at 05:49):
Love the icon - red, green and blue people. So red is infected, green is not, and blue is the doctor?
James Berry (Mar 28 2020 at 05:53):
where is the data stored? I have closed the app, deleted ClinicArrivals from C:\Users\james\AppData\Local\ and then reinstalled, but the Message Templates are still the way I left them
Vadim Peretokin (Mar 28 2020 at 05:54):
Got it from Grahame. I don't know, but I don't think those guys are maintaining appropriate social distancing.
James Berry (Mar 28 2020 at 05:56):
Uninstalling requires what looks like elevated privileges but may just be a warning
Vadim Peretokin (Mar 28 2020 at 05:58):
I don't see anything, it just goes away. What do you see?
James Berry (Mar 28 2020 at 05:58):
After uninstall C:\Users\james\AppData\Local\ClinicArrivals\ contains two files
.dead
Update
Vadim Peretokin (Mar 28 2020 at 05:59):
That is normal behavior for Squirrel as I understand
James Berry (Mar 28 2020 at 06:00):
I really can't get a fresh copy with Message Templates that aren't messed up from my previous installation - no idea where they are installed
Vadim Peretokin (Mar 28 2020 at 06:00):
They are stored elsewhere by the application code, let me see...
Vadim Peretokin (Mar 28 2020 at 06:01):
Brian mentioned somewhere in appdata.
James Berry (Mar 28 2020 at 06:01):
Vadim Peretokin (Mar 28 2020 at 06:01):
James Berry (Mar 28 2020 at 06:03):
Vadim Peretokin (Mar 28 2020 at 06:03):
Yeah, that is just a warning. If you use the... second way of uninstalling as in my gif, it won't show.
James Berry (Mar 28 2020 at 06:03):
Vadim Peretokin said:
course, should have remembered - I read that several times
Vadim Peretokin (Mar 28 2020 at 06:04):
Did I link the gif? Here: https://imgur.com/G4fbgHc
James Berry (Mar 28 2020 at 06:05):
Can't copy it but I get a UAC popup on uninstall
Vadim Peretokin (Mar 28 2020 at 06:06):
Oh? I don't, strange. There were no admin rights needed to install it.
James Berry (Mar 28 2020 at 06:09):
I think it's just a warning - I don't think you need admin rights required to uninstall
Vadim Peretokin (Mar 28 2020 at 06:10):
Alright.
James Berry (Mar 28 2020 at 06:24):
Vadim Peretokin (Mar 28 2020 at 06:33):
Aha - that is the equivalent of the one you saw the first time. This will also go away once we start signing it with Grahame as the publisher.
Grahame Grieve (Mar 29 2020 at 09:17):
I don't think those guys are maintaining appropriate social distancing.
lol
Grahame Grieve (Mar 29 2020 at 09:17):
ok how do we set up signing?
Grahame Grieve (Mar 29 2020 at 09:17):
awesome work, btw
Vadim Peretokin (Mar 29 2020 at 10:45):
@Grahame Grieve upload the code signing certificate to the repo (.p12) file and then create a repository secret with the signing password: https://help.github.com/en/actions/configuring-and-managing-workflows/creating-and-storing-encrypted-secrets#creating-encrypted-secrets
Vadim Peretokin (Mar 29 2020 at 10:46):
Once you do that I can rig the installer creation to sign it
Grahame Grieve (Mar 29 2020 at 10:50):
ok added secret SIGNING_CERT and healthintersections.p12
Vadim Peretokin (Mar 29 2020 at 11:28):
Code signing is a go. Here's a fake release ClinicArrivals-0.0.5-win.7z to see it in action
Vadim Peretokin (Mar 29 2020 at 11:28):
@Grahame Grieve
Grahame Grieve (Mar 29 2020 at 19:39):
awesome
Grahame Grieve (Mar 29 2020 at 19:42):
hmm I think I screwed that up. I do a release through github.com, right? Do I have to do something special to get the installer as part of the release?
Grahame Grieve (Mar 29 2020 at 19:45):
and what does this mean:
Run # Validate that the version used in the release is one that'll work with all of our tooling
The attribute cannot be added because variable version with value v0.1.0 would no longer be valid.
At D:\a\_temp\20f7f2f7-6ce5-4416-9b5a-6f51b13041a5.ps1:5 char:1
+ [ValidatePattern("^(?<Version>\d+(\s\.\s\d+){0,3})(?<Release>-[a-z] ...
Vadim Peretokin (Mar 29 2020 at 19:58):
@Grahame Grieve it's trying to tell you that v0.1.0 isn't kosher
Vadim Peretokin (Mar 29 2020 at 19:58):
0.1.0 would be ok. I'll change it to a better error message
Vadim Peretokin (Mar 29 2020 at 19:58):
you did everything right, just the tag name needs to be different @Grahame Grieve
Grahame Grieve (Mar 29 2020 at 20:21):
github recommends v0.1.0 not 0.1.0?
Vadim Peretokin (Mar 29 2020 at 20:25):
@Grahame Grieve Not a bad recommendation. I can tweak the code to strip out the v in places where it won't be accepted
Vadim Peretokin (Mar 29 2020 at 20:25):
Do you want it tonight or can it be tomorrow morning?
Grahame Grieve (Mar 29 2020 at 20:57):
tonight, if you can
Brett Esler (Mar 29 2020 at 21:12):
I need to push a new server library version with a fix for medical director
James Berry (Mar 29 2020 at 23:28):
Vadim Peretokin said:
Grahame Grieve upload the code signing certificate to the repo (.p12) file and then create a repository secret with the signing password: https://help.github.com/en/actions/configuring-and-managing-workflows/creating-and-storing-encrypted-secrets#creating-encrypted-secrets
Doesn't this mean that anyone on the Internet can try brute forcing the .p12 to extract the private key?
Grahame Grieve (Mar 29 2020 at 23:46):
yes
Vadim Peretokin (Mar 30 2020 at 05:51):
@Grahame Grieve for the self-update - what kind of a workflow do you prefer
in my apps I prefer it to be least annoying - so on application start, the app checks for updates and if there are any does a gentle notification (like browsers do) that there's something new. no pop-ups or anything - until the user closes the application. When they do, there's a window saying there's a new release and here's what's new, do you want to update now or skip
Grahame Grieve (Mar 30 2020 at 05:56):
I really like Paint.net because it asks you when you're closing it - in other words, when you're not wanting to use it now
Grahame Grieve (Mar 30 2020 at 05:56):
but I think this app isn't quite the same... I think it should sms the adminstrator when there's an update released, and have a button to download and install
Vadim Peretokin (Mar 30 2020 at 05:58):
Yes, I prefer the same Paint.net approach, don't annoy the user right when you want to use the app
Okay so no pop-ups of any kind at the end, just enable a button when there's an update & send an sms (once?) when you find it
Grahame Grieve (Mar 30 2020 at 05:58):
y.
Grahame Grieve (Mar 30 2020 at 05:59):
once you find it
Grahame Grieve (Mar 30 2020 at 05:59):
if there's an adminsitrator
Vadim Peretokin (Mar 30 2020 at 06:00):
right
Vadim Peretokin (Apr 03 2020 at 14:03):
Alright, it's ready: https://github.com/grahamegrieve/ClinicArrivals/pull/41
Grahame Grieve (Apr 03 2020 at 19:53):
cool. can we get the version onto the About page?
Grahame Grieve (Apr 03 2020 at 19:53):
what's the best way to do that?
Vadim Peretokin (Apr 03 2020 at 20:25):
hmmm will look into it this weekend
Last updated: Apr 12 2022 at 19:14 UTC