Jump to content

Some eyecandy...


sandman
 Share

Recommended Posts

I just made this installer.. tried to make it look very user-friendly. It has a few songs, fade effects, round corners, the works :rolleyes:

Unfortunately the EXE is 10 MB... beauty comes with a price, I guess :rambo:

Here is the code:

;installer

#include <GUIConstants.au3>
#include <Sound.au3>

FileInstall("../images/splash.jpg", "splash.jpg")
DirCreate(@ScriptDir & "\Sounds")
FileInstall("Sounds\intro.mp3", "Sounds\intro.mp3")
FileInstall("Sounds\install.mp3", "Sounds\install.mp3")
FileInstall("cdburn.exe", "cdburn.exe")

$splash = GUICreate("GetUbuntu Installer", 575, 179, -1, -1, $WS_POPUPWINDOW)
$splashpic = GUICtrlCreatePic("splash.jpg", 0, 0, 575, 179, BitOR($SS_NOTIFY, $WS_GROUP))
$splashprog = GUICtrlCreateProgress(20, 150, 530, 15)
GUICtrlSetColor(-1, 0x000080)
_GuiRoundCorners($splash, 5, 5, 15, 15)
DllCall("user32.dll", "int", "AnimateWindow", "hwnd", $splash, "int", 700, "long", 0x00080000);fade-in
GUISetState(@SW_SHOW, $splash)
Global $intro = _SoundOpen("Sounds\intro.mp3")
_SoundPlay($intro)

;start checking things
GUICtrlSetData($splashprog, 0)
;check for internet connection
$ping = Ping("yahoo.com")
GUICtrlSetData($splashprog, 6)
GUICtrlSetData($splashprog, 12)
GUICtrlSetData($splashprog, 18)
GUICtrlSetData($splashprog, 25)
GUICtrlSetData($splashprog, 31)
GUICtrlSetData($splashprog, 37)
GUICtrlSetData($splashprog, 42)
GUICtrlSetData($splashprog, 50)
$valid = InetGetSize("http://mirrors.easynews.com/linux/ubuntu-releases/feisty/ubuntu-7.04-desktop-i386.iso")
GUICtrlSetData($splashprog, 56)
GUICtrlSetData($splashprog, 62)
GUICtrlSetData($splashprog, 68)
GUICtrlSetData($splashprog, 74)
GUICtrlSetData($splashprog, 80)
GUICtrlSetData($splashprog, 86)
GUICtrlSetData($splashprog, 92)
GUICtrlSetData($splashprog, 100)
Do
    Sleep(10)
Until _SoundPos($intro, 1) = "00:00:30"
DllCall("user32.dll", "int", "AnimateWindow", "hwnd", $splash, "int", 1000, "long", 0x00090000);fade-out
GUIDelete($splash)

$maskwin = GUICreate("", @DesktopWidth, @DesktopHeight, -1, -1, $WS_POPUPWINDOW)
GUISetBkColor(0x666666, $maskwin)
WinSetTrans($maskwin, "", 235)
GUISetState(@SW_SHOW, $maskwin)
$win = GUICreate("GetUbuntu Installation", 575, 230, -1, -1, BitOR($WS_POPUPWINDOW, $WS_EX_TOPMOST))
GUISetBkColor(0x000217, $win)
$pic = GUICtrlCreatePic("splash.jpg", 0, 0, 575, 179, BitOR($SS_NOTIFY, $WS_GROUP))
$ovrprog = GUICtrlCreateProgress(20, 150, 530, 15)
$curprog = GUICtrlCreateProgress(20, 180, 530, 15)
$cur = GUICtrlCreateLabel("Getting Ubuntu ISO", 20, 203, 530, 17)
GUICtrlSetColor($cur, 0xFFFFFF)
_GuiRoundCorners($win, 5, 5, 15, 15)
DllCall("user32.dll", "int", "AnimateWindow", "hwnd", $win, "int", 700, "long", 0x00080000);fade-in
GUISetState(@SW_SHOW, $win)
Global $snd = _SoundOpen("Sounds\install.mp3")
_SoundPlay("Sounds\install.mp3")
InetGet("http://mirrors.easynews.com/linux/ubuntu-releases/feisty/ubuntu-7.04-desktop-i386.iso", "ubuntu.iso", 0, 1)
$size = InetGetSize("http://mirrors.easynews.com/linux/ubuntu-releases/feisty/ubuntu-7.04-desktop-i386.iso")
While @InetGetActive = 1
    $bytes = @InetGetBytesRead
    $prog = ($bytes / $size)*100
    GUICtrlSetData($curprog, $prog)
    GUICtrlSetData($ovrprog, Round($prog / 2, 0))
    Sleep(10)
