Skip to content
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

Add an installer #6

Closed
bNobo opened this issue Mar 16, 2020 · 5 comments
Closed

Add an installer #6

bNobo opened this issue Mar 16, 2020 · 5 comments
Assignees
Labels
enhancement New feature or request

Comments

@bNobo
Copy link
Owner

bNobo commented Mar 16, 2020

Create an installer in order to permit end-user to easily install and update the application.

@bNobo bNobo added the enhancement New feature or request label Mar 18, 2020
@bNobo
Copy link
Owner Author

bNobo commented Mar 20, 2020

It raises several questions :

  • Which technology is best suited : ClickOnce, WIX, Visual Studio Project template, ... The main con of ClickOnce is that it requires a digital code signing certificate (Authenticode).
  • Where to store the setup and binaries to make them available to everyone ?
  • How to update the application once installed ?
  • How to communicate about the availability of this free application ?

I've just discovered this extension and will take a look on it : https://marketplace.visualstudio.com/items?itemName=caphyon.AdvancedInstallerforVisualStudio2019

@bNobo
Copy link
Owner Author

bNobo commented Mar 27, 2020

Advanced Installer is definitively not an option: it is a commercial product, the free version is too limited for my needs. For instance the free version do not permit to automatically launch the application after installation.

@bNobo
Copy link
Owner Author

bNobo commented Mar 30, 2020

@bNobo bNobo self-assigned this Apr 3, 2020
@bNobo
Copy link
Owner Author

bNobo commented Apr 3, 2020

I will stick using ClickOnce because it is the most convenient way to create a setup and easily allow auto-update of the application. I'll have to buy an Authenticode digital certificate one day in order to get rid of the UAC message.

I just published a v1.0.0 release with setup files attached in a zip. I also created a GitHub page to hold the update location used by ClickOnce. It should allow auto-update.

I encountered an interesting problem while testing : the setup once uploaded to git did not work anymore. It was because the ClickOnce manifest is hashed with CRLF line endings and git replace CRLF with LF during commit. The hash did not match the file anymore and the setup was considered corrupted. I have solved the problem with this command :

git config --local core.autocrlf false

It disables the automatic CRLF correction for the project.

The error in the installation logs was

[03/04/2020 18:17:59] System.Deployment.Application.InvalidDeploymentException (HashValidation)
		- Le manifeste d'application possède un hachage calculé différent de celui spécifié ou aucun hachage n'est spécifié. 
		- Source : System.Deployment
		- Trace de la pile :
			à System.Deployment.Application.DownloadManager.DownloadApplicationManifest(AssemblyManifest deploymentManifest, String targetDir, Uri deploymentUri, IDownloadNotification notification, DownloadOptions options, Uri& appSourceUri, String& appManifestPath)
			à System.Deployment.Application.ApplicationActivator.DownloadApplication(SubscriptionState subState, ActivationDescription actDesc, Int64 transactionId, TempDirectory& downloadTemp)
			à System.Deployment.Application.ApplicationActivator.InstallApplication(SubscriptionState& subState, ActivationDescription actDesc)
			à System.Deployment.Application.ApplicationActivator.PerformDeploymentActivation(Uri activationUri, Boolean isShortcut, String textualSubId, String deploymentProviderUrlFromExtension, BrowserSettings browserSettings, String& errorPageUrl, Uri& deploymentUri)
			à System.Deployment.Application.ApplicationActivator.PerformDeploymentActivationWithRetry(Uri activationUri, Boolean isShortcut, String textualSubId, String deploymentProviderUrlFromExtension, BrowserSettings browserSettings, String& errorPageUrl)
--- Fin de la trace de la pile à partir de l'emplacement précédent au niveau duquel l'exception a été levée ---
			à System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
			à System.Deployment.Application.ApplicationActivator.PerformDeploymentActivationWithRetry(Uri activationUri, Boolean isShortcut, String textualSubId, String deploymentProviderUrlFromExtension, BrowserSettings browserSettings, String& errorPageUrl)
			à System.Deployment.Application.ApplicationActivator.ActivateDeploymentWorker(Object state)
		--- Exception interne ---
		System.Deployment.Application.InvalidDeploymentException (HashValidation)
		- Le fichier NeedABreak.exe.manifest possède un hachage calculé différent de celui spécifié dans le manifeste.
		- Source : System.Deployment
		- Trace de la pile :
			à System.Deployment.Application.ComponentVerifier.VerifyFileHash(String filePath, Hash hash)
			à System.Deployment.Application.ComponentVerifier.VerifyFileHash(String filePath, HashCollection hashCollection)
			à System.Deployment.Application.DownloadManager.DownloadApplicationManifest(AssemblyManifest deploymentManifest, String targetDir, Uri deploymentUri, IDownloadNotification notification, DownloadOptions options, Uri& appSourceUri, String& appManifestPath)

@bNobo
Copy link
Owner Author

bNobo commented Apr 3, 2020

I put the GitHub page holding setup files in the gh-pages branch. This issue can be considered closed now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant