Jump to content
Sign in to follow this  
FrancescoDiMuro

[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

Thoughts:

  • I will always thank you for the time you spent for me.
    I'm here to ask, and from your response, I'd like to learn.
    By my knowledge, I can help someone else, and "that someone" could help in turn another, and so on.

/*--------------------------------------------------------------------------------------------------------------------------------------------------------------------------*/

ALWAYS GOOD TO READ:

 

Share this post


Link to post
Share on other sites
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.
  :)

Share this post


Link to post
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

Thoughts:

  • I will always thank you for the time you spent for me.
    I'm here to ask, and from your response, I'd like to learn.
    By my knowledge, I can help someone else, and "that someone" could help in turn another, and so on.

/*--------------------------------------------------------------------------------------------------------------------------------------------------------------------------*/

ALWAYS GOOD TO READ:

 

Share this post


Link to post
Share on other sites

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.
  :)

Share this post


Link to post
Share on other sites

@Jos

I tried with #AutoIt3Wrapper_Res_Field=Author|AuthorName, but it isn't displayed with ResourceHacker nor in the Properties of the .exe.
Any suggestions?

Thanks :)

Francesco


Click here to see my signature:

Spoiler

Thoughts:

  • I will always thank you for the time you spent for me.
    I'm here to ask, and from your response, I'd like to learn.
    By my knowledge, I can help someone else, and "that someone" could help in turn another, and so on.

/*--------------------------------------------------------------------------------------------------------------------------------------------------------------------------*/

ALWAYS GOOD TO READ:

 

Share this post


Link to post
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

Thoughts:

  • I will always thank you for the time you spent for me.
    I'm here to ask, and from your response, I'd like to learn.
    By my knowledge, I can help someone else, and "that someone" could help in turn another, and so on.

/*--------------------------------------------------------------------------------------------------------------------------------------------------------------------------*/

ALWAYS GOOD TO READ:

 

Share this post


Link to post
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

Thoughts:

  • I will always thank you for the time you spent for me.
    I'm here to ask, and from your response, I'd like to learn.
    By my knowledge, I can help someone else, and "that someone" could help in turn another, and so on.

/*--------------------------------------------------------------------------------------------------------------------------------------------------------------------------*/

ALWAYS GOOD TO READ:

 

Share this post


Link to post
Share on other sites

... 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.
  :)

Share this post


Link to post
Share on other sites

@Jos

This one? 

-    Ignoring all #AutoIt3Wrapper_* #directives that would normally update the VERSION section!

 


Click here to see my signature:

Spoiler

Thoughts:

  • I will always thank you for the time you spent for me.
    I'm here to ask, and from your response, I'd like to learn.
    By my knowledge, I can help someone else, and "that someone" could help in turn another, and so on.

/*--------------------------------------------------------------------------------------------------------------------------------------------------------------------------*/

ALWAYS GOOD TO READ:

 

Share this post


Link to post
Share on other sites

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.
  :)

Share this post


Link to post
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

Thoughts:

  • I will always thank you for the time you spent for me.
    I'm here to ask, and from your response, I'd like to learn.
    By my knowledge, I can help someone else, and "that someone" could help in turn another, and so on.

/*--------------------------------------------------------------------------------------------------------------------------------------------------------------------------*/

ALWAYS GOOD TO READ:

 

Share this post


Link to post
Share on other sites

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.
  :)

Share this post


Link to post
Share on other sites

@Jos

Thanks for the answer. Now, it is more clear :)
So, for who is reading, don't mix #PRAGMA and AutoIt3Wrapper.

Use only #PRAGMA or only AutoIt3Wrapper, but don't use them simultaneousely! :)

Francesco


Click here to see my signature:

Spoiler

Thoughts:

  • I will always thank you for the time you spent for me.
    I'm here to ask, and from your response, I'd like to learn.
    By my knowledge, I can help someone else, and "that someone" could help in turn another, and so on.

/*--------------------------------------------------------------------------------------------------------------------------------------------------------------------------*/

ALWAYS GOOD TO READ:

 

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  

  • Recently Browsing   0 members

    No registered users viewing this page.

  • Similar Content

    • By SgtHugoStiglitz
      HI people,
                        I got a questions, I maintain code in autoIT and every time I compile a new version or modification, Scite generate 2 folders. One folder is finish by released and the other is tentative. I try to make some google search, but never find answer would satisfied myself. The dev who was maintain it before were using AutoIt3Wrapper_GUI, and I don't know if it's related. I look both folder, but they seem pretty identical, but I would like to know what it's the difference between those to folder. Anyone have a clue?
    • By Rhidlor
      I don't have any experience compiling AutoIt scripts or know of any best practices regarding said scripts so I was wondering, what are some of the options for passing data to complied scripts? Here's an example of what I mean by "option": Writing data to a text file, then running a script which reads the data from that text file.
      Thanks!
      I apologize if this topic is a little lackluster
    • By Skeletor
      Hey All,
      Yes, this is an odd request. 
      But is there a way to bulk up the size of the compiled program? 
      I know many want to reduce it's size, but I want to increase it.
      What methods do you suggest?
    • By dimm
      Is it possible to compile script without any icon resources included?
      When I make exe it uses default system icon of current OS even if I compile as console application.
      On other versions of Windows it looks a little strange

       
      Update:
      It seems that the only way is remove icons from exe after compilation using resource editors like ResHacker.

       
      another bad solution:
      Using corrupted 35 bytes icon file. Windows can't load it and shows default system icon.
      #pragma compile(Icon, broken.ico) broken.ico
    • By Dreamfire
      Hi,
      Since today, exe's are being flagged as having a trojan by Windows Defender (Fuery.B!cl)
      Version:  3.3.14.3 - SciTE Version 3.7.3



       

×
×
  • Create New...