MLV-App icon indicating copy to clipboard operation
MLV-App copied to clipboard

Show differrent document icons (.mlv files) under windows.

Open bouncyball-git opened this issue 5 years ago • 5 comments

Discussion started here

I have some progress.

bouncyball-git avatar Dec 09 '19 08:12 bouncyball-git

Win 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:

dowload mlvapp.exe

bouncyball-git avatar Dec 09 '19 08:12 bouncyball-git

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.

bouncyball-git avatar Dec 09 '19 08:12 bouncyball-git

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.

masc4ii avatar Dec 09 '19 12:12 masc4ii

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.

masc4ii avatar Dec 09 '19 17:12 masc4ii

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!

bouncyball-git avatar Dec 09 '19 19:12 bouncyball-git