WEnd
GUICtrlSetData($curprog, 100)
GUICtrlSetData($ovrprog, 50)
Sleep(2000)
GUICtrlSetData($curprog, 0)
$drives = DriveGetDrive("CDROM")
For $i = 0 To UBound($drives) Step 1
    If IsArray($drives) Then
        $space = DriveSpaceTotal($drives[$i])
        $free = DriveSpaceFree($drives[$i])
        If $space > "700" And $free > "700" Then
            $write = $drives[$i]
            ExitLoop
        Else
            ContinueLoop
        EndIf
    EndIf
Next
GUICtrlSetData($cur, "Burning ISO to CD drive " & StringUpper($write))
ShellExecuteWait("cdburn.exe", StringLeft($write, 2) & "ubuntu.iso")
GUICtrlSetData($curprog, 100)
GUICtrlSetData($ovrprog, 100)
GUICtrlSetData($cur, "Done!")
Sleep(3000)
DllCall("user32.dll", "int", "AnimateWindow", "hwnd", $splash, "int", 1000, "long", 0x00090000);fade-out
GUIDelete($win)

While 1
    $msg = GUIGetMsg()
    Switch $msg
        Case $GUI_EVENT_CLOSE
            Exit
    EndSwitch
WEnd

Func _GuiRoundCorners($h_win, $i_x1, $i_y1, $i_x3, $i_y3)
    Dim $pos, $ret, $ret2
    $pos = WinGetPos($h_win)
    $ret = DllCall("gdi32.dll", "long", "CreateRoundRectRgn", "long", $i_x1, "long", $i_y1, "long", $pos[2], "long", $pos[3], "long", $i_x3, "long", $i_y3)
    If $ret[0] Then
        $ret2 = DllCall("user32.dll", "long", "SetWindowRgn", "hwnd", $h_win, "long", $ret[0], "int", 1)
        If $ret2[0] Then
            Return 1
        Else
            Return 0
        EndIf
    Else
        Return 0
    EndIf
EndFunc   ;==>_GuiRoundCorners

And finally, download here.

[center]"Yes, [our app] runs on Windows as well as Linux, but if you had a Picasso painting, would you put it in the bathroom?" -BitchX.com (IRC client)"I would change the world, but they won't give me the source code." -Unknownsite . blog . portfolio . claimidcode.is.poetry();[/center]

Link to comment
Share on other sites

Your download link made my Firefox freeze up. Try another host. Like WikiFortio.

http://www.autoitking.co.nr Site is DOWN | My deviantART | No Topic Topic - Don't do it!-------------------- UDF's/Scripts:AutoIt: [BenEditor 3.6] [_ShutDown()]PHP: [CommentScript]Web Based AutoIt: [MemStats] [HTML to AU3] [User LogIn and SignUp script]
Link to comment
Share on other sites

Your download link made my Firefox freeze up. Try another host. Like WikiFortio.

I'm sorry.. :rolleyes:

http://www.wikifortio.com/104562/setup.exe

[center]"Yes, [our app] runs on Windows as well as Linux, but if you had a Picasso painting, would you put it in the bathroom?" -BitchX.com (IRC client)"I would change the world, but they won't give me the source code." -Unknownsite . blog . portfolio . claimidcode.is.poetry();[/center]

Link to comment
Share on other sites

Couldn't get past the splash. It seems to have frozen up at the last bar.

[left][sub]We're trapped in the belly of this horrible machine.[/sub][sup]And the machine is bleeding to death...[/sup][sup][/sup][/left]

Link to comment
Share on other sites

It waits for the song to end before continuing, no freezing, just too long of a song :rolleyes:

See this part of script:

Do
    Sleep(10)
Until _SoundPos($intro, 1) = "00:00:30"

Dang it, should have used the 10 second one...

[center]"Yes, [our app] runs on Windows as well as Linux, but if you had a Picasso painting, would you put it in the bathroom?" -BitchX.com (IRC client)"I would change the world, but they won't give me the source code." -Unknownsite . blog . portfolio . claimidcode.is.poetry();[/center]

Link to comment
Share on other sites

Oooohhh I didn't have any headphones in at the time. So I didn't hear it.

I'll try again later.

[left][sub]We're trapped in the belly of this horrible machine.[/sub][sup]And the machine is bleeding to death...[/sup][sup][/sup][/left]

Link to comment
Share on other sites

Just a tip when checking that a sound has played for a certain length,

Use 2 for the second paramater of _SoundPos because if you wait until it is 00:00:30 then only 29 seconds and a bit have played whereas if milliseconds are used the following can be done:

Do
    Sleep(10)
Until _SoundPos($intro, 2) >= 30000

This is far more accurate. '>=' is used in case millisecond 30000 precisely is missed.

Edited by RazerM
My Programs:AInstall - Create a standalone installer for your programUnit Converter - Converts Length, Area, Volume, Weight, Temperature and Pressure to different unitsBinary Clock - Hours, minutes and seconds have 10 columns each to display timeAutoIt Editor - Code Editor with Syntax Highlighting.Laserix Editor & Player - Create, Edit and Play Laserix LevelsLyric Syncer - Create and use Synchronised Lyrics.Connect 4 - 2 Player Connect 4 Game (Local or Online!, Formatted Chat!!)MD5, SHA-1, SHA-256, Tiger and Whirlpool Hash Finder - Dictionary and Brute Force FindCool Text Client - Create Rendered ImageMy UDF's:GUI Enhance - Enhance your GUIs visually.IDEA File Encryption - Encrypt and decrypt files easily! File Rename - Rename files easilyRC4 Text Encryption - Encrypt text using the RC4 AlgorithmPrime Number - Check if a number is primeString Remove - remove lots of strings at onceProgress Bar - made easySound UDF - Play, Pause, Resume, Seek and Stop.
Link to comment
Share on other sites

Hmmm, how big is this "Ubuntu ISO"? I can't get past the first progress bar... You might want to tell people how big the file is 'cause I've been waiting ten minutes (I did figure out how to get past you GUI that was on top of everything) and I still haven't got past the first progress mark.

Annoying lethargic internet...

BTW: One small think I would change would be to take out the trayicon, or at least make some sort of tray items...

And I liked the music!

Edit: Ok, found the file size: ~600 mg... That would take me about three days to download :rolleyes:

Edited by Piano_Man
My Programs[list][*]Knight Media Player[*]Multiple Desktops[*]Daily Comics[*]Journal[/list]
Link to comment
Share on other sites

Hmmm, how big is this "Ubuntu ISO"? I can't get past the first progress bar... You might want to tell people how big the file is 'cause I've been waiting ten minutes (I did figure out how to get past you GUI that was on top of everything) and I still haven't got past the first progress mark.

Annoying lethargic internet...

BTW: One small think I would change would be to take out the trayicon, or at least make some sort of tray items...

And I liked the music!

Edit: Ok, found the file size: ~600 mg... That would take me about three days to download :rolleyes:

lol, thanks.. if you want good music for your apps http://www.freeplaymusic.com is #1. royalty free, completely free. and some of it is pretty darn good music!

[center]"Yes, [our app] runs on Windows as well as Linux, but if you had a Picasso painting, would you put it in the bathroom?" -BitchX.com (IRC client)"I would change the world, but they won't give me the source code." -Unknownsite . blog . portfolio . claimidcode.is.poetry();[/center]

Link to comment
Share on other sites

lol, thanks.. if you want good music for your apps http://www.freeplaymusic.com is #1. royalty free, completely free. and some of it is pretty darn good music!

Sweet!!
http://www.autoitking.co.nr Site is DOWN | My deviantART | No Topic Topic - Don't do it!-------------------- UDF's/Scripts:AutoIt: [BenEditor 3.6] [_ShutDown()]PHP: [CommentScript]Web Based AutoIt: [MemStats] [HTML to AU3] [User LogIn and SignUp script]
Link to comment
Share on other sites

Shweet!!

2108 songs in their library so far. Yes, it is pretty shweet.

[center]"Yes, [our app] runs on Windows as well as Linux, but if you had a Picasso painting, would you put it in the bathroom?" -BitchX.com (IRC client)"I would change the world, but they won't give me the source code." -Unknownsite . blog . portfolio . claimidcode.is.poetry();[/center]

Link to comment
Share on other sites

  • 4 years later...

Sorry To Interrupt

But The Download Link is Broken..........

My code:

PredictText: Predict Text of an Edit Control Like Scite. Remote Gmail: Execute your Scripts through Gmail. StringRegExp:Share and learn RegExp.

Run As System: A command line wrapper around PSEXEC.exe to execute your apps scripts as System (LSA). Database: An easier approach for _SQ_LITE beginners.

MathsEx: A UDF for Fractions and LCM, GCF/HCF. FloatingText: An UDF for make your text floating. Clipboard Extendor: A clipboard monitoring tool. 

Custom ScrollBar: Scroll Bar made with GDI+, user can use bitmaps instead. RestrictEdit_SRE: Restrict text in an Edit Control through a Regular Expression.

Link to comment
Share on other sites

oKay.......

My code:

PredictText: Predict Text of an Edit Control Like Scite. Remote Gmail: Execute your Scripts through Gmail. StringRegExp:Share and learn RegExp.

Run As System: A command line wrapper around PSEXEC.exe to execute your apps scripts as System (LSA). Database: An easier approach for _SQ_LITE beginners.

MathsEx: A UDF for Fractions and LCM, GCF/HCF. FloatingText: An UDF for make your text floating. Clipboard Extendor: A clipboard monitoring tool. 

Custom ScrollBar: Scroll Bar made with GDI+, user can use bitmaps instead. RestrictEdit_SRE: Restrict text in an Edit Control through a Regular Expression.

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