Jump to content

[Solved] #pragma compile issue


Recommended Posts

Good evening everyone :)
I was trying to compile my executable, adding #pragma directives instead of #AutoIt3Wrapper* directives, and, I don't know why the #pragma compile doesn't add the Author field to the executable.

These are the directives:

#pragma compile(Author, 'Surname Name')

; or

#pragma compile(Author, Surname Name)


and this is the output, in both cases:
 

- #pragma directive Author found but don't understand it so will ignore: #pragma compile(Author, 'Surname Name')
- #pragma directive Author found but don't understand it so will ignore: #pragma compile(Author, Surname Name)

What am I missing?
Thanks :)

Francesco

Edited by FrancescoDiMuro

Click here to see my signature:

Spoiler

ALWAYS GOOD TO READ:

 

Link to comment
Share on other sites

  • Developers
2 minutes ago, FrancescoDiMuro said:

What am I missing?

Where did you find that :

#pragma compile(Author,"")

is an option that is available? ... it isn't, just check the helpfile!

Jos

 

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

Good evening @Jos, and thank you for your answer :)

I swear I read a post in the AutoIt forum, where there were #pragma compile(Author, ***), but I can't find the post at the moment.
So, the only way to add an Author to the compiled script is this(?):

- ://////=__=
; Without "", is it right?
; I don't know what is happenening with Code section!

#AutoIt3Wrapper_Res_Field=Author|AuthorName

Thanks for the help :)


Francesco

Edited by FrancescoDiMuro
The Code section was broken.

Click here to see my signature:

Spoiler

ALWAYS GOOD TO READ:

 

Link to comment
Share on other sites

  • Developers

that way it works as the #autoIt3wrapper directive is able to add none standard version fields. :)

Jos

Edited by Jos

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

Good morning @Jos:)
This is the line of code that is not doing what is supposed to do:

 

://////=__=

I can't see the Author with Resource Hacker, nor with Right Click on the compiled script, and Properties.
Thanks :)

Francesco

Edited by FrancescoDiMuro

Click here to see my signature:

Spoiler

ALWAYS GOOD TO READ:

 

Link to comment
Share on other sites

  • Developers

Well that works for me.

Show me all your SciTE output pane information when doing the compile please.

Jos

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

Here you are @Jos:)
 

>"C:\Program Files (x86)\AutoIt3\SciTE\..\AutoIt3.exe" "C:\Program Files (x86)\AutoIt3\SciTE\AutoIt3Wrapper\AutoIt3Wrapper.au3" /NoStatus /prod /in "C:\Users\Portatile-60\Documents\Documenti Lavoro\AutoIt\Per_iFIX\DR_MoveExcelFiles\DR_MoveExcelFiles.au3"
+>09:41:17 Starting AutoIt3Wrapper v.16.612.1119.0 SciTE v.3.6.6.0   Keyboard:00000410  OS:WIN_10/  CPU:X64 OS:X64  Environment(Language:0410)  CodePage:0  utf8.auto.check:4
+>         SciTEDir => C:\Program Files (x86)\AutoIt3\SciTE   UserDir => C:\Users\Portatile-60\AppData\Local\AutoIt v3\SciTE\AutoIt3Wrapper   SCITE_USERHOME => C:\Users\Portatile-60\AppData\Local\AutoIt v3\SciTE 
> #pragma Compile(out, YourFileName) and/or #pragma Compile(x64, true/false) found: 
-    Ignoring all #AutoIt3Wrapper_OutFile* and #AutoIt3Wrapper_Compile_both #directives!
>Running AU3Check (3.3.14.2)  from:C:\Program Files (x86)\AutoIt3  input:C:\Users\Portatile-60\Documents\Documenti Lavoro\AutoIt\Per_iFIX\DR_MoveExcelFiles\DR_MoveExcelFiles.au3
+>09:41:17 AU3Check ended.rc:0
>Running:(3.3.14.2):C:\Program Files (x86)\AutoIt3\aut2exe\aut2exe.exe  /in "C:\Users\Portatile-60\Documents\Documenti Lavoro\AutoIt\Per_iFIX\DR_MoveExcelFiles\DR_MoveExcelFiles.au3" /nopack /icon "..\Logo_STB_SYS_Automation_S.r.l.ico" /comp 2
+>09:41:22 Aut2exe.exe ended.DR_MoveExcelFiles.exe. rc:0
>09:41:22 Performing the Program Resource Update steps:
> #pragma Compile() found that updates the VERSION Resources.
-    Ignoring all #AutoIt3Wrapper_* #directives that would normally update the VERSION section!
>09:41:23 Program Resource updating finished successfully.
+>09:41:23 Created program (pragma):DR_MoveExcelFiles.exe
+>09:41:23 AutoIt3Wrapper Finished.
>Exit code: 0    Time: 6.43

 

Click here to see my signature:

Spoiler

ALWAYS GOOD TO READ:

 

Link to comment
Share on other sites

  • Developers

... and you didn't notice that warning in there? ;)

That is why I asked for a reproducer as the single posted statement will work fine.

Jos

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

  • Developers

Correct, The issue (likely) is that you are using #PRAGMA statements to update the VERSION block of the PE-HEADER and then request AutoIt3Wrapper to do the same.
I have it coded in a way that the old VERSION block is overwritten so that would make you loose the #PRAGMA changes made....hence that warning.

Jos 

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

@Jos

27 minutes ago, Jos said:

The issue (likely) is that you are using #PRAGMA statements to update the VERSION block of the PE-HEADER and then request AutoIt3Wrapper to do the same.

This is not very clear for me.
Something like "overwrite" the work of the #pragma by AutoIt3Wrapper or... ?

Thanks :)

Click here to see my signature:

Spoiler

ALWAYS GOOD TO READ:

 

Link to comment
Share on other sites

  • Developers

AUT2EXE runs first and is using the #PRAGMA statements to update the program's PE-HEADER.
One section of the PE_HEADER is the VERSION block as you can see with Reshacker!
AutoIt3Wrapper will then use the #AutoIt3Wrapper_res_* statements to to the same task, but the changes from AUT2EXE would be lost in case it would continue the update of the VERSION block. Hence the warning and skipping that!

In Other Words: DO not mix #PRAGMA and  #AutoIt3Wrapper_res_* statements to update VERSION information but only use one!

Jos 

Edited by Jos

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
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
 Share

×
×
  • Create New...