Windows installer installing into AppData/Local
Implemented an Windows installer installing into AppData/Local, as explained in #49. Alternative to #51 .
OK, so in readiness for v3.0.3 release, I attempted to compile the scripts using MakeNSISW v3.04 and I got some errors sadly :
MakeNSIS v3.04 - Copyright 1999-2018 Contributors See the file COPYING for license details. Credits can be found in the Users Manual.
Processing config: C:\Program Files (x86)\NSIS\nsisconf.nsh Processing default plugins: "C:\Program Files (x86)\NSIS\Plugins\x86-ansi*.dll"
- Banner::destroy
- Banner::getWindow
- Banner::show
- BgImage::AddImage
- BgImage::AddText
- BgImage::Clear
- BgImage::Destroy
- BgImage::Redraw
- BgImage::SetBg
- BgImage::SetReturn
- BgImage::Sound
- Dialer::AttemptConnect
- Dialer::AutodialHangup
- Dialer::AutodialOnline
- Dialer::AutodialUnattended
- Dialer::GetConnectedState
- InstallOptions::dialog
- InstallOptions::initDialog
- InstallOptions::show
- LangDLL::LangDialog
- Math::Script
- StartMenu::Init
- StartMenu::Select
- StartMenu::Show
- System::Alloc
- System::Call
- System::Copy
- System::Free
- System::Get
- System::Int64Op
- System::Store
- System::StrAlloc
- TypeLib::GetLibVersion
- TypeLib::Register
- TypeLib::UnRegister
- UserInfo::GetAccountType
- UserInfo::GetName
- UserInfo::GetOriginalAccountType
- VPatch::GetFileCRC32
- VPatch::GetFileMD5
- VPatch::vpatchfile
- advsplash::show
- nsDialogs::Create
- nsDialogs::CreateControl
- nsDialogs::CreateItem
- nsDialogs::CreateTimer
- nsDialogs::GetUserData
- nsDialogs::KillTimer
- nsDialogs::OnBack
- nsDialogs::OnChange
- nsDialogs::OnClick
- nsDialogs::OnNotify
- nsDialogs::SelectFileDialog
- nsDialogs::SelectFolderDialog
- nsDialogs::SetRTL
- nsDialogs::SetUserData
- nsDialogs::Show
- nsExec::Exec
- nsExec::ExecToLog
- nsExec::ExecToStack
- nsisdl::download
- nsisdl::download_quiet
- splash::show
!define: "MUI_INSERT_NSISCONF"=""
Changing directory to: "C:\Users\Ted\Desktop"
Processing script file: "C:\Users\Ted\Desktop\windows_installer.nsi" (ACP) !include: "C:\Program Files (x86)\NSIS\Include\MUI2.nsh" (ACP) !include: "C:\Program Files (x86)\NSIS\Contrib\Modern UI 2\MUI2.nsh" (ACP) NSIS Modern User Interface version 2.1 - Copyright 2002-2018 Joost Verburg (C:\Program Files (x86)\NSIS\Contrib\Modern UI 2\MUI2.nsh:14) !include: closed: "C:\Program Files (x86)\NSIS\Contrib\Modern UI 2\MUI2.nsh" !include: closed: "C:\Program Files (x86)\NSIS\Include\MUI2.nsh" Name: "QuickHash GUI" OutFile: "QuickHash_GUI_v3.0.2_Windows.exe" !define: "APPNAME"="QuickHash" InstallDir: "$LOCALAPPDATA\QuickHash" InstallRegKey: "HKCU\Software\QuickHash" !define: "MUI_ABORTWARNING"="" !define: "MUI_FINISHPAGE_NOAUTOCLOSE"="" !define: "MUI_UNFINISHPAGE_NOAUTOCLOSE"="" !define: "MUI_ICON"="..\quickhash.ico" !define: "MUI_UNICON"="..\quickhash.ico" !insertmacro: MUI_PAGE_LICENSE Error while loading icon from "..\quickhash.ico": can't open file Error in macro MUI_INTERFACE on macroline 87 Error in macro MUI_PAGE_INIT on macroline 7 Error in macro MUI_PAGE_LICENSE on macroline 5 Error in script "C:\Users\Ted\Desktop\windows_installer.nsi" on line 93 -- aborting creation process
Are you able to resolve and submit new version ASAP? Thanks
Changing directory to: "C:\Users\Ted\Desktop" ... Error while loading icon from "..\quickhash.ico": can't open file
This is odd. You shoulc compile the script from within the git checked out repo folder because the installer script references various files to include with relative paths.
For example: https://github.com/tedsmith/quickhash/pull/50/files#diff-dcdfb5ab4f329fce968f89b741a09447R39 https://github.com/tedsmith/quickhash/pull/50/files#diff-dcdfb5ab4f329fce968f89b741a09447R75
I didn't know your exact build workflow, so I assumed you work from within the git repo clone.
We can certainly adjust it to your process. Especially since the scripts assumes these two files in the same folder as the installation script for the time being:
https://github.com/tedsmith/quickhash/pull/50/files#diff-dcdfb5ab4f329fce968f89b741a09447R79
Thanks for the help. I'm really not very proficient with git. I use it only as a means to track versions, so I usually create a branch, work on it, then merge it to master. But I do all the compiling and stuff on my local computer. I know it's an old way of doing it but I've never had the time to learn how to do it within git. So in this case I pulled down your script and just tried to compile it using the NSIS tool locally.
That should work, though. I did the compiling with the standard NSIS GUI script compilation tool on my local Windows 7 machine within the checked out git branch I provided as PR.
so i just tried again using windows 7. i copied your script to a text file (named test.nsi) and tried to compile using the GUI and also by right clicking and choosing the compile option. In both cases I get
Error while loading icon from "..\quickhash.ico": can't open file Error in macro MUI_INTERFACE on macroline 87 Error in macro MUI_PAGE_INIT on macroline 7 Error in macro MUI_PAGE_LICENSE on macroline 5 Error in script "C:\Users\Ted\pathtomyproject\QuickHash\v3.0.3-Dev\test.nsi" on line 47
Line 47 refers to the inclusion of the license file, which is there, present and correct. As is the ico file. So I have no idea why it is not working. Sorry. :-(
@tedsmith, do not copy the script somewhere else. Git checkout my branch. It is cruicial to have a few files in a certain place.
I created a step by step guide for you:
- cmd.exe
- cd %userprofile%\Desktop
- git clone https://github.com/tedsmith/quickhash.git
- cd quickhash
- git fetch origin pull/50/head:windows-installer-appdata-local
- git checkout windows-installer-appdata-local
- cd installer
- explorer .
- Copy the current version of "QuickHash-Windows-x64.exe" into that folder
- Copy the current version of "QuickHash-Windows-x86.exe" into that folder
- Compile the windows_installer.nsi script by right clicking -> "Compile NSIS script"
TODO Implement Add/Remove Programs functionality
Yesterday I gave NSIS a try. Implementing the Add/Remove Programs functionality based on that example isn't really difficult. One thing though: why install 32 and 64 bit version together? Shouldn't there be an option during the installation or a separate installer for each?
Yesterday I gave NSIS a try. Implementing the Add/Remove Programs functionality based on that example isn't really difficult.
@darealshinji Yes, it should not. I've seen sample/tutorial code for that, too. Since I didn't know whether @tedsmith was interested at all, I went ahead and kept it simple.
One thing though: why install 32 and 64 bit version together? Shouldn't there be an option during the installation or a separate installer for each?
Same reason here. But yes, an option could make sense, though in the end there are only two executables. There isn't much hardm including both, always.
Hi
I'm really sorry I did not return to you on this great piece of work. I got distracted and then forgot entirely.
I am currently developing v3.3.0 for which a branch exists currently. Will this implementation still work and be relevant for Windows 10 etc? I have kept the names of the SQLite DLL's the same. But suffice to say I'd like to introduce this to v3.3.0, if possible, but I wonder if any modernisation steps are needed given 3 years have passed nearly! (again, so sorry for that).
Also, I do agree that it would be preferable (though not essential) for the 64-bit to exist and 32-bit to exist depending on the requirement of the user. Some users have 'mentioned' "Why do you include two DLL's?" as some very particular users consider it an added risk to have an extra file they don't need. The QH exe, at compile time, looks up the 32-bit DLL of SQLite if it is x86 exe, and 64-bit if it is x64.
I am currently developing v3.3.0 for which a branch exists currently. Will this implementation still work and be relevant for Windows 10 etc? I have kept the names of the SQLite DLL's the same. But suffice to say I'd like to introduce this to v3.3.0, if possible, but I wonder if any modernisation steps are needed given 3 years have passed nearly! (again, so sorry for that).
To be honest, I have no idea, since I usually don't work with installers. But my gut feeling would be that it should be either not problem or just some minor adjustments.