MLV-App
MLV-App copied to clipboard
Show differrent document icons (.mlv files) under windows.
I uncomented following section in the project
and added second icon to resources
win32{
RC_ICONS = MLVAPP.ico MLV.ico
QMAKE_TARGET_COMPANY = magiclantern
QMAKE_TARGET_DESCRIPTION = "Processing and converting tool for MLV files"
QMAKE_TARGET_PRODUCT = MLVApp
VERSION = 1.10.0
RC_CODEPAGE = 1252
}
Compiled mlvapp static checked with resource hacker that second icon is in the exe file, then registered the mlv file type to mlvapp.exe as described above.
Strangely but luckily ;), without manual intervention into registry, mlv type icon changed to second (desired) one and application icon stays as it was :grin:
BTW we have to do some automatisation for "VERSION = " field in this section. Edit: and also find out how to register mlv type with QT into registry during mlvapp's 1st run.
Great! Will try out later! Hm, no idea if we can automize VERSION. We would also need it in MainWindow.cpp. Maybe it works via DEFINES += ..., this would also be available in entire project (all files in Qt project). For OSX package creator and Info.plist I think it isn't possible to automize in an easy way.
HAHA I found out how to refer to particular icon in exe resource. mlvapp.exe,0(1,2... etc)gonna continue to investigate.
Where do you enter this? I just get the default MLVApp icon until now. I used the .pro code above (also with MLV.ico).
For VERSION: I think I'll be able to implement something, where we just enter VERSION in .pro, and the other defines in .cpp will be automatically set.
Well I've tested on win7 and did nothing. It just worked out of the box.
Now I tried with win10 and this did not work. So i found the registry entry:
Computer\HKEY_CLASSES_ROOT\Applications\MLVApp.exe\DefaultIcon\Default
and set it to "C:\Users\Nic\Desktop\MLVApp.exe,1". 1 means second icon. This time it worked.
Thumbs up on VERSION!