Jump to content

This site uses cookies. By continuing to browse the site you are agreeing to our use of cookies. Find out more here. X
X


Photo

CreateFilesEmbedded.au3 - Like FileInstall...

embedded fileinstall base64 compress

  • Please log in to reply
46 replies to this topic

#1 JScript

JScript

    I'm back ... I miss, why not!

  • Active Members
  • PipPipPipPipPipPip
  • 1,070 posts

Posted 02 September 2011 - 04:57 PM

CreateFilesEmbedded.exe
Application to embed files into their programs in the format .AU3 
I present a different format to add files in your script:

So how about having our files (photos, text, executables) built?
1 - We can use the binary variables with
2 - We can test the fully functional program with F5 SciTE
4 - Use your imagination!!!

Sintax / Examples:

#include "YourFileEmbedded.au3" ; Returning the code in binary format $bData = _YourFileEmbedded() ; Saving the code in the HDD _YourFileEmbedded( True, @ScriptDir) ; Saving and running the code _YourFileEmbedded( True, @ScriptDir, True) ; Finally, running the code directly Run(_YourFileEmbedded(True))

Language file sample:
Spoiler


Supports:

; All file types!


Downloads:

Version: 2.27
Attached File  CreateFilesEmbedded_(RedirectLink).html   146bytes   899 downloads
(Previous downloads: 575)

Example using the binary return (without writing the file in HDD)
Attached File  BinarySoundTest.zip   135.87KB   821 downloads

Sample:

Posted Image

Fixes:
Spoiler
 
Free Software
Spoiler


João Carlos.

Edited by Melba23, 28 September 2012 - 11:02 AM.
File removed at JScript's request

http://notebook.forumais.com (Forum Maintenance Notebooks and Desktop)http://autoitbrasil.com/ (AutoIt v3 Brazil!!!)
Spoiler

Posted Image Download Dropbox - Simplify your life!Your virtual HD wherever you go, anywhere!       








#2 CaptainClucks

CaptainClucks

    Unum Cavillator Spuria

  • Active Members
  • PipPipPipPipPipPip
  • 1,222 posts

Posted 11 September 2011 - 11:21 PM

Well, Portuguese is a lot like my native language, I was surprised when I actually understood everything in that language, I didn't know it was so similar to Spanish.

Attached File  CreateFilesEmbedded.au3   23.42KB   847 downloads

Edited by THAT1ANONYMOUSEDUDE, 11 September 2011 - 11:26 PM.

Spoiler
Warning: Posts by this user are subject to change or may disappear without notice.

#3 JScript

JScript

    I'm back ... I miss, why not!

  • Active Members
  • PipPipPipPipPipPip
  • 1,070 posts

Posted 12 September 2011 - 03:25 AM

@THAT1ANONYMOUSEDUDE
Muchas gracias!
¡Tienes razón! És muy parecida...

Thank you very much!
You're right! Is very similar


João Carlos.
http://notebook.forumais.com (Forum Maintenance Notebooks and Desktop)http://autoitbrasil.com/ (AutoIt v3 Brazil!!!)
Spoiler

Posted Image Download Dropbox - Simplify your life!Your virtual HD wherever you go, anywhere!       


#4 twitchyliquid64

twitchyliquid64

    Peace. Always.

  • Active Members
  • PipPipPipPipPipPip
  • 527 posts

Posted 12 September 2011 - 07:11 AM

@THAT1ANONYMOUSEDUDE
Muchas gracias!
¡Tienes razón! És muy parecida...

Thank you very much!
You're right! Is very similar


João Carlos.


muchas? zomg i love muchas! corn chips, salsa, melted cheese, tomato...what more could you want in a food?
ongoing projects:-firestorm: Largescale P2P Social NetworkCompleted Autoit Programs/Scripts: Variable Pickler | Networked Streaming Audio (in pure autoIT) | firenet p2p web messenger | Proxy Checker | Dynamic Execute() Code Generator | P2P UDF | Graph Theory Proof of Concept - Breadth First search

#5 JScript

JScript

    I'm back ... I miss, why not!

  • Active Members
  • PipPipPipPipPipPip
  • 1,070 posts

Posted 13 September 2011 - 02:15 AM

@twitchyliquid64

Funny, but the topic is about scripts, not food! :graduated:

João Carlos.
http://notebook.forumais.com (Forum Maintenance Notebooks and Desktop)http://autoitbrasil.com/ (AutoIt v3 Brazil!!!)
Spoiler

Posted Image Download Dropbox - Simplify your life!Your virtual HD wherever you go, anywhere!       


#6 SandelPerieanu

SandelPerieanu

    Prodigy

  • Active Members
  • PipPipPip
  • 179 posts

Posted 13 September 2011 - 10:00 AM

i tested with the same file
With FileInstall - 3.87 Mb
With CreateFilesEmbedded.au3 - 6.70 Mb (- LZNT level 2)

for me it's not ok.
thanks.

#7 JScript

JScript

    I'm back ... I miss, why not!

  • Active Members
  • PipPipPipPipPipPip
  • 1,070 posts

Posted 14 September 2011 - 01:48 PM

@SandelPerieanu

Very strange, see this example:
Download: Test_(Embedded&FileInstall).zip

Test_(Embedded).au3
#AutoIt3Wrapper_Compression=4           ;Compression parameter 0-4  0=Low 2=normal 4=High. Default=2 #AutoIt3Wrapper_UseUpx=y                ;(Y/N) Compress output program.  Default=Y   #include "Zune.au3" ; 970KB, LZNT level 2   _Zune(True, @TempDir)
Test_(Embedded).exe = 978KB

Test_(FileInstall).au3
#AutoIt3Wrapper_Compression=4           ;Compression parameter 0-4  0=Low 2=normal 4=High. Default=2 #AutoIt3Wrapper_UseUpx=y                ;(Y/N) Compress output program.  Default=Y   FileInstall(".Zune.msstyles", @TempDir) ; 12.028KB
Test_(FileInstall).exe = 1.736KB

Conclusion: Who is smaller?

João Carlos.

Edited by jscript, 14 September 2011 - 01:51 PM.

http://notebook.forumais.com (Forum Maintenance Notebooks and Desktop)http://autoitbrasil.com/ (AutoIt v3 Brazil!!!)
Spoiler

Posted Image Download Dropbox - Simplify your life!Your virtual HD wherever you go, anywhere!       


#8 JFX

JFX

    Polymath

  • Active Members
  • PipPipPipPip
  • 220 posts

Posted 14 September 2011 - 02:48 PM

Conclusion: Who is smaller?


it depends on how "compress able" a file is.

AutoIt uses a very week compression for script and fileinstall, but it stores it better.
Your function compresses much better, but stores not efficient (Hex values not binary)

Anyway thank you very much for this script. :graduated:

#9 JScript

JScript

    I'm back ... I miss, why not!

  • Active Members
  • PipPipPipPipPipPip
  • 1,070 posts

Posted 14 September 2011 - 03:01 PM

@JFX

You're right! I'll see what I can do to improve it...

Do you have any idea? I was thinking of store in resource...

João Calos.

Edited by jscript, 14 September 2011 - 03:13 PM.

http://notebook.forumais.com (Forum Maintenance Notebooks and Desktop)http://autoitbrasil.com/ (AutoIt v3 Brazil!!!)
Spoiler

Posted Image Download Dropbox - Simplify your life!Your virtual HD wherever you go, anywhere!       


#10 JFX

JFX

    Polymath

  • Active Members
  • PipPipPipPip
  • 220 posts

Posted 14 September 2011 - 03:31 PM

hmm, store in resource would be a very good solution for complied scripts.
for not complied it could be Base64 encoded, like in some other script (ex. AutoitObject)

#11 JScript

JScript

    I'm back ... I miss, why not!

  • Active Members
  • PipPipPipPipPipPip
  • 1,070 posts

Posted 14 September 2011 - 04:01 PM

Base64 encoded?!?! It's better than in Hex format?
Could you give me an example?

João Carlos.

Edited by jscript, 14 September 2011 - 04:02 PM.

http://notebook.forumais.com (Forum Maintenance Notebooks and Desktop)http://autoitbrasil.com/ (AutoIt v3 Brazil!!!)
Spoiler

Posted Image Download Dropbox - Simplify your life!Your virtual HD wherever you go, anywhere!       


#12 trancexx

trancexx

    Queen F. Elizabeth MCXI

  • Active Members
  • PipPipPipPipPipPip
  • 5,981 posts

Posted 14 September 2011 - 05:41 PM

hmm, store in resource would be a very good solution for complied scripts.
for not complied it could be Base64 encoded, like in some other script (ex. AutoitObject)

Excellent observation.

Maybe I'm in love (Sshh, it's a secret)

.

 

eMyvnE


#13 JFX

JFX

    Polymath

  • Active Members
  • PipPipPipPip
  • 220 posts

Posted 15 September 2011 - 12:53 PM

@jscript
Yes Base64 is a better choice then Hex format. It just need 4 Bytes to save 3 Bytes binary data
See here http://www.autoitscript.com/forum/topic/81332-base64encode-base64decode/ or http://www.autoitscript.com/forum/topic/...rc32rc4base64xxtea-machine-cod

@trancexx
Thanks. It's a pleasure to read such excellent scripts

#14 JScript

JScript

    I'm back ... I miss, why not!

  • Active Members
  • PipPipPipPipPipPip
  • 1,070 posts

Posted 15 September 2011 - 11:47 PM

@JFX,
OK, you have convinced me, updated code!

João Carlos.
http://notebook.forumais.com (Forum Maintenance Notebooks and Desktop)http://autoitbrasil.com/ (AutoIt v3 Brazil!!!)
Spoiler

Posted Image Download Dropbox - Simplify your life!Your virtual HD wherever you go, anywhere!       


#15 Reaper HGN

Reaper HGN

    Wayfarer

  • Active Members
  • Pip
  • 97 posts

Posted 03 October 2011 - 06:02 PM

I wanted to try this out, but wasnt sure about what the options and text was saying. I saw that you needed some translation, so I played around with the translate in Google. I copied your text into a language file and created a select based on your OSLang return value. I only did the original Portuguese and the additional English (You may want to do it a different way). Anyway, I modified the original file slightly to use all the variables that are setup in the language file.



Now I can check it out and see if it work for me :graduated:

Attaching files

Attached Files


Edited by Reaper HGN, 03 October 2011 - 06:07 PM.


#16 JScript

JScript

    I'm back ... I miss, why not!

  • Active Members
  • PipPipPipPipPipPip
  • 1,070 posts

Posted 04 October 2011 - 01:02 PM

@Reaper HGN

Many thanks guy! I'm doing a new version, then I'll include multilanguage support...

João Carlos.
http://notebook.forumais.com (Forum Maintenance Notebooks and Desktop)http://autoitbrasil.com/ (AutoIt v3 Brazil!!!)
Spoiler

Posted Image Download Dropbox - Simplify your life!Your virtual HD wherever you go, anywhere!       


#17 RugWarrior

RugWarrior

    Seeker

  • Active Members
  • 8 posts

Posted 15 November 2011 - 08:32 PM

Great UDF!

Can't wait for the new version :D

#18 RugWarrior

RugWarrior

    Seeker

  • Active Members
  • 8 posts

Posted 15 November 2011 - 08:57 PM

Hi, I played around with the translation file as you will not get something on the screen to read if your system has another language set (like german).
Hopefully I will have same spare time during the next couple of days I will translate it to german also.
Greetings RW

Plain Text         
#include ".\Include\_GetOSLangString.au3" $SysLang = _GetOSLangString(@OSLang) Global $a_language[24] If StringInStr($SysLang, "Portuguese", False) Then   $a_language[1] = "Opções do arquivo de saída."   $a_language[2] = "Criar uma função baseada no nome de saída."   $a_language[3] = "Adicionar padrões de Funções Definidas pelo Usuário (UDF)."   $a_language[4] = "Apenas criar o arquivo de saída com o binário."   $a_language[5] = "Adicionar compressão  LZNT nativa do Windows."   $a_language[6] = "Nível de compressão:"   $a_language[7] = "&Abrir arquivo"   $a_language[8] = "Embutir arquivo"   $a_language[9] = "Testar"   $a_language[10] = "Padrão"   $a_language[11] = "Progresso de conversão:"   $a_language[12] = "Sair"   $a_language[13] = "Linhas convertidas:"   $a_language[14] = "Escolha um arquivo para embutir:"   $a_language[15] = "O arquivo "   $a_language[16] = " não existe!"   $a_language[17] = 'O teste somente com a opção: "Criar uma função baseada no nome de saída" ativada!'   $a_language[18] = "Aguarde, criando o arquivo .AU3 -> "   $a_language[19] = "Salvar o arquivo embutido como"   $a_language[20] = "Compactando o arquivo, aguarde..."   $a_language[21] = " - Concluído!"   $a_language[22] = 'O arquivo "'   $a_language[23] = '" foi embutido para au3.' Else ;"English"   $a_language[1] = "Options for the output file."   $a_language[2] = "Create a function based on the output name."   $a_language[3] = "Adding patterns of User Defined Functions (UDF)."   $a_language[4] = "Only create the output file with the binary."   $a_language[5] = "Adding compression LZNT native Windows."   $a_language[6] = "Compression level"   $a_language[7] = "&Open File"   $a_language[8] = "Embedding file"   $a_language[9] = "Test"   $a_language[10] = "Standard"   $a_language[11] = "Progress of conversion:"   $a_language[12] = "Exit"   $a_language[13] = "Converted Lines"   $a_language[14] = "Choose a file to embed"   $a_language[15] = "File"   $a_language[16] = "No!"   $a_language[17] = 'The test only with the option: "Create a function based on the output name" activated!'   $a_language[18] = "Wait, creating the file. AU3 equipment ->"   $a_language[19] = "Save the file as built"   $a_language[20] = "Compressing the file, wait ..."   $a_language[21] = "- Done!"   $a_language[22] = 'File" '   $a_language[23] = '"AU3 equipment was built for."' EndIf


#19 Belini

Belini

    Universalist

  • Active Members
  • PipPipPipPipPipPip
  • 339 posts

Posted 08 January 2012 - 02:37 PM

Tested and approved, much better than FileInstall () thanks for sharing.

Edited by Belini, 09 January 2012 - 12:45 PM.


#20 JScript

JScript

    I'm back ... I miss, why not!

  • Active Members
  • PipPipPipPipPipPip
  • 1,070 posts

Posted 08 January 2012 - 03:52 PM

Hi @Belini

I'm doing a few more changes and then post here and in the Brazilian forum, thank you very much!

Regards,

João Carlos.
http://notebook.forumais.com (Forum Maintenance Notebooks and Desktop)http://autoitbrasil.com/ (AutoIt v3 Brazil!!!)
Spoiler

Posted Image Download Dropbox - Simplify your life!Your virtual HD wherever you go, anywhere!       






Also tagged with one or more of these keywords: embedded, fileinstall, base64, compress

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users