pencil
pencil copied to clipboard
Create Windows installer
Original outdated description
Now that I'm going to get busier again, I'd like to get some of the working stuff out that I've been working on lately, starting with this. As I already mentioned on IRC, I dug up some of my old NSIS stuff and adapted it to create a Windows installer for Pencil2D. Right now, there are some things that could possibly be added (checking for an existing installation, for instance), but the actual (un)installation routine seems to be working splendidly at this point. The only thing that definitely needs improvement before this can reasonably be released is the graphics; I'm by no means a professional designer and I'd say it shows :) While I'm at it, time for some screenshots:
- Language selection:
- Installer welcome page:
- Installer license confirmation:
- Installer mode selection:
- Installer destination selection:
- Installer start menu folder selection:
- Installer progress page:
- Installer finish page:
- Look, we even got ourselves an uninstall entry, complete with meta information:
- Uninstaller welcome page:
- Uninstaller confirmation page:
- Uninstaller progress page:
- Uninstaller finish page:
If anyone wants to try it themselves, look here: https://drive.google.com/open?id=1vR04yL4LUrbvPwRFPi1ajS7Una0CN01s. Please note that the contents of these "demo" installers are slightly different from the current releases, most notably I was too lazy to download the FFmpeg binaries.
To create the installer, installer.nsi needs to be processed by makensis like this:
-
Windows:
makensis /DBITS=32|64 /DVERSION=1.2.3 /DINSTALLFILES=path\to\directory\to\be\installed\relative\to\installer.nsi path\to\util\installer\installer.nsi
-
*nix (for cross-compilation etc.)
makensis -DBITS=32|64 -DVERSION=1.2.3 -DINSTALLFILES=path/to/directory/to/be/installed/relative/to/installer.nsi path/to/util/installer/installer.nsi
Due to the NSIS compiler treating all paths as relative to the main script, the resulting installer can then be found in the same directory as installer.nsi.
As I've previously said, I consider the installer itself pretty much complete, but the things I'd like to get ready before merging are:
- [x] Build it automatically with GitHub Actions
- [x] Make the icon a little cleaner. It currently looks kind of not-so-pretty at small sizes, this is probably solvable by embedding more pre-rendered sizes in the .ico file, I'll just have to recall how to do that again.
- [x] Add options for additional shortcuts (desktop etc.)
- [x] Revisit UI strings
- [x] Mechanisms to translate UI strings via Transifex
- [x] Install runtime libraries
- [x] file icons?
- [x] detect previous installation and handle upgrades
- [x] Address TODOs in code
- ~~Implement update check (maybe)~~
Let me know what you think, be it about the whole thing overall or about some of the individual aspects!
closes #1762
Great !
@J5lx Well that's cool! thank you for the hard work :smile: , but I'd like to ask, what are exactly the advantages of having and installer as opposed to have a "portable" version?
Maybe it’s just me, but over time I got the impression that a) there are a lot more non-technical people that it often seems and b) many of these non-technical people have no idea how to deal with any sort of download that is not itself a document or an executable – including ZIP files – because they usually don’t come in contact with them. The fact that Windows calls ZIP files compressed folders doesn’t make it any better since it leads people into thinking there’s absolutely no need to extract them entirely, even when Windows tells them otherwise. Actually it seems that an awful lot of the comments on our download page are somehow related to ZIP file extraction (people extracting only some of the files or not knowing how to deal with the archive altogether, etc). Speaking of it, there are also some comments about missing MSVC runtime libraries, maybe I can find a way to detect whether the needed MSVC runtime is already installed and otherwise ask the users whether they want to install it too.
tl;dr; I’m pretty confident that an installer is a good idea, but please let me know if you have any concerns. Of course this PR doesn’t mean we should stop providing the portable ZIP files altogether, it’s more about offering an option that is more straightforward for less technical users.
@J5lx You're right, in that regard an installer would be great for our Windows non-technical users (mostly kids), what could be done similarly for Mac though? and is it worth to do try that for Linux? (I like the app image, but the only installer-like thingy I know is those RPM packages and I don't know if it's FOSS-y enough lol)
In my case I love using the portable, because I hate installing things on windows since well ...it's windows and you get all the bloated goodies for installing on it, most of my FOSS apps are portable unless I have to specifically install it for some sort of obscure reason, but even then all of those packages sure give the option for most users to pick between an installer and a portable version, so I agree it would be a good thing for P2D.
As a related question, would it be possible to make this installer have a VCredist check? that is actually the number 2 problem with anyone installing on Windows, and the solution is far more technical for the average consumer than extracting a compressed folder.
@J5lx good news to have an installer!
@Jose-Moreno Just as @J5lx said, I've been answering the "missing files" questions many times. A bit surprised that some of the people (not many but some) have no idea about zip & unzip. Also, I believe that the installer is able to handle vc redistributable installation, just need to find out how to do it.
But yeah, personally I prefer a portable version if I have choices. We could probably provide both.
Another good idea is giving Windows Store a go.
For example, Krita
and Paint.net
are available on Windows Store now
https://blog.getpaint.net/2017/09/29/paint-net-is-now-available-on-the-windows-store/
https://krita.org/en/item/krita-available-from-the-windows-store/
In the blog posts, they both mentioned one-click-installation and auto-update, which is good for those non-technical people.
Very nice! As mentioned, a significant number of people were having difficulties with the zipped executable, so I definitely second the usefulness of this, even if I would opt for the portable version personally. Another step to increasing usability would be static building for Windows, which if I understand what it is correctly, would allow for just the exe file to be distributed. Windows Store is also good.
@Jose-Moreno Mac/Linux should not require a similar thing. Zip files are extracted when opened, rather than "peeked-into" as in Windows. Also for both Mac's .app and Linux's AppImage formats, all of the libraries and resources are self-enclosed, so there's no issues with people not copying some important part of it. RPM packages are fairly FOSS-y imho (although some package managers do one better by compiling from the source).
I don’t know about Mac, but for Linux our current AppImages should suffice, really. Distribution packages are nice, of course, but they are sometimes tricky to get right and are better taken care of by people who actually know their stuff, aka package maintainers of the respective distribution. That’s why mapreri as a Debian person is doing the deb package and I as an Arch user am doing the Arch one.
Regarding static binaries, I can see why they would be nice but I personally don’t really like fat binaries. I’m also not sure what to do with Qt’s plugin architecture (esp. system plugin) and the FFmpeg binary in that case.
As for runtime distribution, it is 100% possible (there are complete solutions available) and it’s totally on my todo list at this point. Getting it into the Microsoft store would probably be a good idea, too, but naturally we’ll have to see how exactly that works and all and whether they take fees or anything. IIRC there was also some talk about getting Pencil into the Mac store some time ago on IRC, we should probably check that out as well.
Also, I actually prefer installation over portable, mainly because it’s so goddamn quick and easy to get just about anything installed on Arch with just the press of one button (kinda), but also because it feels cleaner than having loose app folders floating around.
At the moment, publishing an app on Windows Store costs 19 USD, it's a one-time fee and no renewal charge. But for Mac Store, it costs 99 USD per year, which might be considerable.
[The green line and the cross red line over Pencil2D's icon tell a little bit of the story here: they are made by Pencil2D, no mistake! 👍 I like it ]
The Installer program is Much more intuitive. Great
The green lines are not intuitive. My thoughts are that you can make an OK mark (V) within the same style as this last red cross uninstaller icon (I like it more than the previous one)
@scribblemaniac I really like those! Personally I find both the check mark ✓ and your arrow-pointing-onto-tray (or whatever one might call it) equally comprehensible, so I’m not sure if the the check mark is better as Kaíko suggested. Also @Kaikogf, I’m afraid I have to admit I used GIMP for the original icons for its guides and scaling features. Shame on me! :)
@J5lx Now I can see what the green mark meant. So knowing that it started to make sense using it, but I would guess that some people would not grasp it at first sight.
I have now replaced the images with those by @scribblemaniac. Looks good IMO:
Looks good really!
I have tested the DEMO Installer and it is working just fine! 👍 I have though two suggestions here: after the succeeded installation of Pencil2D it was not created a shortcut on the desktop (win8.1x64bits). I know It is fairly easy to create one, but who knows ... just wanted to say something!
After the uninstallation of Pencil2D there was left its main folder with subfolders.. A very few programs that I know are capable of deleting its own folder after its uninstallation and I found it to be clean
;)
best regards
I am waiting to see Portuguese (Portugal) to be implemented here... just to check, once again, the translation
That the installer does not create a desktop shortcut is 100% correct intended behaviour. If you ask me, desktop symbols are an annoying pest and only an excuse for not having an efficient launcher, and they should be purged from this world :) But of course not everyone shares that opinion, so I’ll see what I can do about that. As for the leftover folder, that should not happen if you went through the uninstallation routine properly (i.e. quit Pencil2D before uninstallation etc.). If it does, I’d consider it a bug, but it never happened to myself, so I’ll need some more details from you:
- In which mode did you run the installer (current user / all users)?
- Where did you install the program (C:\…)
- Which directories and files exactly are still present after uninstallation? E.g.
C:\path\to\instdir\ C:\path\to\instdir\Pencil2D.exe C:\path\to\instdir\audio\ C:\path\to\instdir\audio\qtaudio_wasapi.dll C:\path\to\instdir\audio\qtaudio_windows.dll ⋮
Regarding the missing Portuguese (Portugal), that’s because Pencil2D itself currently doesn’t include it, but I noticed it’s already fully translated on Transifex, so we can easily add it to the installer as well (just add !insertmacro MUI_LANGUAGE "Portuguese"
in installer.nsi).
"The annoying pest" has no more room for another shortcut jejeje... what a desktop
I run both methods, All Users and Current User Installed the program to its default path (kept the one of the launcher installation for both methods)
I tried the demo again for checking... this is what was left after uninstalling Pencil2D [All Users] Pencil2D path: C:\Programs\Pencil2D
When installing it for Current User, Pencil2D will be hidden on the AppData folders, so this made me wonder if a beginner (non-technical) tries it he/she will have a hard time getting inside Pencil2D installation folder, mainly if he wants to find it for adding a shortcut else where (Windows here) since Pencil2D's launcher doesn't create one Pencil2D path: C:\Users\Carlos\AppData\Local\Pencil2D The left folders are the same as the previous image, nothing inside of them
While installing Pencil2D I did not create a shortcut on the Main Menu (checked mark box)
One thing I would like to point out is that every time after installing Pencil2D and opening it for the first time, my HUION pen doesn't work, meaning its tip moves all over the UI but nothing reacts to it, no selection no drawing, no moving, etc. After closing and restarting it again it works fine
To be honest I am afraid you will say that all, from top to bottom, is normal
Okay, thanks for the info, I’ll see what I can do about it.
Also, valid point about Pencil not being easily accessible in the AppData folder when no shortcuts were created. I’ll definitely add options for additional shortcuts.
FTR, I have now added pre-scaled versions in 16x16, 32x32 and 48x48 (as per recommendation from Microsoft) to the icon file, so the icon now looks much, much better at smaller sizes.
@Kaikogf I finally managed to obtain a legal copy of Win8.1 (which was a little tricky since MS apparently doesn't want people to create new installations of it) to have a look at your issue, but I was not able to reproduce it. I tried installing and uninstalling both per-user and system-wide, both with and without shortcuts, and in all of the cases all files and folders were completely removed without any leftovers. I also looked for hints on the internet but I didn't find any, so I'll have to ask you a few more questions and hope that this gets us any closer to the solution.
- What locale (i.e. display language, number format etc.) are you using? (Portuguese (Portugal) maybe?) Are there any characters in your file system paths that are not part of the English alphabet, e.g. letters with diacritics or maybe even characters from scripts other than the Latin script?
- You said that very few programs you know of are capable of cleanly deleting their own folder. Could you list some of the programs that you found to be capable of this? Is it possible that there were no problems originally and that the problems only started occurring at a certain point in time?
- Do you have any other programs installed that you suspect might interfere with the uninstallation, particularly the kind that integrates deeply with the system (such as anti-virus solutions)?
@J5lx
I will be back to you later with details. Sorry for the delay. Time to rest now Thank you
One of the programs that I recall right now to be capable of deleting its own directory/folder is Iobit Unistaller
@J5lx I have tested your installation demo and here my answers:
-
I am using Portuguese-Portugal language system. Win8.1 Pro 64bits. The path has not special characters All users: C:\Program Files\Pencil2D Current user: Path C:\Users\Carlos\AppData\Local\Pencil2D
-
Iobit-Unistaller is the one program that deletes its own folder directory after an unistallation. I don't remember right now of any other software that behaves like that, but I could be mistaken but I have a far idea of having another one deleting its folder
-
I have an anti-virus Kaskersky. Even that the installation of Pencil2D triggers no warning advice from Kaspersky
About number 2, I think it is a kind of standard behavior among most of software to left some folders behind. Antivirus left the Quarantine folder behind, others brush folders (I believe Krita, ArtRage), etc. And with pencil2D's folders are not deleted as well. All folder were left empty.
Hope this help
@J5lx I have tested the uninstaller via wine and i'm experiencing the same... there's a bunch of folders left.
This is being removed currently: https://pastebin.com/6WG2bXY2
After some more experimentation, I think I got the issue with the leftover folders on uninstallation fixed... a rather stupid oversight that didn't affect all builds. Could you try installing and uninstalling using the latest installer test build (32bit, 64bit) and let me know how it goes? Meanwhile, I'll see about the other todo items...
After some more experimentation, I think I got the issue with the leftover folders on uninstallation fixed... a rather stupid oversight that didn't affect all builds. Could you try installing and uninstalling using the latest installer test build (32bit, 64bit) and let me know how it goes? Meanwhile, I'll see about the other todo items...
Hi @J5lx I have tested and have some issues. I have a little free time so I tested and installed it (one user/multiple users, with/without shortcut):
The shortcut is working fine. I have win8.1 and I know where new icons are left so I have to lookup for its shortcut since new items are not set on my simulated desktop environment of win 7
Pencil2D wasn't able to work with my pen, it stopped right after pencil2D opens. Using the mouse worked fine (HUION GT 185) When uninstalling, it deleted everything from Programs. On the Local Appdata, nothing was deleted and I could still opens pencil2D from there
Win 8.1 x 64bits
NOTE: Using the uninstaller provided on Pencil2D folder on the local data, it deleted what remained there but its main folder (Pencil2D) and a Log folder
Thanks for the quick response! Glad to see that uninstallation from Program Files is working now. As for the leftovers of the AppData uninstallation, it's pretty much expected: The installer doesn't install any log files, so the uninstaller doesn't delete them; instead it assumes that those unknown files were created by the user and leaves them there. That said, this is the first time I'm hearing about Pencil2D creating any logs, and if it interferes with the uninstallation we should figure out where they come from. Could you post the exact name and location of that log folder (relative to the installation directory) as well as its contents, if any?
As for the other stuff, adding extra icons is still on my todo list so right now it's still just the Start Menu entries. Regarding the pen issue, I'm pretty sure it is unrelated to the installer. It might be a good idea to try the "normal" (aka ZIP archive / portable) version of that build (32bit, 64bit) and check whether the issue occurs there, too. If that's the case, it's definitely unrelated to the installer and you should consider reporting it as a bug.
Hi
News here
I am a bit confused right now.
I realise that after the installation, the executable does not create any folder on the appdata path ! Maybe there was already a pencil2d's folder from a previous installation that I forgot to delete (?) Well,this will certainly clarify the log-folder that I found there...
Regarding to the pen issue, stopped working, I finally got it. It will happen right after the complete installation while having the "launch pencil" box checked. Pencil2D will open but the pen cursor will not work until I close it and open it again. It will now work fine from that moment on. If the "launch pencil" box is not checked and pencil2d is opened later, the pen will work OK The "normal" portable version doesn't bring this issue.