Jump to content

an updateable program


Recommended Posts

currently i'm working on a program i'm planning to actually release.

here's the thing though, i'd like to make it updateable.

as in, you don't need to download a whole new version for a tiny update, like say, a new func file with one tiny new function.

what i want to do is to make the compiled file actually read the other au3 files and react to what is written.

the need for this came after i figured out i wrote 21 instead of 22 in an old already compiled project (an ini file wasn't necesary in that project).

but i can't add an entirely new function, using solely txt's and inis.

is it possible, and if so, how?

Link to comment
Share on other sites

I only understand a few parts of what you wrote.

And it seems to me your going to try something very complicated for something that seems unneeded, or that should be done in a completely different (more simple) way.

(getting a deja vu feeling here)

"Straight_and_Crooked_Thinking" : A "classic guide to ferreting out untruths, half-truths, and other distortions of facts in political and social discussions."
"The Secrets of Quantum Physics" : New and excellent 2 part documentary on Quantum Physics by Jim Al-Khalili. (Dec 2014)

"Believing what you know ain't so" ...

Knock Knock ...
 

Link to comment
Share on other sites

Maybe a better way to ask this question would be:

From a compiled executable, can I execute autoit source code from an external source code file? (Something like #include, only at runtime from a compiled exe script)

Roses are FF0000, violets are 0000FF... All my base are belong to you.

Link to comment
Share on other sites

heh. sad bunny managed to simplify me.

yes, that's basically what i'm asking for.

i'm writing my programs in a following manner: main.au3; Data\Gui.au3; Data\Func.au3

the filenames are self explanetory(sp).

what i'm looking for is a way to update, say, gui.au3 without actually rewriting and recompiling the whole thing.

this is partially so that i get one particular style of writing. i wrote two serious projects so far, none of which i intend to release, made especially for me.

both of them have completely different writing style.

however, i'm more interested in being able to release updates for compiled executables. specifically, without installing autoit on the other machines.

Link to comment
Share on other sites

One way to go about this is by making an executatabe with something along the lines of this:

Run(@ScriptFullPath & " /AutoIt3ExecuteScript " & @ScriptDir & "\Update.A3X")
Run(@ScriptFullPath & " /AutoIt3ExecuteScript " & @ScriptDir & "\Main.A3X")

Then you compile 2 files as A3X:

"Update.A3X" which checks a server for available updates for both A3X files and resources. (Icons and stuff)

"Main.A3X" which has the entire functional part of the script.

This way you can update your script without redownloading the interpeter all the time, which really helps with the filesize. Especially if you compile with the StripOnly parameter for obfuscator.

Another benefit is that you can replace the scriptfiles while the script is still running, making it easy for the updater to update itself.

You only need to update the executable when autoit is updated with script breaking changes.

You can use the same setup for plain *.au3 files, allowing you to create a "modular" script using #include, but I wouldn't reccomend it for the following reasons:

You lose the ability to remove unused vars and functions with obfuscator. (as that would make it one file again)

Your code is there for everyone to see as a plain text file.

You'll need to keep track of what files you have made changes in and offer them all for updating. If you renamed a variable, or function in two files, but you're only updating one, users will get errors.

Link to comment
Share on other sites

tvern: i don't get this a3x deal.

usually, main is just a file which interperts what to do based on the output froum gui and func.

and yes, the part with it being able to be shown as plain text bothers me.

i thought of a rather confusing form of encryption. working on that project right now, but... it could be cracked. i would be glad to hear of more secure alternatives.

Link to comment
Share on other sites

You dan't have to call it Main.A3X, that was just an example. Basically A3X files are like AutoIt exe's, but without the interpeter.

Afaik you can use the same methods of obfuscation and compression on them, making it harder to read and change the code.

To test the concept, just compile the above code as an exe, then compile any code you like as Main.A3X.

Put those two files in the same folder and run the exe. You'll see that the A3X file will be executed as normal.

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

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...