I had\have a problem, where the version of the release wasn't shown anywhere
I wanted to create an issue for this, but as I was doing so, I thought, why not fix it yourself and make a PR?
answer: because I have no idea what I'm doing.
but YOLO
NOT PRODUCTION READY
What's the problem?
when trying to update this via Winget, we don't get the version number, all we get is "unknown"
Winget get its version info from the registry
so this is way we don't see the version number in "Windows Add/Remove Programs" (appwiz.cpl)
Where and how GOW is doing all of the registry stuff?
If I look inside setup/Gow.nsi
we have !define VERSION "0.8.0-1" and after that we do have
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PRODUCT}" \ "DisplayVersion" "${VERSION}"
But it doesn't seem to works.
when I look in the registry, at all 3 places I can think of:
Computer\HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall\
Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall
Computer\HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall
It is nowhere to be found.
not just the versionNumber, but everything.
when looking at the PR that added the currentVersion, https://github.com/bmatzelle/gow/pull/172
another weird thing I've found.
if the version number is 0.8.0-1
why does the installer still show it as 0.8.0 (without the -1)?
My theory
after PR 172, the .nsi file was updated, but the release page is still on 0.8.0, without this PR.
other stuff as well, like the problem where the /etc folder isn't created, even though it was fixed in this commit: https://github.com/bmatzelle/gow/commit/d21710c65cc642bc20866db2cebf91ea67a38617
so I assume that the latest build (the code itself) is not the same as the released version (0.8.0)
How to solve this
I think that we need a new build based on the latest code here.
only problem, I don't know how.
I've made a new workflow file.
but it's very dumb.
it's not dynamic
and I can't get the resulting artifact to publish as a release
What need to be done so this can be production ready?
the path should not be hard coded.
something like this path: ${{ github.workspace }}\setup\Gow*.exe should be the smarter option, I just can't get it to work with wildcards.
again, asset_path should not be hard coded with file name.
and also, it doesn't work at all! (something about upload_url path) so, we need someone who is a bit better than me to fix it.
the two steps named: Show me what you got can be removed.
Hello,
I had\have a problem, where the version of the release wasn't shown anywhere I wanted to create an issue for this, but as I was doing so, I thought, why not fix it yourself and make a PR?
answer: because I have no idea what I'm doing. but YOLO NOT PRODUCTION READY
What's the problem?
when trying to update this via Winget, we don't get the version number, all we get is "unknown"![image](https://user-images.githubusercontent.com/39513660/157021159-35da5ae7-2d16-4210-ad2a-8cfe015991cd.png)
Winget get its version info from the registry so this is way we don't see the version number in "Windows Add/Remove Programs" (appwiz.cpl)![image](https://user-images.githubusercontent.com/39513660/157021421-1f6d3400-5349-4be4-a9fc-ea6350b6e408.png)
Where and how GOW is doing all of the registry stuff?
If I look inside setup/Gow.nsi we have
!define VERSION "0.8.0-1"
and after that we do haveWriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PRODUCT}" \ "DisplayVersion" "${VERSION}"
But it doesn't seem to works. when I look in the registry, at all 3 places I can think of: Computer\HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall\ Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall Computer\HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\UninstallIt is nowhere to be found. not just the versionNumber, but everything. when looking at the PR that added the currentVersion, https://github.com/bmatzelle/gow/pull/172 another weird thing I've found. if the version number is 0.8.0-1 why does the installer still show it as 0.8.0 (without the -1)?![image](https://user-images.githubusercontent.com/39513660/157023099-0d6cd93d-ea41-49b2-a844-ffa56a86f44f.png)
My theory
after PR 172, the .nsi file was updated, but the release page is still on 0.8.0, without this PR. other stuff as well, like the problem where the /etc folder isn't created, even though it was fixed in this commit: https://github.com/bmatzelle/gow/commit/d21710c65cc642bc20866db2cebf91ea67a38617 so I assume that the latest build (the code itself) is not the same as the released version (0.8.0)
How to solve this
I think that we need a new build based on the latest code here. only problem, I don't know how. I've made a new workflow file. but it's very dumb. it's not dynamic and I can't get the resulting artifact to publish as a release
What need to be done so this can be production ready?
in the workflow, in the artifact step:
the path should not be hard coded. something like this
path: ${{ github.workspace }}\setup\Gow*.exe
should be the smarter option, I just can't get it to work with wildcards.in the upload asset step:
again, asset_path should not be hard coded with file name. and also, it doesn't work at all! (something about upload_url path) so, we need someone who is a bit better than me to fix it.
the two steps named:
Show me what you got
can be removed.