butji Posted January 20, 2008 Posted January 20, 2008 i want to make like an installer that makes the final program, is that possible?
BigDod Posted January 20, 2008 Posted January 20, 2008 Have a look Here Time you enjoyed wasting is not wasted time ......T.S. Elliot Suspense is worse than disappointment................Robert Burns God help the man who won't help himself, because no-one else will...........My Grandmother
MrCreatoR Posted January 20, 2008 Posted January 20, 2008 (edited) i want it to compile it to an exeWithout external application you can not accomplish this.You can use the 7zip to compress as a SFX-archive. It's an open source project that you can use for any purposes (if i understand correct the license). Edited January 20, 2008 by MsCreatoR Spoiler Using OS: Win 7 Professional, Using AutoIt Ver(s): 3.3.6.1 / 3.3.8.1 AutoIt Russian Community My Work... Spoiler Projects: ATT - Application Translate Tool {new}| BlockIt - Block files & folders {new}| SIP - Selected Image Preview {new}| SISCABMAN - SciTE Abbreviations Manager {new}| AutoIt Path Switcher | AutoIt Menu for Opera! | YouTube Download Center! | Desktop Icons Restorator | Math Tasks | KeyBoard & Mouse Cleaner | CaptureIt - Capture Images Utility | CheckFileSize ProgramUDFs: OnAutoItErrorRegister - Handle AutoIt critical errors {new}| AutoIt Syntax Highlight {new}| Opera Library! | Winamp Library | GetFolderToMenu | Custom_InputBox()! | _FileRun UDF | _CheckInput() UDF | _GUIInputSetOnlyNumbers() UDF | _FileGetValidName() UDF | _GUICtrlCreateRadioCBox UDF | _GuiCreateGrid() | _PathSplitByRegExp() | _GUICtrlListView_MoveItems - UDF | GUICtrlSetOnHover_UDF! | _ControlTab UDF! | _MouseSetOnEvent() UDF! | _ProcessListEx - UDF | GUICtrl_SetResizing - UDF! | Mod. for _IniString UDFs | _StringStripChars UDF | _ColorIsDarkShade UDF | _ColorConvertValue UDF | _GUICtrlTab_CoverBackground | CUI_App_UDF | _IncludeScripts UDF | _AutoIt3ExecuteCode | _DragList UDF | Mod. for _ListView_Progress | _ListView_SysLink | _GenerateRandomNumbers | _BlockInputEx | _IsPressedEx | OnAutoItExit Handler | _GUICtrlCreateTFLabel UDF | WinControlSetEvent UDF | Mod. for _DirGetSizeEx UDF Examples: ScreenSaver Demo - Matrix included | Gui Drag Without pause the script | _WinAttach()! | Turn Off/On Monitor | ComboBox Handler Example | Mod. for "Thinking Box" | Cool "About" Box | TasksBar Imitation Demo Like the Projects/UDFs/Examples? Please rate the topic (up-right corner of the post header: Rating ) * === My topics === * ================================================== ================================================== AutoIt is simple, subtle, elegant. © AutoIt Team
martin Posted January 20, 2008 Posted January 20, 2008 no, i want it to compile it to an exeMsCreatoR says you can't do it without an external application but that isn't a problem. You can write a script to write a script and you can put the code in your script to call the compiler. For example, I have an AutoIt script which lets me choose the program, the customer and any extra files I want to include in an update. It also asks me, if it hasn't already been told, what the source file is that contains the version number and what the version variable name is. It then reads the latest source code of the relevant Delphi source file to find the version, modifies the Delphi source code for the updater program, creates a resource file for the delphi exe with all the extra files in it, compiles the Delphi exe, compresses it with upx and then uploads it to a website together with another file giving information on the latest update available. AutoIt can easily do all of these things.To compile an AutoIt script look up "compile" in the help. You will see how to do it from the command line and this can be done from a script. Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script.
MrCreatoR Posted January 22, 2008 Posted January 22, 2008 @Martin You can compile with AutoIt, but you use external application, UPX for example is external , but if you use your compiled script as interpretator for other temporary files (if i understand correctly), you can not make a stand-alone executable installation program, you will have to include your compiled script. And this what i meant when i said that «you can not accomplish this» . Spoiler Using OS: Win 7 Professional, Using AutoIt Ver(s): 3.3.6.1 / 3.3.8.1 AutoIt Russian Community My Work... Spoiler Projects: ATT - Application Translate Tool {new}| BlockIt - Block files & folders {new}| SIP - Selected Image Preview {new}| SISCABMAN - SciTE Abbreviations Manager {new}| AutoIt Path Switcher | AutoIt Menu for Opera! | YouTube Download Center! | Desktop Icons Restorator | Math Tasks | KeyBoard & Mouse Cleaner | CaptureIt - Capture Images Utility | CheckFileSize ProgramUDFs: OnAutoItErrorRegister - Handle AutoIt critical errors {new}| AutoIt Syntax Highlight {new}| Opera Library! | Winamp Library | GetFolderToMenu | Custom_InputBox()! | _FileRun UDF | _CheckInput() UDF | _GUIInputSetOnlyNumbers() UDF | _FileGetValidName() UDF | _GUICtrlCreateRadioCBox UDF | _GuiCreateGrid() | _PathSplitByRegExp() | _GUICtrlListView_MoveItems - UDF | GUICtrlSetOnHover_UDF! | _ControlTab UDF! | _MouseSetOnEvent() UDF! | _ProcessListEx - UDF | GUICtrl_SetResizing - UDF! | Mod. for _IniString UDFs | _StringStripChars UDF | _ColorIsDarkShade UDF | _ColorConvertValue UDF | _GUICtrlTab_CoverBackground | CUI_App_UDF | _IncludeScripts UDF | _AutoIt3ExecuteCode | _DragList UDF | Mod. for _ListView_Progress | _ListView_SysLink | _GenerateRandomNumbers | _BlockInputEx | _IsPressedEx | OnAutoItExit Handler | _GUICtrlCreateTFLabel UDF | WinControlSetEvent UDF | Mod. for _DirGetSizeEx UDF Examples: ScreenSaver Demo - Matrix included | Gui Drag Without pause the script | _WinAttach()! | Turn Off/On Monitor | ComboBox Handler Example | Mod. for "Thinking Box" | Cool "About" Box | TasksBar Imitation Demo Like the Projects/UDFs/Examples? Please rate the topic (up-right corner of the post header: Rating ) * === My topics === * ================================================== ================================================== AutoIt is simple, subtle, elegant. © AutoIt Team
Valuater Posted January 22, 2008 Posted January 22, 2008 I made one a while back... kinda coolOnly needs info at the top of the script ( you will need to make more changes the first time )expandcollapse popup; set program install info ;-------------------------------------------------------------------------------- ; program to install $Key = "Test" $Name = "Organ.exe" $Start_Folder = "\QTasc - Toy BOX\" $Location = @ProgramFilesDir & "\QTasc\ToyBOX\" ; place program into the installer $Program_1 = @TempDir & "\Temp.exe" FileInstall("C:\XPClean-web\Toy BOX\TB Programs\Organ.exe", $Program_1) ;-------------------------------------------------------------------------------- ;*** copy icon to other program ;$Logo_icon = @TempDir & "\Toy-Icon.ico" ;FileInstall("C:\XPClean-web\Settings\XPClean-pics\Toy-box-Icon.ico", $Logo_icon) ;GUISetIcon($Logo_icon) ;--------------------------------------------------------------------------------- #include "GUIConstants.au3" Dim $QT_web = "www.XPCleanMenu.HostRocket.com", $NoKey = "", $time = "800" Dim $ver = "2006A" ;install pics $Toy_Logo = @TempDir & "\Toy2-logo.jpg" FileInstall("C:\XPClean-web\Settings\XPClean-pics\Toy-box2-jpg.jpg", $Toy_Logo) $Toy_Banner = @TempDir & "\Toy-banr.jpg" FileInstall("C:\XPClean-web\Settings\XPClean-pics\Toy-box-jpg.jpg", $Toy_Banner) $Logo_icon = @TempDir & "\Toy-Icon.ico" FileInstall("C:\XPClean-web\Settings\XPClean-pics\Toy-box-Icon.ico", $Logo_icon) $Sound_clk = @TempDir & "\Sound_clk.wav" FileInstall("C:\XPClean-web\Settings\XPClean-pics\Sounds\Clickerx.wav", $Sound_clk) $Sound_grp = @TempDir & "\Sound_grp.wav" FileInstall("C:\XPClean-web\Settings\XPClean-pics\Sounds\Group_open.wav", $Sound_grp) $Sound_bar = @TempDir & "\Sound_bar.wav" FileInstall("C:\XPClean-web\Settings\XPClean-pics\Sounds\xpinfbar.wav", $Sound_bar) $Sound_lnk = @TempDir & "\Sound_lnk.wav" FileInstall("C:\XPClean-web\Settings\XPClean-pics\Sounds\Notify.wav", $Sound_lnk) ;display logo SplashImageOn("", $Toy_Banner, 400, 180, -1, -1, 1) SoundPlay ($Sound_lnk,1) Sleep(4000) SplashOff() Sleep($time) ;Set GUI $Toy_win = GUICreate(" QTasc - Toy BOX ver" & $ver, 329, 145) GUISetIcon($Logo_icon) ;GUISetBkColor(0x0066FF);0x0066FF); 0x00ff00) $Icon_1 = GUICtrlCreatePic($Toy_Logo, 245, 2, 75, 140) GUICtrlSetCursor(-1, 0) GUICtrlSetTip(-1, "Click here - to Donate Now!!") ;Create 2 buttons $button_1 = GUICtrlCreateButton("A&ccept", 30, 110, 80, 25) GUICtrlSetState(-1, $GUI_DEFBUTTON) $button_2 = GUICtrlCreateButton("C&ancel", 130, 110, 80, 25) ;create labels $label_1 = GUICtrlCreateLabel( "To install " & $Name & " now", 20, 15, 200, 20) GUICtrlSetFont(-1, 9, 650) $label_2 = GUICtrlCreateLabel( "Please enter your Validation Key", 20, 35, 200, 20) GUICtrlSetFont(-1, 9, 650) $label_3 = GUICtrlCreateLabel( "(The number given on your $10.95 Donation)", 10, 55, 200, 20) GUICtrlSetState(-1, $GUI_DISABLE) ;create text input $text = GUICtrlCreateInput("Welcome to the Toy BOX, by QTasc", 20, 75, 200, 20) GUICtrlSetState(-1, $GUI_FOCUS) ;Show the GUI DllCall("user32.dll", "int", "AnimateWindow", "hwnd", $Toy_win, "int", 1000, "long", 0x00040010);explode GUISetState(@SW_SHOW) ;sets tray icon opt("TrayMenuMode", 1); Default tray menu items (Script Paused/Exit) will not be shown. opt("TrayOnEventMode", 1) $donate_tray = TrayCreateItem("Make a Donation Now!!") TrayItemSetOnEvent(-1, "Set_Donation") TrayCreateItem("") $upgrade_tray = TrayCreateItem("Check New Releases") TrayItemSetOnEvent(-1, "Set_Update") TrayCreateItem("") $about_tray = TrayCreateItem("About QTasc") TrayItemSetOnEvent(-1, "Set_QT") TrayCreateItem("") $exit_tray = TrayCreateItem("Exit QTasc - Toy BOX") TrayItemSetOnEvent(-1, "Set_Exit") TraySetState() While 1 $msg = GUIGetMsg() Select Case $msg = $Icon_1 Call("Set_Donation") Case $msg = $button_2 Or $msg = $GUI_EVENT_CLOSE Call("Set_Exit") Case $msg = $button_1 SoundPlay($Sound_clk, 1) $msg1 = GUICtrlRead($text) If $msg1 = $Key Then MsgBox(64, "Validation Key Accepted", " Thank you!.. for your Donation! " & @CRLF & @CRLF & "Toy BOX - installing " & $Name & " ", 7) Call("Set_install") Else MsgBox(64, "Validation Key", "The Validation key was not correct! ", 7) $NoKey = $NoKey + 1 If $NoKey >= 3 Then Call("Set_Donation") $NoKey = "" EndIf EndIf EndSelect Sleep(50) WEnd Exit ; ------------------------------------ Functions ---------------------------------------------- Func Set_Update() SoundPlay($Sound_clk, 1) Run(@ProgramFilesDir & "\Internet Explorer\iexplore.exe " & $QT_web) WinWaitActive("") EndFunc;==>Set_Update Func Set_QT() SoundPlay($Sound_grp, 1) $iMsgBoxAnswer = MsgBox(32, " Toy BOX , by QTasc", "WHO IS, QT APPRAISAL SERVICE CO ?" & @CRLF & "" & @CRLF & "We are a Real Estate Appraisal Company based in Riverside, California. " & @CRLF & "" & @CRLF & "Thank you." & @CRLF & "" & @CRLF & "", 60) Select Case $iMsgBoxAnswer = -1;Timeout EndSelect SoundPlay($Sound_grp, 1) EndFunc;==>Set_QT Func Set_Exit() FileDelete($Program_1) SoundPlay($Sound_lnk, 1) DllCall("user32.dll", "int", "AnimateWindow", "hwnd", $Toy_win, "int", 1000, "long", 0x00050010);implode Sleep($time) Exit EndFunc;==>Set_Exit Func Set_Donation() SoundPlay($Sound_grp, 1) $PID = Run(@ProgramFilesDir & "\Internet Explorer\iexplore.exe https://www.paypal.com/xclick/[email protected]&amount=10%2e95&page_style=Primary&no_shipping=1&item_name=XPClean-Menu+Donation") WinWaitActive("") EndFunc;==>Set_Donate Func Set_install() GUICtrlDelete($label_3) GUICtrlDelete($button_1) GUICtrlDelete($button_2) GUICtrlDelete($text) ;create progress $Label_4 = GUICtrlCreateLabel(" Please Wait... ", 30, 110, 180, 25) GUICtrlSetFont(-1, 9, 650) $progress = GUICtrlCreateProgress(20, 75, 200, 20, $PBS_SMOOTH) GUICtrlSetState( -1, $GUI_SHOW) GUICtrlSetData($label_1, "Now installing " & $Name) GUICtrlSetData($label_2, "Loading installer...") Sleep($time) GUICtrlSetData($progress, 10) Sleep($time) GUICtrlSetData($label_2, "Checking for Toy BOX Folder...") GUICtrlSetData($progress, 20) Sleep($time) GUICtrlSetData($progress, 30) ; check if folder exists DirGetSize($Location) If @error = 1 Then DirCreate($Location) EndIf GUICtrlSetData($progress, 40) Sleep($time) GUICtrlSetData($label_2, "Checking for previous install...") GUICtrlSetData($progress, 50) Sleep($time) If FileExists($Location & $Name) Then $ans = MsgBox(68, "Previous Install Found", "Would you like to over-write the existing file? ") If $ans = 7 Then GUICtrlSetData($label_2, "Closing installer...") GUICtrlSetData($progress, 0) FileDelete($Program_1) Sleep($time + $time) Call("Set_Exit") EndIf EndIf GUICtrlSetData($label_2, "No previous installs found...") GUICtrlSetData($progress, 60) Sleep($time) GUICtrlSetData($label_2, "Copying files...") GUICtrlSetData($progress, 70) Sleep($time) FileCopy($Program_1, $Location & $Name, 1) GUICtrlSetData($label_2, "Creating Short-cuts...") GUICtrlSetData($progress, 80) Sleep($time) FileCreateShortcut($Location & $Name, @DesktopDir & "\" & $Name & ".lnk", "", "", "Starts " & $Name) DirCreate(@ProgramsCommonDir & $Start_Folder) FileCreateShortcut($Location & $Name, @ProgramsCommonDir & $Start_Folder & $Name & ".lnk", "", "", "Starts " & $Name) GUICtrlSetData($label_2, "Verifying install...") GUICtrlSetData($progress, 90) Sleep($time) If Not FileExists($Location & $Name) Then MsgBox(64, "Toy BOX Install Error", "The installer has found an Error and will now close... ", 4) GUICtrlSetData($label_2, "Closing installer...") GUICtrlSetData($progress, 0) FileDelete($Program_1) Sleep($time + $time) Call("Set_Exit") EndIf GUICtrlSetData($progress, 100) GUICtrlSetData($label_2, "Installation is complete...") Sleep($time + $time) GUICtrlSetData($label_2, "Closing installer...") FileDelete($Program_1) Sleep($time + $time) MsgBox(64, "Toy BOX Installer", "Toy BOX Installer will now start " & $Name & " and Exit... " & @CRLF & @CRLF & "Again... Thank You!! for your Donation ", 5) SoundPlay($Sound_lnk, 1) DllCall("user32.dll", "int", "AnimateWindow", "hwnd", $Toy_win, "int", 1000, "long", 0x00050010);implode Sleep($time) Run($Location & $Name) Exit EndFunc;==>Set_install8)
program builder Posted January 23, 2008 Posted January 23, 2008 Without external application you can not accomplish this.You can use the 7zip to compress as a SFX-archive. It's an open source project that you can use for any purposes (if i understand correct the license).I think what he is trying to say is, he wants to know how to build a program that will work as the exe compiler, so that he can build a program, using it.
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now