Author Topic: How to include manifest  (Read 1227 times)

0 Members and 3 Guests are viewing this topic.

chrisc

  • Guest
How to include manifest
« on: March 11, 2018, 12:45:40 PM »
Hello

in PB we use the resource statement to include a manifest into our program as shown below
how to do it in O2 ?

Code: [Select]
#RESOURCE MANIFEST, 1, "win10theme.xml"

i have attach the win10theme.xml  manifest file for your checking, thanxx

chrisc

  • Guest
Re: How to include manifest
« Reply #1 on: March 12, 2018, 03:36:08 AM »
Any help please?

jcfuller

  • Guest
Re: How to include manifest
« Reply #2 on: March 12, 2018, 04:18:08 AM »
O2RadAsm

James

Charles Pegge

  • Guest
Re: How to include manifest
« Reply #3 on: March 12, 2018, 04:52:09 AM »
Hi Chris,

In the o2 tools folder there are 2 utilities goRC.exe for compiling .rc files, and James' LinkRes2Exe.exe for linking the res file into your binary.

As an example, this batch file is used for building oxide:
BuildInstallOxide.bat
Code: [Select]
goRC oxide.rc oxide.res
..\co2.exe -c oxide.o2bas
LinkRes2Exe.exe Oxide.res Oxide.exe
copy Oxide.exe ..\
del Oxide.exe
pause
« Last Edit: March 12, 2018, 05:05:40 AM by Charles Pegge »

chrisc

  • Guest
Re: How to include manifest
« Reply #4 on: March 12, 2018, 12:09:15 PM »
Thanxx Charles

How do i write the .rc file to include this win10theme.xml file?

would it be something like below? 


Code: [Select]
1 VERSIONINFO
FILEVERSION 1, 0, 0, 0
PRODUCTVERSION 1, 0, 0, 0
FILEOS 0x00000004     // WINDOWS32
FILETYPE 0x00000001   // APP
BEGIN
  BLOCK "StringFileInfo"
  BEGIN
    BLOCK "040904E4"
    BEGIN
      VALUE "CompanyName",      "Your company\0"
      VALUE "FileDescription",  "myApp\0"
      VALUE "FileVersion",      "1.0.0.0\0"
      VALUE "InternalName",     "myApp\0"
      VALUE "OriginalFilename", "myApp.exe\0"
      VALUE "LegalCopyright",   "Copyright(c) 2018 Your company\0"
      VALUE "ProductName",      "myApp\0"
      VALUE "ProductVersion",   "1.0.0.0\0"
    END
  END
  BLOCK "VarFileInfo"
  BEGIN
    VALUE "Translation", 0x409, 0x04E4
  END
END 

1 MANIFEST "win10theme.xml"

chrisc

  • Guest
Re: How to include manifest
« Reply #5 on: March 12, 2018, 12:12:08 PM »
i notice that this below line in the rc file

Code: [Select]
FILEOS 0x00000004     // WINDOWS32

it relates to windows 32 bits  ,  now how about  windows 64 bits app?
what shall i write to get windows 64 bits app ?


Charles Pegge

  • Guest
Re: How to include manifest
« Reply #6 on: March 12, 2018, 01:10:06 PM »
Chris,

I know nothing about manifests but I don't think they are affected by 32bit/64bit.

https://msdn.microsoft.com/en-us/library/windows/desktop/aa381058(v=vs.85).aspx

chrisc

  • Guest
Re: How to include manifest
« Reply #7 on: March 12, 2018, 02:40:15 PM »
@Charles

so  my version.rc file as shown in  my post #3 is okay then
i will use the following steps at command prompt to compile and link it to my prog myapp.exe

Code: [Select]
> goRC.exe version.rc  version.res
> LinkRes2Exe.exe version.res myapp.exe

Am i right with the above steps?