Jump to content
Sign in to follow this  
willichan

Expanding Pragma?

Recommended Posts

willichan

Will the #pragma directives be expanded to allow for custom fields, to replace #AutoIt3Wrapper_Res_Field?

The #pragma directives seem to be the only way to set the copyright and program version fields, I am looking to update my scripts to use #pragma instead of #AutoIt3Wrapper directives.  Unfortunately, as soon as I add a #pragma directive, all of the custom fields stop working.

From reading in other posts, I understand that this is just how it is right now, but I was wondering if there were plans to expand #pragma going forward.

Share this post


Link to post
Share on other sites
Jos

The #pragma directives seem to be the only way to set the copyright and program version fields, I am looking to update my scripts to use #pragma instead of #AutoIt3Wrapper directives.  .

Why would the AutoIt3Wrapper directives not set Copyright and program version?

 Unfortunately, as soon as I add a #pragma directive, all of the custom fields stop working.

Could you give me an example of the second comment so I can see why something stops working when it could still be supported?

I must admit I am not using #pragma at all, other than "#pragma compile(AutoItExecuteAllowed, true)" as it doesn't support all options yet, but I have tried to build support in AutoIt3Wrapper to be able to mix the 2 options and skip the AutoIt3Wrapper directives that already have a #pragma version defined in the script.

Jos

Edited by Jos

Visit the SciTE4AutoIt3 Download page for the latest versions  - Beta files                                How to post scriptsource        Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites
willichan

Why would the AutoIt3Wrapper directives not set Copyright and program version?

 

My fault.  While typing the reproducer script, I realized that I was using #AutoIt3Wrapper_Res_Field_LegalCopyright instead of #AutoIt3Wrapper_Res_Copyright.

Time to clean my glasses and use copy/paste a little more carefully.

 

Could you give me an example of the second comment so I can see why something stops working when it could still be supported?

 

I am finding now, that none of my #AutoIt3Wrapper_Res_Field directives are working at all, even with the #pragma statements removed.

For example, using the following script:

#Region
#AutoIt3Wrapper_Version=P
#AutoIt3Wrapper_icon=Reproducer.ico
#AutoIt3Wrapper_outfile=Reproducer.exe
#AutoIt3Wrapper_Compression=4
#AutoIt3Wrapper_Res_Description=Reproducer Script
#AutoIt3Wrapper_Res_Fileversion=2014.8.22.13
#AutoIt3Wrapper_Res_Fileversion_AutoIncrement=y
#AutoIt3Wrapper_Res_Language=1033
#AutoIt3Wrapper_Res_LegalCopyright=My Copyright
://////=__=
://////=__=
://////=__=://.=.com
#AutoIt3Wrapper_AU3Check_Stop_OnWarning=y
#EndRegion

MsgBox(0, "Reproducer", "Hello")

I get the following on the details tab of the resulting EXE properties:

File description    Reproducer Script
Type                Application
File version        2014.8.22.13
Product name
Product version     3.3.12.0
Copyright           My Copyright
Size                841 KB
Date modified       8/22/2014 10:24 AM
Language            English (United States)

None of the custom fields appear.

---EDIT---

Wow!  Even the forum host doesn't like my field statements.

Those should have been

#AutoIt3Wrapper_Res_Field=Company|My Company

#AutoIt3Wrapper_Res_Field=Author|My Name

#AutoIt3Wrapper_Res_Field=URL|http://www.myurl.com

 

Edited by willichan

Share this post


Link to post
Share on other sites
Jos

When I look at a testscript with your directives, I do see the information in the Version Info Block when looking with FF Explorer or reshacker:

1 VERSIONINFO
FILEVERSION 2014,8,22,16
PRODUCTVERSION 3,3,12,0
FILEOS 0x4
FILETYPE 0x0
{
BLOCK "StringFileInfo"
{
    BLOCK "040904b0"
    {
        VALUE "FileVersion", "2014.8.22.16"
        VALUE "Comments", "http://www.autoitscript.com/autoit3/"
        VALUE "FileDescription", "Reproducer Script"
        VALUE "ProductVersion", "3.3.12.0"
        VALUE "LegalCopyright", "My Copyright"
        VALUE "CompanyName", "My Company"
        VALUE "Author", "My Name"
        VALUE "URL", "http://www.myurl.com"
    }
}

BLOCK "VarFileInfo"
{
    VALUE "Translation", 0x0409 0x04B0
}
}

When you change :

#AutoIt3Wrapper_Res_Field=Company|My Company

to

#AutoIt3Wrapper_Res_Field=CompanyName|My Company

The name will show up when hovering over the file but not in the Properties window.

Jos

.

Edited by Jos

Visit the SciTE4AutoIt3 Download page for the latest versions  - Beta files                                How to post scriptsource        Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites
willichan

When I look at a testscript with your directives, I do see the information in the Version Info Block when looking with FF Explorer or reshacker

 

When I copied the EXE file to an XP box or to a 32-bit Win7 box, they do seem to show up.  They only seem to be "missing" when I look at them from 64-bit Win7 boxes.  I guess I will have to start investigating what was in some of those latest Windows patches.

Thank you for looking into it.  Sorry for the false alarm.

Share this post


Link to post
Share on other sites
Jos

I actually see the same thing and think it is there already for as long as I remember on win7.

Jos :)


Visit the SciTE4AutoIt3 Download page for the latest versions  - Beta files                                How to post scriptsource        Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×