Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
bouncyball-git opened this issue Dec 9, 2019 · 5 comments
Open

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

bouncyball-git opened this issue Dec 9, 2019 · 5 comments

Comments

@bouncyball-git
Copy link
Collaborator

Discussion started here

I have some progress.

@bouncyball-git
Copy link
Collaborator Author

bouncyball-git commented Dec 9, 2019

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 😁

dowload mlvapp.exe

@bouncyball-git
Copy link
Collaborator Author

bouncyball-git commented Dec 9, 2019

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.

@masc4ii
Copy link
Collaborator

masc4ii commented Dec 9, 2019

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
Copy link
Collaborator

masc4ii commented Dec 9, 2019

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.

@bouncyball-git
Copy link
Collaborator Author

bouncyball-git commented Dec 9, 2019

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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants