VERSION 5.00 Object = "{EF6F6AB3-C2B2-11D3-8E15-B3780236B732}#1.0#0"; "UNZIPPER.OCX" Begin VB.Form frmInstallZillas Appearance = 0 'Flat BackColor = &H80000005& Caption = "Installing/Updating Zillas" ClientHeight = 6360 ClientLeft = -11355 ClientTop = 2010 ClientWidth = 9360 LinkTopic = "Form1" Picture = "InstallZillasChanged.frx":0000 ScaleHeight = 6360 ScaleWidth = 9360 StartUpPosition = 2 'CenterScreen Begin VB.DriveListBox drviPodDrive BeginProperty Font Name = "Courier New" Size = 12 Charset = 0 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty ForeColor = &H80000001& Height = 390 Left = 1320 TabIndex = 7 Top = 2160 Width = 1575 End Begin UnZipper.UnZip progUnzipper Left = 8760 Top = 240 _ExtentX = 661 _ExtentY = 661 End Begin VB.Label lblInvisibleDrive BackStyle = 0 'Transparent Caption = "[Invisible Drive Label]" Height = 375 Left = 7920 TabIndex = 8 Top = 840 Visible = 0 'False Width = 1335 End Begin VB.Label lblChooseZilla BackStyle = 0 'Transparent Caption = "Choose the Zilla you want to install/update, select your drive, then click next:" BeginProperty Font Name = "Courier New" Size = 15.75 Charset = 0 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty Height = 975 Left = 1200 TabIndex = 6 Top = 960 Width = 7575 End Begin VB.Label lblChoice BackStyle = 0 'Transparent Caption = "[Invisible Choice]" Height = 375 Left = 7920 TabIndex = 5 Top = 1320 Visible = 0 'False Width = 1335 End Begin VB.Label lblZillaZero BackStyle = 0 'Transparent Caption = "ZillaZero" BeginProperty Font Name = "Courier New" Size = 15.75 Charset = 0 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty Height = 495 Left = 4440 TabIndex = 4 Top = 4680 Width = 2055 End Begin VB.Label lblTripleThreat BackStyle = 0 'Transparent Caption = "Triple Threat" BeginProperty Font Name = "Courier New" Size = 15.75 Charset = 0 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty Height = 495 Left = 4440 TabIndex = 3 Top = 4080 Width = 2775 End Begin VB.Label lblPodzilla2Only BackStyle = 0 'Transparent Caption = "Podzilla 2" BeginProperty Font Name = "Courier New" Size = 15.75 Charset = 0 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty Height = 495 Left = 4440 TabIndex = 2 Top = 3480 Width = 2175 End Begin VB.Label lblFloydOnly BackStyle = 0 'Transparent Caption = "Floydzilla" BeginProperty Font Name = "Courier New" Size = 15.75 Charset = 0 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty Height = 495 Left = 4440 TabIndex = 1 Top = 2880 Width = 2175 End Begin VB.Label lblPodzilla0Only BackStyle = 0 'Transparent Caption = "Podzilla" BeginProperty Font Name = "Courier New" Size = 15.75 Charset = 0 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty Height = 495 Left = 4440 TabIndex = 0 Top = 2280 Width = 1815 End Begin VB.Image cmdNext Height = 600 Left = 7440 Picture = "InstallZillasChanged.frx":18663 Stretch = -1 'True Top = 5520 Width = 1620 End Begin VB.Image cmdExit Height = 600 Left = 240 Picture = "InstallZillasChanged.frx":1C64A Stretch = -1 'True Top = 5520 Width = 1620 End End Attribute VB_Name = "frmInstallZillas" Attribute VB_GlobalNameSpace = False Attribute VB_Creatable = False Attribute VB_PredeclaredId = True Attribute VB_Exposed = False 'iPodLinux iPod nano Installer 'Program written by Philip Peng [Keripo] 'Graphics created by Philip Peng 'Project written for Mr. Benam '2006/4/18 'Credits: 'Unzipping program (progUnzipper) created by ' Tony Wilson, TonysComp, (tonyscomp@europe.com) ' http://www.vbcode.com/Asp/showzip.asp?ZipFile=http%3A%2F%2Fwww%2Evbcode%2Ecom%2Fcode%2Funzipper%2Ezip&theID=1197 ' See Form1 for original program and comments 'Original downloading code snippet by ' Raghunandan Satyanarayan, (bvn_raghu@yahoo.com) ' http://www.vbcode.com/Asp/showsn.asp?theID=10601 ' See "cmdNext" coding for original coding 'Original folder creating code by ' Lio, (http://milanosoft.cjb.net) ' http://www.developerfusion.co.uk/show/1867/ ' Heavily modified to shorten. ' See "Form_Load()" for original coding Option Explicit 'The zilla you want to download and use Public strZillaChoice As String 'The drive chosen for your iPod Public strDrive As String 'The final destination of the unzipped files Public strFinishFolder As String 'Downloading function as function Private Declare Function functURLDownloadToFile Lib "urlmon" Alias "URLDownloadToFileA" (ByVal pCaller As Long, ByVal szURL As String, ByVal szFileName As String, ByVal dwReserved As Long, ByVal lpfnCB As Long) As Long 'Downloading functions coding Public Function functDownloadFile(URL As String, LocalFilename As String) As Boolean Dim lngRetVal As Long lngRetVal = functURLDownloadToFile(0, URL, LocalFilename, 0, 0) If lngRetVal = 0 Then 'Indicates the file was downloaded from the hardcoded url MsgBox "File was downloaded successfully! Click OK", vbExclamation, " Download Successful" Else 'Shouldn't happen unless the url does work MsgBox "There was a error downloading the file. Make sure that the url is valid and try again!", vbCritical, " Error" End If End Function 'Un-underlines all the choices function Public Function functClearUnderlinin() As Boolean lblPodzilla0Only.Font.Underline = False lblFloydOnly.Font.Underline = False lblPodzilla2Only.Font.Underline = False lblTripleThreat.Font.Underline = False lblZillaZero.Font.Underline = False End Function Private Sub cmdBack_Click() 'Go back to the Main frmMainScreen.Show Unload Me End Sub Private Sub cmdExit_Click() 'Shows the Exit - Yes/No form for stopping installation and ' returning to Main frmExitYesNo.Show End Sub Private Sub cmdNext_Click() 'Sets the final location of where the files will b placed ' (the root of your iPod drive) 'Retrieves the drive letter strDrive = lblInvisibleDrive.Caption 'Where to place the files (drive-letter:\) strFinishFolder = strDrive + "\" 'Which podzilla is chosen 'Where the zip can be found (I uploaded the first two for ' convenince) and download it to "/Files" folder where ' this .exe is located 'Unzips the .zip file in "/Files" to your iPod's root ' '====== ' 'Original downloading code by Raghunandan Satyanarayan 'http://www.vbcode.com/Asp/showsn.asp?theID=10601 ' 'Task: Downloads any file from the given URL to a local path specified. 'Declarations 'Private Declare Function URLDownloadToFile Lib "urlmon" Alias '"URLDownloadToFileA" _ ' (ByVal pCaller As Long, ByVal szURL As String, ByVal szFileName As 'String, _ ' ByVal dwReserved As Long, ByVal lpfnCB As Long) As Long ' 'Code: 'Public Function DownloadFile(URL As String, LocalFilename As String) As 'Boolean ' Dim lngRetVal As Long ' ' lngRetVal = URLDownloadToFile(0, URL, LocalFilename, 0, 0) ' If lngRetVal = 0 Then DownloadFile = True ' 'End Function ' 'Private Sub Command1_Click() ' DownloadFile '"http://www.visualbuilder.com/images/visualbuilder_logo1.gif", '"c:\temp\Temp.gif" ' 'End Sub ' '===== ' If lblChoice.Caption = "Podzilla (Original) Only" Then functDownloadFile "http://www.freewebs.com/keripo2/Podzilla0.zip", "Files\Podzilla0Only.zip" progUnzipper.InputFile = "Files\Podzilla0Only.zip" progUnzipper.OutputFolder = strFinishFolder progUnzipper.Go ElseIf lblChoice.Caption = "Floydzilla Only" Then functDownloadFile "http://www.freewebs.com/keripo2/Floydzilla.zip", "Files\FloydzillaOnly.zip" progUnzipper.InputFile = "Files\FloydzillaOnly.zip" progUnzipper.OutputFolder = strFinishFolder progUnzipper.Go ElseIf lblChoice.Caption = "Podzilla 2 Only" Then functDownloadFile "http://www.freewebs.com/keripo2/Podzilla2.zip", "Files\Podzilla2Only.zip" progUnzipper.InputFile = "Files\Podzilla2Only.zip" progUnzipper.OutputFolder = strFinishFolder progUnzipper.Go ElseIf lblChoice.Caption = "Triple Threat" Then functDownloadFile "http://www.kreativekorp.com/ipl/triplepz.zip", "Files\TripleThreat.zip" progUnzipper.InputFile = "Files\TripleThreat.zip" progUnzipper.OutputFolder = strFinishFolder progUnzipper.Go ElseIf lblChoice.Caption = "Zilla Zero" Then MsgBox "Sorry, Zilla Zero won't work right now until I find a permanent url" ' 'I (Philip Peng) am the creator of Zilla Zero. ' Right now, because of its size, I have yet to find suitable ' hosting for the 20 mb .zip file (I had to resort to general ' file uploaders so others could alpha test it) and thus cannot ' get a set url to download from, so this installation is not ' included. It possibly might next week as someone's offering ' me hosting, but until then, this will not be activated. ' 'functDownloadFile "http://www05.megaupload.com/files/736cdaef6047e082990dcdb6dc8ae275/ZillaZero%20Alpha%200.2.zip", "Files\ZeroZilla.zip" 'progUnzipper.InputFile = "Files\ZeroZillaAlpha.zip" 'progUnzipper.OutputFolder = strFinishFolder 'progUnzipper.Go Else 'If the user didn't select and zilla to install MsgBox "Error! You didn't choose a Zilla!" End If frmInstallZillas2.Show Unload Me End Sub Private Sub drviPodDrive_Change() 'The invisible label retrieves the drive letter lblInvisibleDrive.Caption = drviPodDrive.Drive End Sub Private Sub Form_Load() 'Checks to see if there is the folder ' "/Files" in the same folder this .exe is located 'If the folder does not exist, it is created, ' but if it already exists, this is not executed. ' '===== ' 'Original folder making code by Lio ' http://www.developerfusion.co.uk/show/1867/ 'Public Function CreateFolder(destDir As String) As Boolean ' ' Dim i As Long ' Dim prevDir As String ' ' On Error Resume Next ' ' For i = Len(destDir) To 1 Step -1 ' If Mid(destDir, i, 1) = "\" Then ' prevDir = Left(destDir, i - 1) ' Exit For ' End If ' Next i ' ' If prevDir = "" Then CreateFolder = False: Exit Function ' If Not Len(Dir(prevDir & "\", vbDirectory)) > 0 Then ' If Not CreateFolder(prevDir) Then CreateFolder = False: Exit Function ' End If ' ' On Error GoTo errDirMake ' MkDir destDir ' CreateFolder = True ' Exit Function ' 'errDirMake: ' CreateFolder = False ' 'End Function ' 'Example: 'If CreateFolder("C:\Folder1\Folder2\Folder3\") Then ' MsgBox "Folder Creation successful!" 'Else ' MsgBox "Folder Creation failed!" 'End If ' '===== ' Dim functFolderCheck Dim strfolder As String strfolder = "Files" Set functFolderCheck = CreateObject("Scripting.FileSystemObject") If Not functFolderCheck.FolderExists(strfolder) Then functFolderCheck.CreateFolder (strfolder) End If 'At startup, the zilla choice is none lblChoice.Caption = "" 'Sets the retrieving drive caption to the default chosen drive lblInvisibleDrive.Caption = drviPodDrive.Drive End Sub Private Sub lblPodzilla0Only_Click() 'Underlines only this option and sets this zilla to be ' the one to be downloaded and installed functClearUnderlinin lblPodzilla0Only.Font.Underline = True strZillaChoice = "Podzilla (Original) Only" lblChoice.Caption = strZillaChoice End Sub Private Sub lblFloydOnly_Click() 'Underlines only this option and sets this zilla to be ' the one to be downloaded and installed functClearUnderlinin lblFloydOnly.Font.Underline = True strZillaChoice = "Floydzilla Only" lblChoice.Caption = strZillaChoice End Sub Private Sub lblPodzilla2Only_Click() 'Underlines only this option and sets this zilla to be ' the one to be downloaded and installed functClearUnderlinin lblPodzilla2Only.Font.Underline = True strZillaChoice = "Podzilla 2 Only" lblChoice.Caption = strZillaChoice End Sub Private Sub lblTripleThreat_Click() 'Underlines only this option and sets this zilla to be ' the one to be downloaded and installed functClearUnderlinin lblTripleThreat.Font.Underline = True strZillaChoice = "Triple Threat" lblChoice.Caption = strZillaChoice End Sub Private Sub lblZillaZero_Click() 'Underlines only this option and sets this zilla to be ' the one to be downloaded and installed functClearUnderlinin lblZillaZero.Font.Underline = True strZillaChoice = "Zilla Zero" lblChoice.Caption = strZillaChoice End Sub