Closed caver456 closed 2 years ago
Incorporate external dependencies into the installation tool - maybe nullsoft or such?
Can the installer also install the extension?
https://stackoverflow.com/questions/8535429/installing-chrome-extension-from-nsis-installer
Create a nullsoft installer (NSIS - https://sourceforge.net/projects/nsis/) which includes all of these:
installing chrome extension from NSIS: see https://developer.chrome.com/docs/extensions/mv3/external_extensions/ - the docs are a bit old but still work. You only need the update_url element - nothing else. Also see the bottom of that page regarding removal from blocklist.
This assumes that the extension ID will always be the same for all users and all computers - even if it was automatically generated rather than using a 'key' tag in the manifest. Would be nice to confirm that somehow.
UPDATE: confirmed. It's just the URL of the extension's page in the chrome web store. Also, Steve installed the same extension as me and confirmed identical ID.
So this relates to the question of to-hardcode-or-not-to-hardcode.
Check to see if the extension is already installed: if installed, a folder whose name is equal to the extension ID will be in $USER/AppData/Local/Google/Chrome/User Data/Default/Extensions - this should be robust, since removing an extension from Chrome actually deletes the folder.
This installer doesn't need to check for, or try to install, .NET. The Garmin installer executable takes care of that.
This link to the Garmin drivers web page will probably go away at some point: https://www8.garmin.com/support/download_details.jsp?id=591
The executable installer, downloadable from the page, is included with this NSIS installer.
host: pyinstaller seems to be much farther along now than previous attempts. It works out nicely to make a folder with an executable, but, we do need to still be able to see and edit config.py. This installer needs to edit config.py to specify gpsbabel install location. It would also be nice to be able to edit wrapper.py if needed - but these are not visible in the one-folder pyinstaller method - they are a part of wrapper.exe. Look into exposing those files.
realized that Windows installer (currently almost complete) and Mac installer (not yet started) are two significantly different things, so, renamed this issue from 'installer' to 'Windows installer' and will make a new issue for Mac installer.
gpsio-host.exe created from pyinstaller is flagged by windows defender as containing a threat: Trojan:Win32/Sabsik.TE.A!ml - googling 'pyinstaller trojan' shows several folks have reported false positives on pyinstaller results. This one looks like a good place to start: https://python.plainenglish.io/pyinstaller-exe-false-positive-trojan-virus-resolved-b33842bd3184
moving detailed discussion of this problem to new issue #24
added firefox extension installer; doesn't need to be online; v1.0.1 of the .xpi is included with the installer .exe, since Firefox doesn't have a similar method as Chrome to tell the browser to install an extension by editing a registry key. Message box comments in the installer explain what the user should see.
Windows installer is stable enough for NCSSAR internal use. Will wait til Mac installer is working too before publishing both Windows and Linux installers together.
Windows and mac installers are both working. Windows uses the embeddable installer. Mac uses pyinstaller since the resulting executable is not flagged as a threat on virustotal.com.
Not sure if it's possible to use pyinstaller or such to make wrapper.py self-contained, since its entry point is not standard. Need to investigate / ask around.