Modify

Opened 13 years ago

Closed 13 years ago

#2358 closed Feature Request (Completed)

FileInstall: accept "" as "source" to include the current script

Reported by: vlad@… Owned by: Jon
Milestone: 3.3.9.18 Component: AutoIt
Version: Severity: None
Keywords: Cc:

Description

To the extent of my search, this issue wasn't raised before (sorry if I'm wrong).

I understand the FileInstall's "variable source" issues and I'm not touching that. I also know that AutoIt3Wrapper offers a similar feature (include the current script in the compiled package), but the extraction is somewhat more complex.

As a programmer, I believe that enhancing FileInstall to accept and empty string as "source" and to interpret that as a "placeholder" for the current file shouldn't be too complicated.

The advantages of such an approach would be to ease the file name based versioning if one wants to always include the original script in each compiled exe (the way it is now, the FileInstall() line has to be manually changed each time the script's file name changes).

Attachments (0)

Change History (5)

comment:1 by TicketCleanup, 13 years ago

Version: 3.3.8.1

Automatic ticket cleanup.

comment:2 by guinness, 13 years ago

If this was to be accepted, I would say a pragma directive would be more appropriate. Imagine if a user mistakenly used "" in FileInstall and didn't mean to include their source.

comment:3 by vlad@…, 13 years ago

The directive could be a solution as well ... probably better.

In terms of improper usage, FileInstall is a very special function by its nature and I imagine it is always used "with a clear purpose". As the "source" has to be literal, there is no chance a non-initialized variable could offer a "fake" empty string. So, in my opinion, an "accidental" empty string shouldn't be a real concern.

comment:4 by Jon, 13 years ago

I've written some code that allows aut2exe to handle @ScriptFullPath when used as the first parameter.

comment:5 by Jon, 13 years ago

Milestone: 3.3.9.18
Owner: set to Jon
Resolution: Completed
Status: newclosed

Added by revision [8632] in version: 3.3.9.18

Modify Ticket

Action
as closed The owner will remain Jon.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.