PB 6.10 b1 include a Manifest

Windows specific forum
User avatar
ChrisR
Addict
Addict
Posts: 1466
Joined: Sun Jan 08, 2017 10:27 pm
Location: France

PB 6.10 b1 include a Manifest

Post by ChrisR »

I'm having trouble adding, changing the Manifest with compiler > resources
Manifest.rc

Code: Select all

1 24 "Include/Manifest.txt"
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
Last edited by ChrisR on Fri Dec 29, 2023 5:08 pm, edited 2 times in total.
fryquez
Enthusiast
Enthusiast
Posts: 391
Joined: Mon Dec 21, 2015 8:12 pm

Re: PB 6.10 b1 include a Manifest

Post 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"
User avatar
ChrisR
Addict
Addict
Posts: 1466
Joined: Sun Jan 08, 2017 10:27 pm
Location: France

Re: PB 6.10 b1 include a Manifest

Post by ChrisR »

Ok, thanks, I'll do it like this then :)
User avatar
ChrisR
Addict
Addict
Posts: 1466
Joined: Sun Jan 08, 2017 10:27 pm
Location: France

Re: (Solved) PB 6.10 b1 include a Manifest

Post by ChrisR »

I tried with a compiled Manifest.res

Code: Select all

porc.exe /R E:\Folder\Manifest.rc
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.
fryquez
Enthusiast
Enthusiast
Posts: 391
Joined: Mon Dec 21, 2015 8:12 pm

Re: PB 6.10 b1 include a Manifest

Post by fryquez »

Sorry, my mistake. I had the last 5 check boxes in "compiler options" disable while testing with .res file.
User avatar
ChrisR
Addict
Addict
Posts: 1466
Joined: Sun Jan 08, 2017 10:27 pm
Location: France

Re: PB 6.10 b1 include a Manifest

Post 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.
fryquez
Enthusiast
Enthusiast
Posts: 391
Joined: Mon Dec 21, 2015 8:12 pm

Re: (Solved) PB 6.10 b1 include a Manifest

Post 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
User avatar
ChrisR
Addict
Addict
Posts: 1466
Joined: Sun Jan 08, 2017 10:27 pm
Location: France

Re: PB 6.10 b1 include a Manifest

Post 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 :)
camphandful
New User
New User
Posts: 1
Joined: Tue Jan 09, 2024 7:21 pm

Re: PB 6.10 b1 include a Manifest

Post 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!
Post Reply