Page 1 of 1
PB 6.10 b1 include a Manifest
Posted: Sat Dec 23, 2023 12:07 am
by ChrisR
I'm having trouble adding, changing the Manifest with compiler > resources
Manifest.rc
Linker error
CVTRES : fatal error CVT1100: duplicate resource. type:MANIFEST, name:1, language:0x0409
LINK : fatal error LNK1123: failure during conversion to COFF: file invalid or corrupt
Re: PB 6.10 b1 include a Manifest
Posted: Thu Dec 28, 2023 4:19 pm
by fryquez
Some of the "compiler options" like "Modern Theme", "DPI", "Admin" already create a Manifest.xml.
The new VC linker does not accept more than one.
To overwrite PB's mainfest compile your *.rc to a *.res file and
import it with "Import"
Re: PB 6.10 b1 include a Manifest
Posted: Thu Dec 28, 2023 6:24 pm
by ChrisR
Ok, thanks, I'll do it like this then

Re: (Solved) PB 6.10 b1 include a Manifest
Posted: Fri Dec 29, 2023 5:00 pm
by ChrisR
I tried with a compiled Manifest.res
And Import "Include\Manifest.res" : EndImport
Unfortunately it doesn't work, I get the same message:
Linker error
CVTRES : fatal error CVT1100: duplicate resource. type:MANIFEST, name:1, language:0x0409
LINK : fatal error LNK1123: failure during conversion to COFF: file invalid or corrupt
What I need is to add <dpiAware>true</dpiAware> in manifest without going through the DPIaware compiler option. I want to manage the scaling by myself without PB handling it.
If it's not a bug due to the new linker, maybe the topic should be moved to Coding Questions but I can't do it.
Re: PB 6.10 b1 include a Manifest
Posted: Fri Dec 29, 2023 6:48 pm
by fryquez
Sorry, my mistake. I had the last 5 check boxes in "compiler options" disable while testing with .res file.
Re: PB 6.10 b1 include a Manifest
Posted: Fri Dec 29, 2023 8:58 pm
by ChrisR
You're right, without one of the last 5 compiler options, there's no manifest, for now!
And thus, import "Manifest.res" or or add Manifest.rc in the Resources tab compiler options works.
Re: (Solved) PB 6.10 b1 include a Manifest
Posted: Mon Jan 08, 2024 10:48 am
by fryquez
ChrisR wrote: Fri Dec 29, 2023 5:00 pm
What I need is to add <dpiAware>true</dpiAware> in manifest without going through the DPIaware compiler option. I want to manage the scaling by myself without PB handling it.
it seems to be possible to disable PB's scaling on runtime, with it's global variables.
Code: Select all
Import ""
PB_Desktop_DPIX.l
PB_Desktop_DPIY.l
PB_Desktop_ResolutionX.d
PB_Desktop_ResolutionY.d
EndImport
CompilerIf #PB_Compiler_Backend = #PB_Backend_Asm
!mov dword [PB_Compiler_DPIAware], 0
CompilerElse
Import ""
PB_Compiler_DPIAware.l
EndImport
PB_Compiler_DPIAware = 0
CompilerEndIf
PB_Desktop_DPIX = 96
PB_Desktop_DPIY = 96
PB_Desktop_ResolutionX = 1.0
PB_Desktop_ResolutionY = 1.0
Re: PB 6.10 b1 include a Manifest
Posted: Mon Jan 08, 2024 2:34 pm
by ChrisR
Great, that's what I need and it seems to work just fine.
This should be a better option than disabling the last 5 "Compiler options" checkboxes to avoid having a Manifest and then being able to add or import a manifest with the dpiAware flag.
Thanks

Re: PB 6.10 b1 include a Manifest
Posted: Tue Jan 09, 2024 7:23 pm
by camphandful
Fantastic! This is exactly what I was looking for, and it appears to be working perfectly fine. Using this approach seems to be a much better option than disabling the last 5 "Compiler options" checkboxes just to avoid having a Manifest. Now, I can easily add or import a manifest with the dpiAware flag without any hassles. Thanks for pointing me in the right direction!