Hacking WiiFlow - an open source GUI USB-Loader

  • Thread starter Thread starter zorglub07
  • Start date Start date
  • Views Views 3,107,406
  • Replies Replies 16,228
  • Likes Likes 6
I cant write it often enough I suppose that they wont be a weekly release this time because of broken channel launching :P
 
better yes, still not my thing, but yes, much better.

perhaps make a seperate settings button and a extra gui to hide that shit, much cleaner that way, but hee, thats just nitpicking :P

also , noticed a bug, the paths to the roms are writting wrong, it starst with "wiiflow\plugins\vbagx" then it ends with "/roms"

making it "wiiflow\plugins\vbagx/roms"

those slashes are weird xd
 
better yes, still not my thing, but yes, much better.

perhaps make a seperate settings button and a extra gui to hide that shit, much cleaner that way, but hee, thats just nitpicking :P

also , noticed a bug, the paths to the roms are writting wrong, it starst with "wiiflowpluginsvbagx" then it ends with "/roms"

making it "wiiflowpluginsvbagx/roms"

those slashes are weird xd

Thanks ;)

I've seen your Koda Gui, can you please edit this code, It is difficult to adjust all Boutton (X/Y cord) to get a cleaner Gui.

Code:
#include 
#include 
#include 
#include 
#include 
#include 

GUICreate("WiiFlow MOD Installer", 750, 320, -1, -1)
GUICtrlCreateGroup("Roms folders", 5, 5, 350, 170)
$fceugxlabel = GUICtrlCreateLabel("fceugx :", 10, 20, 100, 20, $SS_CENTERIMAGE)
GUICtrlSetFont(-1, 12, 400)
GUICtrlSetColor(-1, 0x000FFF)
$fceugxFolder = GUICtrlCreateButton("•••", 110, 20, 40, 20)
$fceugxFolderinput = GUICtrlCreateInput("WiiFlow\Plugins\fceugx\roms", 150, 20, 200, 20, BitOR($ES_READONLY, $ES_AUTOHSCROLL))

$snes9xgxlabel = GUICtrlCreateLabel("snes9xgx :", 10, 45, 100, 20, $SS_CENTERIMAGE)
GUICtrlSetFont(-1, 12, 400)
GUICtrlSetColor(-1, 0x000FFF)
$snes9xgxFolder = GUICtrlCreateButton("•••", 110, 45, 40, 20)
$snes9xgxFolderinput = GUICtrlCreateInput("WiiFlow\Plugins\snes9xgx\roms", 150, 45, 200, 20, BitOR($ES_READONLY, $ES_AUTOHSCROLL))

$wii64label = GUICtrlCreateLabel("wii64 :", 10, 70, 100, 20, $SS_CENTERIMAGE)
GUICtrlSetFont(-1, 12, 400)
GUICtrlSetColor(-1, 0x000FFF)
$wii64Folder = GUICtrlCreateButton("•••", 110, 70, 40, 20)
$wii64Folderinput = GUICtrlCreateInput("WiiFlow\Plugins\wii64\roms", 150, 70, 200, 20, BitOR($ES_READONLY, $ES_AUTOHSCROLL))

$vbagxlabel = GUICtrlCreateLabel("vbagx :", 10, 95, 100, 20, $SS_CENTERIMAGE)
GUICtrlSetFont(-1, 12, 400)
GUICtrlSetColor(-1, 0x000FFF)
$vbagxFolder = GUICtrlCreateButton("•••", 110, 95, 40, 20)
$vbagxFolderinput = GUICtrlCreateInput("WiiFlow\Plugins\vbagx\roms", 150, 95, 200, 20, BitOR($ES_READONLY, $ES_AUTOHSCROLL))

$genplusgxlabel = GUICtrlCreateLabel("genplusgx :", 10, 120, 100, 20, $SS_CENTERIMAGE)
GUICtrlSetFont(-1, 12, 400)
GUICtrlSetColor(-1, 0x000FFF)
$genplusgxFolder = GUICtrlCreateButton("•••", 110, 120, 40, 20)
$genplusgxFolderinput = GUICtrlCreateInput("WiiFlow\Plugins\genplusgx\roms", 150, 120, 200, 20, BitOR($ES_READONLY, $ES_AUTOHSCROLL))

$scummvmlabel = GUICtrlCreateLabel("scummvm :", 10, 145, 100, 20, $SS_CENTERIMAGE)
GUICtrlSetFont(-1, 12, 400)
GUICtrlSetColor(-1, 0x000FFF)
$scummvmFolder = GUICtrlCreateButton("•••", 110, 145, 40, 20)
$scummvmFolderinput = GUICtrlCreateInput("WiiFlow\Plugins\scummvm\roms", 150, 145, 200, 20, BitOR($ES_READONLY, $ES_AUTOHSCROLL))

GUICtrlCreateGroup("", 360, 5, 380, 170)
GUICtrlCreateLabel("Language : ", 370, 20, 80, 20, $SS_CENTERIMAGE)
GUICtrlSetFont(-1, 12, 400)
GUICtrlSetColor(-1, 0x000FFF)

$HomebrewTypeBootDOLLanguage = GUICtrlCreateCombo("", 450, 20, 65, 20, BitOR($CBS_DROPDOWNLIST, $CBS_AUTOHSCROLL))
GUICtrlSetData($HomebrewTypeBootDOLLanguage, "EN|FR|DE|ES|IT|NL|PT|RU|JA|KO|ZHCN|ZHTW", "EN")

GUICtrlCreateLabel("Transfered : ", 525, 20, 80, 20, $SS_CENTERIMAGE)
GUICtrlSetFont(-1, 12, 400)
GUICtrlSetColor(-1, 0x000FFF)
$HomebrewListViewTransferedUnformated = GUICtrlCreateLabel("0", 605, 20, 100, 20, $SS_CENTERIMAGE)
GUICtrlSetState(-1, $GUI_HIDE)
$HomebrewListViewTransfered = GUICtrlCreateLabel("00.00 B", 605, 20, 130, 20, $SS_CENTERIMAGE)
GUICtrlSetFont(-1, 12, 600)
GUICtrlSetColor(-1, 0xff0000)

$WiiFlowModCurrentVersion = GUICtrlCreateLabel("Wiiflow Mod Current Version :", 370, 95, 180, 20, $SS_CENTERIMAGE)
GUICtrlSetFont(-1, 10, 400)
GUICtrlSetColor(-1, 0x04920C)

$WiiFlowModCurrentVersionNumber = GUICtrlCreateLabel("Unknown", 550, 95, 90, 20, $SS_CENTERIMAGE)
GUICtrlSetFont(-1, 12, 600)
GUICtrlSetColor(-1, 0x04920C)

$WiiFlowModCurrentVersionUpdate = GUICtrlCreateButton("Update", 640, 95, 90, 25)

$SavetoBTN = GUICtrlCreateButton("Save to : ", 370, 49, 60, 27)
$SavetoInput = GUICtrlCreateInput(@ScriptDir, 430, 50, 300, 25, BitOR($ES_READONLY, $ES_AUTOHSCROLL))

$DownloadBTN = GUICtrlCreateButton("Download", 370, 140, 175, 25)
GUICtrlSetFont(-1, 10, 600)

$CancelBTN = GUICtrlCreateButton("Cancel", 555, 140, 175, 25)
GUICtrlSetFont(-1, 10, 600)

$State = GUICtrlCreateLabel("State", 10, 190, 730, 20, BitOR($SS_CENTER, $SS_CENTERIMAGE))
$LogInput = GUICtrlCreateList("Log", 10, 210, 730, 100)

GUISetState(@SW_SHOW)

While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit

EndSwitch
WEnd
 
@Damian666 that's all for today! :(

Download version 1.1 http://www.mediafire.com/?cuo1adyv3ed7l3q ;)

wiiflowinstaller1.png


wifflowinstaller2.png


Source:
Code:
#NoTrayIcon
#Region ;**** Directives created by AutoIt3Wrapper_GUI ****
#AutoIt3Wrapper_Version=beta
#AutoIt3Wrapper_icon=Logo.ico
#AutoIt3Wrapper_outfile=WiiFlow Installer v1.1.exe
#AutoIt3Wrapper_UseUpx=n
#AutoIt3Wrapper_Res_Comment=WiiFlow Installer
#AutoIt3Wrapper_Res_Description=WiiFlow Installer
#AutoIt3Wrapper_Res_Fileversion=1.1.0.0
#AutoIt3Wrapper_Res_ProductVersion=1.1.0.0
#AutoIt3Wrapper_Res_LegalCopyright=Copyright © 2009 - © 2012 Spayrosam (Samir.L)
#AutoIt3Wrapper_Res_Field=CompanyName|Spayrosam
#AutoIt3Wrapper_Res_Field=ProductName|WiiFlow Installer
#AutoIt3Wrapper_Res_Field=ProductVersion|1.1.0.0
#AutoIt3Wrapper_Res_Field=WiiFlow Installer|1.1.0.0
#AutoIt3Wrapper_Run_AU3Check=n
#EndRegion ;**** Directives created by AutoIt3Wrapper_GUI ****

#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
#include <GUIListBox.au3>
#include <GuiComboBoxEx.au3>
#include <Crypt.au3>
#include <Timers.au3>

Global $CancelBTNCancelState = 0
$Gui = GUICreate("WiiFlow MOD Installer", 750, 320, -1, -1)
GUICtrlCreateGroup("Roms folders", 5, 5, 350, 170)
$fceugxlabel = GUICtrlCreateLabel("fceugx :", 10, 20, 100, 20, $SS_CENTERIMAGE)
GUICtrlSetFont(-1, 12, 400)
GUICtrlSetColor(-1, 0x000FFF)
$fceugxFolder = GUICtrlCreateButton("&#8226;&#8226;&#8226;", 110, 20, 40, 20)
$fceugxFolderinput = GUICtrlCreateInput("WiiFlow\Plugins\fceugx\roms", 150, 20, 200, 20, $ES_AUTOHSCROLL)

$snes9xgxlabel = GUICtrlCreateLabel("snes9xgx :", 10, 45, 100, 20, $SS_CENTERIMAGE)
GUICtrlSetFont(-1, 12, 400)
GUICtrlSetColor(-1, 0x000FFF)
$snes9xgxFolder = GUICtrlCreateButton("&#8226;&#8226;&#8226;", 110, 45, 40, 20)
$snes9xgxFolderinput = GUICtrlCreateInput("WiiFlow\Plugins\snes9xgx\roms", 150, 45, 200, 20, $ES_AUTOHSCROLL)

$wii64label = GUICtrlCreateLabel("wii64 :", 10, 70, 100, 20, $SS_CENTERIMAGE)
GUICtrlSetFont(-1, 12, 400)
GUICtrlSetColor(-1, 0x000FFF)
$wii64Folder = GUICtrlCreateButton("&#8226;&#8226;&#8226;", 110, 70, 40, 20)
$wii64Folderinput = GUICtrlCreateInput("WiiFlow\Plugins\wii64\roms", 150, 70, 200, 20, $ES_AUTOHSCROLL)

$vbagxlabel = GUICtrlCreateLabel("vbagx :", 10, 95, 100, 20, $SS_CENTERIMAGE)
GUICtrlSetFont(-1, 12, 400)
GUICtrlSetColor(-1, 0x000FFF)
$vbagxFolder = GUICtrlCreateButton("&#8226;&#8226;&#8226;", 110, 95, 40, 20)
$vbagxFolderinput = GUICtrlCreateInput("WiiFlow\Plugins\vbagx\roms", 150, 95, 200, 20, $ES_AUTOHSCROLL)

$genplusgxlabel = GUICtrlCreateLabel("genplusgx :", 10, 120, 100, 20, $SS_CENTERIMAGE)
GUICtrlSetFont(-1, 12, 400)
GUICtrlSetColor(-1, 0x000FFF)
$genplusgxFolder = GUICtrlCreateButton("&#8226;&#8226;&#8226;", 110, 120, 40, 20)
$genplusgxFolderinput = GUICtrlCreateInput("WiiFlow\Plugins\genplusgx\roms", 150, 120, 200, 20, $ES_AUTOHSCROLL)

$scummvmlabel = GUICtrlCreateLabel("scummvm :", 10, 145, 100, 20, $SS_CENTERIMAGE)
GUICtrlSetFont(-1, 12, 400)
GUICtrlSetColor(-1, 0x000FFF)
$scummvmFolder = GUICtrlCreateButton("&#8226;&#8226;&#8226;", 110, 145, 40, 20)
$scummvmFolderinput = GUICtrlCreateInput("WiiFlow\Plugins\scummvm\roms", 150, 145, 200, 20, $ES_AUTOHSCROLL)

GUICtrlCreateGroup("", 360, 5, 380, 170)
GUICtrlCreateLabel("Language : ", 370, 20, 80, 20, $SS_CENTERIMAGE)
GUICtrlSetFont(-1, 12, 400)
GUICtrlSetColor(-1, 0x000FFF)

$HomebrewTypeBootDOLLanguage = GUICtrlCreateCombo("", 450, 20, 65, 20, BitOR($CBS_DROPDOWNLIST, $CBS_AUTOHSCROLL))
GUICtrlSetData($HomebrewTypeBootDOLLanguage, "EN|FR|DE|ES|IT|NL|PT|RU|JA|KO|ZHCN|ZHTW", "EN")

GUICtrlCreateLabel("Transfered : ", 525, 20, 80, 20, $SS_CENTERIMAGE)
GUICtrlSetFont(-1, 12, 400)
GUICtrlSetColor(-1, 0x000FFF)
$HomebrewListViewTransferedUnformated = GUICtrlCreateLabel("0", 605, 20, 100, 20, $SS_CENTERIMAGE)
GUICtrlSetState(-1, $GUI_HIDE)
$HomebrewListViewTransfered = GUICtrlCreateLabel("00.00 B", 605, 20, 130, 20, $SS_CENTERIMAGE)
GUICtrlSetFont(-1, 12, 600)
GUICtrlSetColor(-1, 0xff0000)

$WiiFlowModCurrentVersion = GUICtrlCreateLabel("Wiiflow Mod Current Version :", 370, 95, 180, 20, $SS_CENTERIMAGE)
GUICtrlSetFont(-1, 10, 400)
GUICtrlSetColor(-1, 0x04920C)

$WiiFlowModCurrentVersionNumber = GUICtrlCreateLabel("Unknown", 550, 95, 90, 20, $SS_CENTERIMAGE)
GUICtrlSetFont(-1, 12, 600)
GUICtrlSetColor(-1, 0x04920C)

$WiiFlowModCurrentVersionUpdate = GUICtrlCreateButton("Update", 640, 95, 90, 25)

$SavetoBTN = GUICtrlCreateButton("Save to : ", 370, 49, 60, 27)
$SavetoInput = GUICtrlCreateInput(@ScriptDir, 430, 50, 300, 25, BitOR($ES_READONLY, $ES_AUTOHSCROLL))

$DownloadBTN = GUICtrlCreateButton("Download", 370, 140, 175, 25)
GUICtrlSetFont(-1, 10, 600)

$CancelBTN = GUICtrlCreateButton("Cancel", 555, 140, 175, 25)
GUICtrlSetFont(-1, 10, 600)

$State = GUICtrlCreateLabel("State", 10, 190, 730, 20, BitOR($SS_CENTER, $SS_CENTERIMAGE))
$LogInput = GUICtrlCreateList("", 10, 210, 730, 100)

GUIRegisterMsg($WM_COMMAND, "_WM_COMMAND")
GUISetState(@SW_SHOW)

While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit

Case $fceugxFolder
Local $path = FileSelectFolder("Choose a folder. (fceugx roms)", @DesktopDir, 1, "", $Gui)
If @[member='Error 917']<> 1 Then
If StringRegExpReplace($path, "^.*\\(.*)$", "$1") <> "" Then; "Nand" Then
GUICtrlSetData($fceugxFolderinput, StringRegExpReplace($path, ".\:\\\\|.\:\\", ""))
EndIf
EndIf

Case $snes9xgxFolder
Local $path = FileSelectFolder("Choose a folder. (snes9xgx roms)", @DesktopDir, 1, "", $Gui)
If @[member='Error 917']<> 1 Then
If StringRegExpReplace($path, "^.*\\(.*)$", "$1") <> "" Then; "Nand" Then
GUICtrlSetData($snes9xgxFolderinput, StringRegExpReplace($path, ".\:\\\\|.\:\\", ""))
EndIf
EndIf

Case $wii64Folder
Local $path = FileSelectFolder("Choose a folder. (wii64 roms)", @DesktopDir, 1, "", $Gui)
If @[member='Error 917']<> 1 Then
If StringRegExpReplace($path, "^.*\\(.*)$", "$1") <> "" Then; "Nand" Then
GUICtrlSetData($wii64Folderinput, StringRegExpReplace($path, ".\:\\\\|.\:\\", ""))
EndIf
EndIf

Case $vbagxFolder
Local $path = FileSelectFolder("Choose a folder. (vbagx roms)", @DesktopDir, 1, "", $Gui)
If @[member='Error 917']<> 1 Then
If StringRegExpReplace($path, "^.*\\(.*)$", "$1") <> "" Then; "Nand" Then
GUICtrlSetData($vbagxFolderinput, StringRegExpReplace($path, ".\:\\\\|.\:\\", ""))
EndIf
EndIf

Case $genplusgxFolder
Local $path = FileSelectFolder("Choose a folder. (genplusgx roms)", @DesktopDir, 1, "", $Gui)
If @[member='Error 917']<> 1 Then
If StringRegExpReplace($path, "^.*\\(.*)$", "$1") <> "" Then; "Nand" Then
GUICtrlSetData($genplusgxFolderinput, StringRegExpReplace($path, ".\:\\\\|.\:\\", ""))
EndIf
EndIf

Case $scummvmFolder
Local $path = FileSelectFolder("Choose a folder. (scummvm roms)", @DesktopDir, 1, "", $Gui)
If @[member='Error 917']<> 1 Then
If StringRegExpReplace($path, "^.*\\(.*)$", "$1") <> "" Then; "Nand" Then
GUICtrlSetData($scummvmFolderinput, StringRegExpReplace($path, ".\:\\\\|.\:\\", ""))
EndIf
EndIf

Case $DownloadBTN
GUICtrlSetState($DownloadBTN, $GUI_DISABLE)
GUICtrlSetData($HomebrewListViewTransferedUnformated, "0")
GUICtrlSetData($HomebrewListViewTransfered, "00.00 B")
$CancelBTNCancelState = 0
$ReturnedMSG = _CurrentUSBWiiflowURL(@ScriptDir, $State, 0)
MsgBox(64, "Wiiflow Mod Installer", $ReturnedMSG, -1, $Gui)
GUICtrlSetState($DownloadBTN, $GUI_ENABLE)
Case $WiiFlowModCurrentVersionUpdate
GUICtrlSetState($WiiFlowModCurrentVersionUpdate, $GUI_DISABLE)
GUICtrlSetData($HomebrewListViewTransferedUnformated, "0")
GUICtrlSetData($HomebrewListViewTransfered, "00.00 B")
$CancelBTNCancelState = 0
_CurrentUSBWiiflowURL(@ScriptDir, $State, 1, 1)
GUICtrlSetState($WiiFlowModCurrentVersionUpdate, $GUI_ENABLE)
EndSwitch
WEnd

Func _WM_COMMAND($hWnd, $nMsg, $wParam, $lParam)
Local $CancelBTNButton = GUICtrlGetHandle($CancelBTN)
Switch $lParam
Case $CancelBTNButton
$CancelBTNCancelState = 1
EndSwitch
EndFunc   ;==>_WM_COMMAND

Func _CurrentUSBWiiflowURL($SaveCurrentUSBWiiflow, $CurrentUSBWiiflowState, $CurrentUSBWiiflow_ListN = -1, $CurrentUSBWiiflow_DownType = 0)
$startGeneratetime = _Timer_Init()
Local $CurrentUSBWiiflowSize = 0, $ReturnCurrentUSBWiiflowURL = ""

FileDelete(@TempDir & "\USBWiiflowupdate.xml")
Local $hDownload = InetGet("http://code.google.com/p/open-wiiflow-mod/downloads/list", @TempDir & "\USBWiiflowupdate.xml", 1, 1) ;Download Header
Do
Sleep(250)
Until InetGetInfo($hDownload, 2)
InetClose($hDownload)

$GetCurrentUSBWiiflowURL = FileRead(@TempDir & "\USBWiiflowupdate.xml")
FileClose($GetCurrentUSBWiiflowURL)
FileDelete(@TempDir & "\USBWiiflowupdate.xml") ;Clean

$StringCurrentUSBWiiflowVersion = _splitInfo($GetCurrentUSBWiiflowURL, 'open\-wiiflow\-mod\.googlecode\.com\/files\/Wiiflow\_Mod([^*]*?)\.zip', 1)
$UpdateUSBWiiflowURL = "http://open-wiiflow-mod.googlecode.com/files/Wiiflow_Mod" & $StringCurrentUSBWiiflowVersion & ".zip"

FileDelete(@TempDir & "\SHA1ChecksumURL")
Local $hDownload = InetGet("http://code.google.com/p/open-wiiflow-mod/downloads/detail?name=" & StringRegExpReplace($UpdateUSBWiiflowURL, "^.*/(.*)$", "$1"), @TempDir & "\SHA1ChecksumURL", 1, 1)
Do
Sleep(250)
Until InetGetInfo($hDownload, 2)
InetClose($hDownload)

$GetSHA1ChecksumURL = FileRead(@TempDir & "\SHA1ChecksumURL")
FileClose($GetSHA1ChecksumURL)
FileDelete(@TempDir & "\SHA1ChecksumURL") ;Clean
$StringSHA1ChecksumURL = _splitInfo($GetSHA1ChecksumURL, "SHA1 Checksum\: ([^*]*?)What\'s this\?", 1)
$StringSHA1Checksum = _splitInfo($StringSHA1ChecksumURL, "\> ([^*]*?) \<", 1)
$UpdateUSBWiiflowRelease = StringRegExpReplace($StringCurrentUSBWiiflowVersion, "_|svn", "")

;==============Pugins
Global $GCWiiFlowPlugInsUpdate[6][3]
FileDelete(@TempDir & "\USBWiiflowupdatePlugins.xml")
Local $hDownload = InetGet("http://open-wiiflow-mod.googlecode.com/svn/branches/Plugins/Binaries/", @TempDir & "\USBWiiflowupdatePlugins.xml", 1, 1) ;Download Header
Do
Sleep(250)
Until InetGetInfo($hDownload, 2)
InetClose($hDownload)

$GetCurrentUSBWiiflowPlugIns = FileRead(@TempDir & "\USBWiiflowupdatePlugins.xml")
FileClose($GetCurrentUSBWiiflowPlugIns)
FileDelete(@TempDir & "\USBWiiflowupdatePlugins.xml") ;Clean

$fceugxCurrentWiiflow = _splitInfo($GetCurrentUSBWiiflowPlugIns, 'fceugx([^*]*?)\"\>fceugx', 1)
$fceugxCurrentWiiflowURL = "http://open-wiiflow-mod.googlecode.com/svn/branches/Plugins/Binaries/fceugx" & $fceugxCurrentWiiflow
$GCWiiFlowPlugInsUpdate[0][0] = $fceugxCurrentWiiflowURL
$GCWiiFlowPlugInsUpdate[0][1] = "fceugx" & $fceugxCurrentWiiflow

$genplusgxCurrentWiiflow = _splitInfo($GetCurrentUSBWiiflowPlugIns, 'genplusgx([^*]*?)\"\>genplusgx', 1)
$genplusgxCurrentWiiflowURL = "http://open-wiiflow-mod.googlecode.com/svn/branches/Plugins/Binaries/genplusgx" & $genplusgxCurrentWiiflow
$GCWiiFlowPlugInsUpdate[1][0] = $genplusgxCurrentWiiflowURL
$GCWiiFlowPlugInsUpdate[1][1] = "genplusgx" & $genplusgxCurrentWiiflow

$scummvmCurrentWiiflow = _splitInfo($GetCurrentUSBWiiflowPlugIns, 'scummvm([^*]*?)\"\>scummvm', 1)
$scummvmCurrentWiiflowURL = "http://open-wiiflow-mod.googlecode.com/svn/branches/Plugins/Binaries/scummvm" & $scummvmCurrentWiiflow
$GCWiiFlowPlugInsUpdate[2][0] = $scummvmCurrentWiiflowURL
$GCWiiFlowPlugInsUpdate[2][1] = "scummvm" & $scummvmCurrentWiiflow

$snes9xgxCurrentWiiflow = _splitInfo($GetCurrentUSBWiiflowPlugIns, 'snes9xgx([^*]*?)\"\>snes9xgx', 1)
$snes9xgxCurrentWiiflowURL = "http://open-wiiflow-mod.googlecode.com/svn/branches/Plugins/Binaries/snes9xgx" & $snes9xgxCurrentWiiflow
$GCWiiFlowPlugInsUpdate[3][0] = $snes9xgxCurrentWiiflowURL
$GCWiiFlowPlugInsUpdate[3][1] = "snes9xgx" & $snes9xgxCurrentWiiflow

$vbagxCurrentWiiflow = _splitInfo($GetCurrentUSBWiiflowPlugIns, 'vbagx([^*]*?)\"\>vbagx', 1)
$vbagxCurrentWiiflowURL = "http://open-wiiflow-mod.googlecode.com/svn/branches/Plugins/Binaries/vbagx" & $vbagxCurrentWiiflow
$GCWiiFlowPlugInsUpdate[4][0] = $vbagxCurrentWiiflowURL
$GCWiiFlowPlugInsUpdate[4][1] = "vbagx" & $vbagxCurrentWiiflow

$wii64CurrentWiiflow = _splitInfo($GetCurrentUSBWiiflowPlugIns, 'wii64([^*]*?)\"\>wii64', 1)
$wii64CurrentWiiflowURL = "http://open-wiiflow-mod.googlecode.com/svn/branches/Plugins/Binaries/wii64" & $wii64CurrentWiiflow
$GCWiiFlowPlugInsUpdate[5][0] = $wii64CurrentWiiflowURL
$GCWiiFlowPlugInsUpdate[5][1] = "wii64" & $wii64CurrentWiiflow
;===========End

ConsoleWrite(@LF & _
"- Release : " & $UpdateUSBWiiflowRelease & @LF & _
"- URL : " & $UpdateUSBWiiflowURL & @LF & _
"- USBWiiflow SHA1 Checksum : " & $StringSHA1Checksum & @LF)
GUICtrlSetData($LogInput, "- Release : " & $UpdateUSBWiiflowRelease)
GUICtrlSetData($LogInput, "- URL : " & $UpdateUSBWiiflowURL)
GUICtrlSetData($LogInput, "- USBWiiflow SHA1 Checksum : " & $StringSHA1Checksum)


GUICtrlSetData($WiiFlowModCurrentVersionNumber, $UpdateUSBWiiflowRelease)
If $CurrentUSBWiiflow_DownType > 0 Then Return

If $CancelBTNCancelState = 1 Then
GUICtrlSetData($LogInput, "Operation cancelled by user")
GUICtrlSetData($CurrentUSBWiiflowState, "Operation cancelled by user")
Return "Operation cancelled by user"
EndIf
DirCreate($SaveCurrentUSBWiiflow & "\Wiiflow\Languages")
DirCreate($SaveCurrentUSBWiiflow & "\Wiiflow\boxcovers")
DirCreate($SaveCurrentUSBWiiflow & "\Wiiflow\covers")
DirCreate($SaveCurrentUSBWiiflow & "\Wiiflow\trailers")
DirCreate($SaveCurrentUSBWiiflow & "\Wiiflow\fanart")
DirCreate($SaveCurrentUSBWiiflow & "\Wiiflow\help")
DirCreate($SaveCurrentUSBWiiflow & "\Wiiflow\settings")
DirCreate($SaveCurrentUSBWiiflow & "\Wiiflow\themes")
DirCreate($SaveCurrentUSBWiiflow & "\Wiiflow\plugins")
DirCreate($SaveCurrentUSBWiiflow & GUICtrlRead($fceugxFolderinput))
DirCreate($SaveCurrentUSBWiiflow & GUICtrlRead($snes9xgxFolderinput))
DirCreate($SaveCurrentUSBWiiflow & GUICtrlRead($wii64Folderinput))
DirCreate($SaveCurrentUSBWiiflow & GUICtrlRead($vbagxFolderinput))
DirCreate($SaveCurrentUSBWiiflow & GUICtrlRead($genplusgxFolderinput))
DirCreate($SaveCurrentUSBWiiflow & GUICtrlRead($scummvmFolderinput))
DirCreate($SaveCurrentUSBWiiflow & "\wad")

$SplitCurrentUSBWiiflow = StringSplit("arab.ini|brazilian.ini|chinese_s.ini|chinese_t.ini|danish.ini|dutch.ini|english.ini|finnish.ini|" & _
"french.ini|gallego.ini|german.ini|hungarian.ini|italian.ini|japanese.ini|norwegian.ini|" & _
"polish.ini|portuguese.ini|russian.ini|spanish.ini|swedish.ini|tagalog.ini|turkish.ini", "|")

For $ilWiiflow = 1 To $SplitCurrentUSBWiiflow[0]
Local $hDownloadSize = InetGetSize("http://open-wiiflow-mod.googlecode.com/svn/trunk/wii/wiiflow/Languages/" & $SplitCurrentUSBWiiflow[$ilWiiflow], 3)
Local $hDownload = InetGet("http://open-wiiflow-mod.googlecode.com/svn/trunk/wii/wiiflow/Languages/" & $SplitCurrentUSBWiiflow[$ilWiiflow], _
$SaveCurrentUSBWiiflow & "\Wiiflow\Languages\" & $SplitCurrentUSBWiiflow[$ilWiiflow], 1, 1)
If $CancelBTNCancelState = 1 Then
GUICtrlSetData($LogInput, "Operation cancelled by user")
GUICtrlSetData($CurrentUSBWiiflowState, "Operation cancelled by user")
Return "Operation cancelled by user"
EndIf

Do
$aInfo = InetGetInfo($hDownload)
$iPercent = StringFormat("%.2f", Round($aInfo[0] / $hDownloadSize * 100, 2))
GUICtrlSetData($CurrentUSBWiiflowState, "Download : Wiiflow Mod " & $UpdateUSBWiiflowRelease & "  " & $SplitCurrentUSBWiiflow[$ilWiiflow] & "   |   Size: " & _FormatFileSize($aInfo[1]) & "   |   Downloaded: " & _
_FormatFileSize($aInfo[0]) & " / " & _FormatFileSize($aInfo[1]) & "   |   Percent: " & $iPercent & "% ")
If $CurrentUSBWiiflow_ListN > -1 Then GUICtrlSetData($HomebrewListViewTransfered, _FormatFileSize(GUICtrlRead($HomebrewListViewTransferedUnformated) + $aInfo[0]))
Sleep(250)
Until $aInfo[2]
InetClose($hDownload)
GUICtrlSetData($LogInput, "Download : Wiiflow Mod " & $UpdateUSBWiiflowRelease & "  " & $SplitCurrentUSBWiiflow[$ilWiiflow] & " Successfully Downloaded")
$CurrentUSBWiiflowSize += FileGetSize($SaveCurrentUSBWiiflow & "\Wiiflow\Languages\" & $SplitCurrentUSBWiiflow[$ilWiiflow])
If $CurrentUSBWiiflow_ListN > -1 Then GUICtrlSetData($HomebrewListViewTransferedUnformated, GUICtrlRead($HomebrewListViewTransferedUnformated) + FileGetSize($SaveCurrentUSBWiiflow & "\Wiiflow\Languages\" & $SplitCurrentUSBWiiflow[$ilWiiflow]))
If $CancelBTNCancelState = 1 Then
GUICtrlSetData($LogInput, "Operation cancelled by user")
GUICtrlSetData($CurrentUSBWiiflowState, "Operation cancelled by user")
Return "Operation cancelled by user"
EndIf
Next

$hDownloadSize = InetGetSize("http://open-wiiflow-mod.googlecode.com/svn/trunk/wii/wiiflow/fanart/GAMEID.ini")
$hDownload = InetGet("http://open-wiiflow-mod.googlecode.com/svn/trunk/wii/wiiflow/fanart/GAMEID.ini", _
$SaveCurrentUSBWiiflow & "\Wiiflow\fanart\GAMEID.ini", 1, 1)
Do
$aInfo = InetGetInfo($hDownload)
$iPercent = StringFormat("%.2f", Round($aInfo[0] / $hDownloadSize * 100, 2))
GUICtrlSetData($CurrentUSBWiiflowState, "Download : Wiiflow Mod " & $UpdateUSBWiiflowRelease & " (fanart : GAMEID.ini)   |   Size: " & _FormatFileSize($aInfo[1]) & "   |   Downloaded: " & _
_FormatFileSize($aInfo[0]) & " / " & _FormatFileSize($aInfo[1]) & "   |   Percent: " & $iPercent & "% ")
If $CurrentUSBWiiflow_ListN > -1 Then GUICtrlSetData($HomebrewListViewTransfered, _FormatFileSize(GUICtrlRead($HomebrewListViewTransferedUnformated) + $aInfo[0]))
Sleep(250)
Until $aInfo[2]
InetClose($hDownload)
GUICtrlSetData($LogInput, "Download : Wiiflow Mod " & $UpdateUSBWiiflowRelease & "  (fanart : GAMEID.ini) Successfully Downloaded")
If $CurrentUSBWiiflow_ListN > -1 Then GUICtrlSetData($HomebrewListViewTransferedUnformated, GUICtrlRead($HomebrewListViewTransferedUnformated) + FileGetSize($SaveCurrentUSBWiiflow & "\Wiiflow\fanart\GAMEID.ini"))
$CurrentUSBWiiflowSize += FileGetSize($SaveCurrentUSBWiiflow & "\Wiiflow\fanart\GAMEID.ini")
If $CancelBTNCancelState = 1 Then
GUICtrlSetData($LogInput, "Operation cancelled by user")
GUICtrlSetData($CurrentUSBWiiflowState, "Operation cancelled by user")
Return "Operation cancelled by user"
EndIf


$hDownloadSize = InetGetSize("http://open-wiiflow-mod.googlecode.com/svn/trunk/wii/wiiflow/help/english.txt")
$hDownload = InetGet("http://open-wiiflow-mod.googlecode.com/svn/trunk/wii/wiiflow/help/english.txt", _
$SaveCurrentUSBWiiflow & "\Wiiflow\help\english.txt", 1, 1)
Do
$aInfo = InetGetInfo($hDownload)
$iPercent = StringFormat("%.2f", Round($aInfo[0] / $hDownloadSize * 100, 2))
GUICtrlSetData($CurrentUSBWiiflowState, "Download : Wiiflow Mod " & $UpdateUSBWiiflowRelease & " (help : english.txt)   |   Size: " & _FormatFileSize($aInfo[1]) & "   |   Downloaded: " & _
_FormatFileSize($aInfo[0]) & " / " & _FormatFileSize($aInfo[1]) & "   |   Percent: " & $iPercent & "% ")
If $CurrentUSBWiiflow_ListN > -1 Then GUICtrlSetData($HomebrewListViewTransfered, _FormatFileSize(GUICtrlRead($HomebrewListViewTransferedUnformated) + $aInfo[0]))
Sleep(250)
Until $aInfo[2]
GUICtrlSetData($LogInput, "Download : Wiiflow Mod " & $UpdateUSBWiiflowRelease & " (help : english.txt) Successfully Downloaded")
InetClose($hDownload)
If $CurrentUSBWiiflow_ListN > -1 Then GUICtrlSetData($HomebrewListViewTransferedUnformated, GUICtrlRead($HomebrewListViewTransferedUnformated) + FileGetSize($SaveCurrentUSBWiiflow & "\Wiiflow\help\english.txt"))
$CurrentUSBWiiflowSize += FileGetSize($SaveCurrentUSBWiiflow & "\Wiiflow\help\english.txt")
If $CancelBTNCancelState = 1 Then
GUICtrlSetData($LogInput, "Operation cancelled by user")
GUICtrlSetData($CurrentUSBWiiflowState, "Operation cancelled by user")
Return "Operation cancelled by user"
EndIf

$hDownloadSize = InetGetSize("http://open-wiiflow-mod.googlecode.com/svn/trunk/wii/wiiflow/settings/gameconfig1.ini")
$hDownload = InetGet("http://open-wiiflow-mod.googlecode.com/svn/trunk/wii/wiiflow/settings/gameconfig1.ini", _
$SaveCurrentUSBWiiflow & "\Wiiflow\settings\gameconfig1.ini", 1, 1)
Do
$aInfo = InetGetInfo($hDownload)
$iPercent = StringFormat("%.2f", Round($aInfo[0] / $hDownloadSize * 100, 2))
GUICtrlSetData($CurrentUSBWiiflowState, "Download : Wiiflow Mod " & $UpdateUSBWiiflowRelease & " (settings : gameconfig1.ini)   |   Size: " & _FormatFileSize($aInfo[1]) & "   |   Downloaded: " & _
_FormatFileSize($aInfo[0]) & " / " & _FormatFileSize($aInfo[1]) & "   |   Percent: " & $iPercent & "% ")
If $CurrentUSBWiiflow_ListN > -1 Then GUICtrlSetData($HomebrewListViewTransfered, _FormatFileSize(GUICtrlRead($HomebrewListViewTransferedUnformated) + $aInfo[0]))
Sleep(250)
Until $aInfo[2]
InetClose($hDownload)
GUICtrlSetData($LogInput, "Download : Wiiflow Mod " & $UpdateUSBWiiflowRelease & "  (settings : gameconfig1.ini) Successfully Downloaded")
If $CurrentUSBWiiflow_ListN > -1 Then GUICtrlSetData($HomebrewListViewTransferedUnformated, GUICtrlRead($HomebrewListViewTransferedUnformated) + FileGetSize($SaveCurrentUSBWiiflow & "\Wiiflow\settings\gameconfig1.ini"))
$CurrentUSBWiiflowSize += FileGetSize($SaveCurrentUSBWiiflow & "\Wiiflow\settings\gameconfig1.ini")

If $CancelBTNCancelState = 1 Then
GUICtrlSetData($LogInput, "Operation cancelled by user")
GUICtrlSetData($CurrentUSBWiiflowState, "Operation cancelled by user")
Return "Operation cancelled by user"
EndIf

$hDownloadSize = InetGetSize("http://open-wiiflow-mod.googlecode.com/svn/trunk/wii/wiiflow/settings/gameconfig2.ini")
$hDownload = InetGet("http://open-wiiflow-mod.googlecode.com/svn/trunk/wii/wiiflow/settings/gameconfig2.ini", _
$SaveCurrentUSBWiiflow & "\Wiiflow\settings\gameconfig2.ini", 1, 1)
Do
$aInfo = InetGetInfo($hDownload)
$iPercent = StringFormat("%.2f", Round($aInfo[0] / $hDownloadSize * 100, 2))
GUICtrlSetData($CurrentUSBWiiflowState, "Download : Wiiflow Mod " & $UpdateUSBWiiflowRelease & " (settings : gameconfig2.ini)   |   Size: " & _FormatFileSize($aInfo[1]) & "   |   Downloaded: " & _
_FormatFileSize($aInfo[0]) & " / " & _FormatFileSize($aInfo[1]) & "   |   Percent: " & $iPercent & "% ")
If $CurrentUSBWiiflow_ListN > -1 Then GUICtrlSetData($HomebrewListViewTransfered, _FormatFileSize(GUICtrlRead($HomebrewListViewTransferedUnformated) + $aInfo[0]))
Sleep(250)
Until $aInfo[2]
InetClose($hDownload)
GUICtrlSetData($LogInput, "Download : Wiiflow Mod " & $UpdateUSBWiiflowRelease & "  (settings : gameconfig2.ini) Successfully Downloaded")
If $CurrentUSBWiiflow_ListN > -1 Then GUICtrlSetData($HomebrewListViewTransferedUnformated, GUICtrlRead($HomebrewListViewTransferedUnformated) + FileGetSize($SaveCurrentUSBWiiflow & "\Wiiflow\settings\gameconfig2.ini"))
$CurrentUSBWiiflowSize += FileGetSize($SaveCurrentUSBWiiflow & "\Wiiflow\settings\gameconfig2.ini")

If $CancelBTNCancelState = 1 Then
GUICtrlSetData($LogInput, "Operation cancelled by user")
GUICtrlSetData($CurrentUSBWiiflowState, "Operation cancelled by user")
Return "Operation cancelled by user"
EndIf

$hDownloadSize = InetGetSize("http://open-wiiflow-mod.googlecode.com/svn/trunk/wii/wiiflow/themes/default.ini")
$hDownload = InetGet("http://open-wiiflow-mod.googlecode.com/svn/trunk/wii/wiiflow/themes/default.ini", _
$SaveCurrentUSBWiiflow & "\Wiiflow\themes\default.ini", 1, 1)
Do
$aInfo = InetGetInfo($hDownload)
$iPercent = StringFormat("%.2f", Round($aInfo[0] / $hDownloadSize * 100, 2))
GUICtrlSetData($CurrentUSBWiiflowState, "Download : Wiiflow Mod " & $UpdateUSBWiiflowRelease & " (themes : default.ini)   |   Size: " & _FormatFileSize($aInfo[1]) & "   |   Downloaded: " & _
_FormatFileSize($aInfo[0]) & " / " & _FormatFileSize($aInfo[1]) & "   |   Percent: " & $iPercent & "% ")
If $CurrentUSBWiiflow_ListN > -1 Then GUICtrlSetData($HomebrewListViewTransfered, _FormatFileSize(GUICtrlRead($HomebrewListViewTransferedUnformated) + $aInfo[0]))
Sleep(250)
Until $aInfo[2]
InetClose($hDownload)
GUICtrlSetData($LogInput, "Download : Wiiflow Mod " & $UpdateUSBWiiflowRelease & "  (themes : default.ini) Successfully Downloaded")
If $CurrentUSBWiiflow_ListN > -1 Then GUICtrlSetData($HomebrewListViewTransferedUnformated, GUICtrlRead($HomebrewListViewTransferedUnformated) + FileGetSize($SaveCurrentUSBWiiflow & "\Wiiflow\themes\default.ini"))
$CurrentUSBWiiflowSize += FileGetSize($SaveCurrentUSBWiiflow & "\Wiiflow\themes\default.ini")

If $CancelBTNCancelState = 1 Then
GUICtrlSetData($LogInput, "Operation cancelled by user")
GUICtrlSetData($CurrentUSBWiiflowState, "Operation cancelled by user")
Return "Operation cancelled by user"
EndIf

$SplitTitleCurrentUSBWiiflow = StringSplit("EN|FR|DE|ES|IT|NL|PT|RU|JA|KO|ZHCN|ZHTW", "|")

For $iTWiiflow = 1 To $SplitTitleCurrentUSBWiiflow[0]

$hDownloadSize = InetGetSize("http://www.gametdb.com/titles.txt?LANG=" & $SplitTitleCurrentUSBWiiflow[$iTWiiflow])
$hDownload = InetGet("http://www.gametdb.com/titles.txt?LANG=" & $SplitTitleCurrentUSBWiiflow[$iTWiiflow], _
$SaveCurrentUSBWiiflow & "\Wiiflow\settings\" & $SplitTitleCurrentUSBWiiflow[$iTWiiflow] & "custom_titles.ini", 1, 1)

Do
$aInfo = InetGetInfo($hDownload)
$iPercent = StringFormat("%.2f", Round($aInfo[0] / $hDownloadSize * 100, 2))
GUICtrlSetData($CurrentUSBWiiflowState, "Download : Wiiflow Mod " & $UpdateUSBWiiflowRelease & " " & $SplitTitleCurrentUSBWiiflow[$iTWiiflow] & "custom_titles.ini   |   Size: " & _FormatFileSize($aInfo[1]) & "   |   Downloaded: " & _
_FormatFileSize($aInfo[0]) & " / " & _FormatFileSize($aInfo[1]) & "   |   Percent: " & $iPercent & "% ")
If $CurrentUSBWiiflow_ListN > -1 Then GUICtrlSetData($HomebrewListViewTransfered, _FormatFileSize(GUICtrlRead($HomebrewListViewTransferedUnformated) + $aInfo[0]))
Sleep(250)
Until $aInfo[2]
InetClose($hDownload)
GUICtrlSetData($LogInput, "Download : Wiiflow Mod " & $UpdateUSBWiiflowRelease & " " & $SplitTitleCurrentUSBWiiflow[$iTWiiflow] & "custom_titles.ini Successfully Downloaded")
If $CurrentUSBWiiflow_ListN > -1 Then GUICtrlSetData($HomebrewListViewTransferedUnformated, GUICtrlRead($HomebrewListViewTransferedUnformated) + FileGetSize($SaveCurrentUSBWiiflow & "\Wiiflow\settings\" & $SplitTitleCurrentUSBWiiflow[$iTWiiflow] & "custom_titles.ini"))
$CurrentUSBWiiflowSize += FileGetSize($SaveCurrentUSBWiiflow & "\Wiiflow\settings\" & $SplitTitleCurrentUSBWiiflow[$iTWiiflow] & "custom_titles.ini")
If $SplitTitleCurrentUSBWiiflow[$iTWiiflow] = GUICtrlRead($HomebrewTypeBootDOLLanguage) Then _
FileCopy($SaveCurrentUSBWiiflow & "\Wiiflow\settings\" & $SplitTitleCurrentUSBWiiflow[$iTWiiflow] & "custom_titles.ini", $SaveCurrentUSBWiiflow & "\Wiiflow\settings\custom_titles.ini", 9)
If $CancelBTNCancelState = 1 Then
GUICtrlSetData($LogInput, "Operation cancelled by user")
GUICtrlSetData($CurrentUSBWiiflowState, "Operation cancelled by user")
Return "Operation cancelled by user"
EndIf
Next

GUICtrlSetData($CurrentUSBWiiflowState, "Download : Wiiflow Mod " & $UpdateUSBWiiflowRelease & " Boot.dol   |   " & $UpdateUSBWiiflowURL)

$DownloadCurrentUSBWiiflowSize = InetGetSize($UpdateUSBWiiflowURL)
$DownloadCurrentUSBWiiflow = InetGet($UpdateUSBWiiflowURL, $SaveCurrentUSBWiiflow & "\" & StringRegExpReplace($UpdateUSBWiiflowURL, "^.*/(.*)$", "$1"), 1, 1)
$CurrentUSBWiiflowSize += $DownloadCurrentUSBWiiflowSize

Do
$aInfo = InetGetInfo($DownloadCurrentUSBWiiflow)
$iPercent = StringFormat("%.2f", Round($aInfo[0] / $DownloadCurrentUSBWiiflowSize * 100, 2))
GUICtrlSetData($CurrentUSBWiiflowState, "Download : Wiiflow Mod " & $UpdateUSBWiiflowRelease & "   |   Size: " & _FormatFileSize($aInfo[1]) & "   |   Downloaded: " & _
_FormatFileSize($aInfo[0]) & " / " & _FormatFileSize($aInfo[1]) & "   |   Percent: " & $iPercent & "% ")
Sleep(250)
Until $aInfo[2]
InetClose($DownloadCurrentUSBWiiflow)
If $CurrentUSBWiiflow_ListN > -1 Then GUICtrlSetData($HomebrewListViewTransferedUnformated, GUICtrlRead($HomebrewListViewTransferedUnformated) + FileGetSize($SaveCurrentUSBWiiflow & "\" & StringRegExpReplace($UpdateUSBWiiflowURL, "^.*/(.*)$", "$1")))
GUICtrlSetData($CurrentUSBWiiflowState, "Successfully Downloaded   |   SHA1 Checksum: " & $StringSHA1Checksum)
GUICtrlSetData($LogInput, "Download : Wiiflow Mod " & $UpdateUSBWiiflowRelease & " (Archiv) Successfully Downloaded")

If $CancelBTNCancelState = 1 Then
GUICtrlSetData($LogInput, "Operation cancelled by user")
GUICtrlSetData($CurrentUSBWiiflowState, "Operation cancelled by user")
Return "Operation cancelled by user"
EndIf

Local $sReadSHA1 = $SaveCurrentUSBWiiflow & "\" & StringRegExpReplace($UpdateUSBWiiflowURL, "^.*/(.*)$", "$1")
If StringStripWS($sReadSHA1, 8) <> "" And FileExists($sReadSHA1) Then
Local $bHash = _Crypt_HashFile($sReadSHA1, $CALG_SHA1)
ConsoleWrite("- Found USBWiiflow SHA1 Checksum: " & $bHash & @CRLF & "- Inter USBWiiflow SHA1 Checksum: 0x" & $StringSHA1Checksum)
GUICtrlSetData($LogInput, "- Found USBWiiflow SHA1 Checksum: " & $bHash)
GUICtrlSetData($LogInput, "- Inter USBWiiflow SHA1 Checksum: 0x" & $StringSHA1Checksum)

If $bHash = "0x" & $StringSHA1Checksum Then
$ReturnCurrentUSBWiiflowURL = "Wiiflow Mod " & $UpdateUSBWiiflowRelease & " Successfully Downloaded and verified   |   SHA1 Checksum: " & $StringSHA1Checksum & "   |   " & _
StringFormat("%.2f", Round(_Timer_Diff($startGeneratetime) / 1000, 2)) & " Seconds"
GUICtrlSetData($CurrentUSBWiiflowState, $ReturnCurrentUSBWiiflowURL)
Else
$ReturnCurrentUSBWiiflowURL = "Wiiflow Mod " & $UpdateUSBWiiflowRelease & " already exists but it failed SHA1 verification.   |   SHA1 Checksum: " & $StringSHA1Checksum
GUICtrlSetData($CurrentUSBWiiflowState, $ReturnCurrentUSBWiiflowURL)
EndIf
Else
$ReturnCurrentUSBWiiflowURL = "Download : Wiiflow Mod " & $UpdateUSBWiiflowRelease & " Failed !   |   SHA1 Checksum: " & $StringSHA1Checksum
GUICtrlSetData($CurrentUSBWiiflowState, $ReturnCurrentUSBWiiflowURL)
EndIf

If $CancelBTNCancelState = 1 Then
GUICtrlSetData($LogInput, "Operation cancelled by user")
GUICtrlSetData($CurrentUSBWiiflowState, "Operation cancelled by user")
Return "Operation cancelled by user"
EndIf

;==============> download Plugins

For $iDowPlugin = 0 To 5
$hDownloadSize = InetGetSize($GCWiiFlowPlugInsUpdate[$iDowPlugin][0])
$hDownload = InetGet($GCWiiFlowPlugInsUpdate[$iDowPlugin][0], $SaveCurrentUSBWiiflow & "\Wiiflow\plugins\" & $GCWiiFlowPlugInsUpdate[$iDowPlugin][1], 1, 1)
$CurrentUSBWiiflowSize += $hDownloadSize

Do
$aInfo = InetGetInfo($hDownload)
$iPercent = StringFormat("%.2f", Round($aInfo[0] / $hDownloadSize * 100, 2))
GUICtrlSetData($CurrentUSBWiiflowState, "Download : Wiiflow Mod " & $UpdateUSBWiiflowRelease & " Plugins (" & $GCWiiFlowPlugInsUpdate[$iDowPlugin][1] & ")   |   Size: " & _FormatFileSize($aInfo[1]) & "   |   Downloaded: " & _
_FormatFileSize($aInfo[0]) & " / " & _FormatFileSize($aInfo[1]) & "   |   Percent: " & $iPercent & "% ")
If $CurrentUSBWiiflow_ListN > -1 Then GUICtrlSetData($HomebrewListViewTransfered, _FormatFileSize(GUICtrlRead($HomebrewListViewTransferedUnformated) + $aInfo[0]))
Sleep(250)

Until $aInfo[2]
InetClose($hDownload)
GUICtrlSetData($LogInput, "Download : Wiiflow Mod " & $UpdateUSBWiiflowRelease & " Plugins (" & $GCWiiFlowPlugInsUpdate[$iDowPlugin][1] & ") Successfully Downloaded")
If $CurrentUSBWiiflow_ListN > -1 Then GUICtrlSetData($HomebrewListViewTransferedUnformated, GUICtrlRead($HomebrewListViewTransferedUnformated) + FileGetSize($SaveCurrentUSBWiiflow & "\Wiiflow\plugins\" & $GCWiiFlowPlugInsUpdate[$iDowPlugin][1]))

If StringInStr($GCWiiFlowPlugInsUpdate[$iDowPlugin][1], "fceugx") <> 0 Then
$CurrentPluginFile = FileOpen($SaveCurrentUSBWiiflow & "\Wiiflow\plugins\fceugx.ini", 2)
FileWrite($CurrentPluginFile, '[PLUGIN]' & @CRLF & _
'magic=46434555' & @CRLF & _
'coverColor=ff0000' & @CRLF & _
'coverFolder=fceugx' & @CRLF & _
'fileTypes=.nes|.fds|.nsf|.unf|.nez|.unif|.zip|.7z' & @CRLF & _
'romDir=' & GUICtrlRead($fceugxFolderinput) & @CRLF & _
'dolFile=' & $GCWiiFlowPlugInsUpdate[$iDowPlugin][1] & @CRLF & _
'bannerSound=nes.ogg' & @CRLF & _
'displayname=FCEUltraGX' & @CRLF & _
'ReturnLoader=yes')
FileClose($CurrentPluginFile)
ElseIf StringInStr($GCWiiFlowPlugInsUpdate[$iDowPlugin][1], "genplusgx") <> 0 Then
$CurrentPluginFile = FileOpen($SaveCurrentUSBWiiflow & "\Wiiflow\plugins\genplus-gx.ini", 2)
FileWrite($CurrentPluginFile, '[PLUGIN]' & @CRLF & _
'magic=53454741' & @CRLF & _
'coverColor=000000' & @CRLF & _
'coverFolder=genplusgx' & @CRLF & _
'fileTypes=.gen|.md|.zip' & @CRLF & _
'romDir=' & GUICtrlRead($genplusgxFolderinput) & @CRLF & _
'dolFile=' & $GCWiiFlowPlugInsUpdate[$iDowPlugin][1] & @CRLF & _
'bannerSound=sega.ogg' & @CRLF & _
'displayname=GenPlusGX' & @CRLF & _
'ReturnLoader=yes')
FileClose($CurrentPluginFile)
ElseIf StringInStr($GCWiiFlowPlugInsUpdate[$iDowPlugin][1], "scummvm") <> 0 Then
$CurrentPluginFile = FileOpen($SaveCurrentUSBWiiflow & "\Wiiflow\plugins\scummvm_plugin.ini", 2)
FileWrite($CurrentPluginFile, '[PLUGIN]' & @CRLF & _
'magic=5343564D' & @CRLF & _
'coverColor=fcff00' & @CRLF & _
'coverFolder=scummvm' & @CRLF & _
'fileTypes=' & @CRLF & _
'romDir=scummvm.ini' & @CRLF & _
'dolFile=' & $GCWiiFlowPlugInsUpdate[$iDowPlugin][1] & @CRLF & _
'bannerSound=' & @CRLF & _
'displayname=ScummVM' & @CRLF & _
'ReturnLoader=yes')
FileClose($CurrentPluginFile)
ElseIf StringInStr($GCWiiFlowPlugInsUpdate[$iDowPlugin][1], "snes9x") <> 0 Then
$CurrentPluginFile = FileOpen($SaveCurrentUSBWiiflow & "\Wiiflow\plugins\snes9x-gx.ini", 2)
FileWrite($CurrentPluginFile, '[PLUGIN]' & @CRLF & _
'magic=534e4553' & @CRLF & _
'coverColor=01a300' & @CRLF & _
'coverFolder=snes9xgx' & @CRLF & _
'fileTypes=.smc|.fig|.sfc|.swc|.zip|.7z' & @CRLF & _
'romDir=' & GUICtrlRead($snes9xgxFolderinput) & @CRLF & _
'dolFile=' & $GCWiiFlowPlugInsUpdate[$iDowPlugin][1] & @CRLF & _
'bannerSound=snes.ogg' & @CRLF & _
'displayname=SNES9xGX' & @CRLF & _
'ReturnLoader=yes')
FileClose($CurrentPluginFile)

ElseIf StringInStr($GCWiiFlowPlugInsUpdate[$iDowPlugin][1], "vbagx") <> 0 Then
$CurrentPluginFile = FileOpen($SaveCurrentUSBWiiflow & "\Wiiflow\plugins\vbagx.ini", 2)
FileWrite($CurrentPluginFile, '[PLUGIN]' & @CRLF & _
'magic=56424158' & @CRLF & _
'coverColor=fcff00' & @CRLF & _
'coverFolder=vbagx' & @CRLF & _
'fileTypes=.agb|.gba|.bin|.elf|.mb|.dmg|.gb|.gbc|.cgb|.sgb|.zip|.7z' & @CRLF & _
'romDir=' & GUICtrlRead($vbagxFolderinput) & @CRLF & _
'dolFile=' & $GCWiiFlowPlugInsUpdate[$iDowPlugin][1] & @CRLF & _
'bannerSound=gba.ogg' & @CRLF & _
'displayname=VbaGX' & @CRLF & _
'ReturnLoader=yes')
FileClose($CurrentPluginFile)

ElseIf StringInStr($GCWiiFlowPlugInsUpdate[$iDowPlugin][1], "wii64") <> 0 Then
$CurrentPluginFile = FileOpen($SaveCurrentUSBWiiflow & "\Wiiflow\plugins\wii64.ini", 2)
FileWrite($CurrentPluginFile, '[PLUGIN]' & @CRLF & _
'magic=57493634' & @CRLF & _
'coverColor=ffffff' & @CRLF & _
'coverFolder=wii64' & @CRLF & _
'fileTypes=.n64|.v64|.z64|.zip' & @CRLF & _
'romDir=' & GUICtrlRead($wii64Folderinput) & @CRLF & _
'dolFile=' & $GCWiiFlowPlugInsUpdate[$iDowPlugin][1] & @CRLF & _
'bannerSound=n64.ogg' & @CRLF & _
'displayname=Wii64' & @CRLF & _
'ReturnLoader=yes')
FileClose($CurrentPluginFile)
EndIf
If $CancelBTNCancelState = 1 Then
GUICtrlSetData($LogInput, "Operation cancelled by user")
GUICtrlSetData($CurrentUSBWiiflowState, "Operation cancelled by user")
Return "Operation cancelled by user"
EndIf

Next

$hDownloadSize = InetGetSize("http://open-wiiflow-mod.googlecode.com/svn/branches/WiiFLowLoader/WiiFlowLoaderChannel - WIIH.wad")
$hDownload = InetGet("http://open-wiiflow-mod.googlecode.com/svn/branches/WiiFLowLoader/WiiFlowLoaderChannel - WIIH.wad", $SaveCurrentUSBWiiflow & "\wad\WiiFlowLoaderChannel - WIIH.wad", 1, 1)
$CurrentUSBWiiflowSize += $hDownloadSize
Do
$aInfo = InetGetInfo($hDownload)
$iPercent = StringFormat("%.2f", Round($aInfo[0] / $hDownloadSize * 100, 2))
GUICtrlSetData($CurrentUSBWiiflowState, "Download : Wiiflow Mod " & $UpdateUSBWiiflowRelease & " Plugins (WiiFlowLoaderChannel - WIIH.wad)   |   Size: " & _FormatFileSize($aInfo[1]) & "   |   Downloaded: " & _
_FormatFileSize($aInfo[0]) & " / " & _FormatFileSize($aInfo[1]) & "   |   Percent: " & $iPercent & "% ")
If $CurrentUSBWiiflow_ListN > -1 Then GUICtrlSetData($HomebrewListViewTransfered, _FormatFileSize(GUICtrlRead($HomebrewListViewTransferedUnformated) + $aInfo[0]))
Sleep(250)

Until $aInfo[2]
InetClose($hDownload)
GUICtrlSetData($LogInput, "Download : Wiiflow Mod " & $UpdateUSBWiiflowRelease & " Plugins (WiiFlowLoaderChannel - WIIH.wad) Successfully Downloaded")
If $CurrentUSBWiiflow_ListN > -1 Then GUICtrlSetData($HomebrewListViewTransferedUnformated, GUICtrlRead($HomebrewListViewTransferedUnformated) + FileGetSize($SaveCurrentUSBWiiflow & "\wad\WiiFlowLoaderChannel - WIIH.wad"))

;<============== download Plugins

$ReturnCurrentUSBWiiflowURL = "Wiiflow Mod " & $UpdateUSBWiiflowRelease & " (Mega Pack) Successfully Downloaded and verified   |   " & _
StringFormat("%.2f", Round(_Timer_Diff($startGeneratetime) / 1000, 2)) & " Seconds"
GUICtrlSetData($CurrentUSBWiiflowState, $ReturnCurrentUSBWiiflowURL)
GUICtrlSetData($LogInput, $ReturnCurrentUSBWiiflowURL)
Return $ReturnCurrentUSBWiiflowURL
EndFunc   ;==>_CurrentUSBWiiflowURL

Func _splitInfo($Mainstring, $Childstring, $ReturnT = 0)
$Arraystring = StringRegExp($Mainstring, $Childstring, 3)
If IsArray($Arraystring) Then
If $ReturnT = 0 Then
Return $Arraystring
Else
Return StringRegExpReplace($Arraystring[0], '  ', '')
EndIf
Else
Return ""
EndIf
EndFunc   ;==>_splitInfo

Func _FormatFileSize($sFunc_Size = 0)
Local $sFS = ""
If $sFunc_Size < 1000 Then
$sFS = $sFunc_Size & " B"
ElseIf $sFunc_Size > 1000000000 Then
$sFS = StringFormat("%.2f", Round($sFunc_Size / 1000000000, 2)) & " Gb"
ElseIf $sFunc_Size > 1000000 Then
$sFS = StringFormat("%.2f", Round($sFunc_Size / 1000000, 2)) & " Mb"
ElseIf $sFunc_Size > 1000 Then
$sFS = StringFormat("%.2f", Round($sFunc_Size / 1000, 2)) & " Kb"
EndIf
Return $sFS
EndFunc   ;==>_FormatFileSize

EDIT:
Create folders Fixed (download the some link)
 
@spayrosam: thanx for incorperating the suggestions, it looks good..

fledge68: you did explain how to use the startup_menu.ini...but the problem i have is that i cannot find the startup_menu.ini (not auto generated? i use my USB hdd, searched every folder, could not find it), because of that i also don't know where i can copy your new start_menu.ini to.
 
a little update for those asking questions about the source select menu.

if you missed the startup_menu.ini here is a link to the original posts on page 454 that explains how to use it and a link to download it. note - it tells you how to hide a button.

http://gbatemp.net/t...73#entry4225873

the real nand and emu nand have been merged together in one button. pressing 'a' on the vc/wiiware button gets you the emu nand and pressing 'b' gets you the real nand

as for all emu's i guess i can add that back in - i shouldn't have to touch menu.hpp and break the background music as Fix says

edit - oops here's the link to download a base startup_menu.ini

http://www.mediafire...v262b5ulxigdaum

put it in you wiiflow/settings folder - sorry my bad
 
@[member='spayrosam']: thanx for incorperating the suggestions, it looks good..

fledge68: you did explain how to use the startup_menu.ini...but the problem i have is that i cannot find the startup_menu.ini (not auto generated? i use my USB hdd, searched every folder, could not find it), because of that i also don't know where i can copy your new start_menu.ini to.

sorry - edited my posts above yours with the link and where to put it.
 
It'd be really nice to see someone make a wiiflow theme creator app, to make it easier on veteran and novice themers alike. It'd be really handy to just load the dol/ini and adjust the button placement, background and buttons instead of making an adjustment on your computer, popping the card into the wii, start up wiiflow and see if it worked,etc.... Hopefully someone with the know how could make it happen.

On another note, I'm tryin to use console pics for the Select Source/plugins menu, but for some reason they keep coming out glitchy and backward. If anyone knows how to fix this, I'd appreciate it. After I get it all figured out, I may post a link with the icons, and everything, if anyone wants it.
 
Instead of making a GX banner pack I spent some time looking at Wiiflow and at ways to make it even better.

How to make WiiFlow THE ultimate loader:

Part 1: Bugs to fix
A. Shortcuts and the Homebrew mode:
we have 5 modes and 4 direction in D-Pad, in each mode 1 direction is unused (ex. up in Wiimode, down in GCmode, right in Nandmode, Left in Emumode), homebrew shortcut can be used by pressing this unused direction;
this way all modes can be accessed from all modes
B. Homebrew Cache, should display proper icon by fixing cache file length
C. Master System in emulators (at least for me doesn't work) either use GenplusGX-v1.5 or fix v1.6.1
D. Some Wii Games and Wiiware don't work (see part "2")
E. When a Emulator is selected by using the filter, all roms cannot be seen again unless we go to setting>plugins in EmuMode, even after restarting Wiiflow. All roms should be the default

Part 2: Features to add
A. Icon Flow. see all your icons flowing and see the banner in full screen when an icon is pressed. Of course we can select icon or cover flow from options and make a dedicated iconflow view modes.
B. Add neekbooter to launch Wiiware in Neek environment (PL3 has this feature) this will increase compatibility to ~100% for Wiiware/VC
C. Same as B but for Wii Games ex. Tintin only works with Neek, adding neek environment can allow launching the game directly from wiiflow
D. Of course the above 2 features require an Emulated nand on SD or USB so Wiiflow should be able to create or at least extract the Nand.
E. Add more emulators like Mame, NeoGeo, C64, Amiga & DS
F. Incorporate a savegame manager.

I'm not a coder but I have these ideas, some might be crazy but I'm sure someday they'll all be available.
Have a nice day :)
 
It'd be really nice to see someone make a wiiflow theme creator app, to make it easier on veteran and novice themers alike. It'd be really handy to just load the dol/ini and adjust the button placement, background and buttons instead of making an adjustment on your computer, popping the card into the wii, start up wiiflow and see if it worked,etc.... Hopefully someone with the know how could make it happen.

On another note, I'm tryin to use console pics for the Select Source/plugins menu, but for some reason they keep coming out glitchy and backward. If anyone knows how to fix this, I'd appreciate it. After I get it all figured out, I may post a link with the icons, and everything, if anyone wants it.
can you post a pic or diagram of what you are trying to do or have in mind?
 
It'd be really nice to see someone make a wiiflow theme creator app, to make it easier on veteran and novice themers alike. It'd be really handy to just load the dol/ini and adjust the button placement, background and buttons instead of making an adjustment on your computer, popping the card into the wii, start up wiiflow and see if it worked,etc.... Hopefully someone with the know how could make it happen.

On another note, I'm tryin to use console pics for the Select Source/plugins menu, but for some reason they keep coming out glitchy and backward. If anyone knows how to fix this, I'd appreciate it. After I get it all figured out, I may post a link with the icons, and everything, if anyone wants it.
can you post a pic or diagram of what you are trying to do or have in mind?
well some thing like the gx creator comes to mind, that's the easy example to go off of. i've asked a couple of time for some thing like this. way before the theme creator for gx came out. or if the gx theme creator would read wiiflow themes.( just make it a theme tool for all usb loaders,homebrew channel. well all but cfg. it has it's own themeing creator that is confusing as hell for noobs to use.). this would totally be up to Grhum 909
 
Instead of making a GX banner pack I spent some time looking at Wiiflow and at ways to make it even better.

How to make WiiFlow THE ultimate loader:

Part 1: Bugs to fix
A. Shortcuts and the Homebrew mode:
we have 5 modes and 4 direction in D-Pad, in each mode 1 direction is unused (ex. up in Wiimode, down in GCmode, right in Nandmode, Left in Emumode), homebrew shortcut can be used by pressing this unused direction;
this way all modes can be accessed from all modes
B. Homebrew Cache, should display proper icon by fixing cache file length
C. Master System in emulators (at least for me doesn't work) either use GenplusGX-v1.5 or fix v1.6.1
D. Some Wii Games and Wiiware don't work (see part "2")
E. When a Emulator is selected by using the filter, all roms cannot be seen again unless we go to setting>plugins in EmuMode, even after restarting Wiiflow. All roms should be the default

Part 2: Features to add
A. Icon Flow. see all your icons flowing and see the banner in full screen when an icon is pressed. Of course we can select icon or cover flow from options and make a dedicated iconflow view modes.
B. Add neekbooter to launch Wiiware in Neek environment (PL3 has this feature) this will increase compatibility to ~100% for Wiiware/VC
C. Same as B but for Wii Games ex. Tintin only works with Neek, adding neek environment can allow launching the game directly from wiiflow
D. Of course the above 2 features require an Emulated nand on SD or USB so Wiiflow should be able to create or at least extract the Nand.
E. Add more emulators like Mame, NeoGeo, C64, Amiga & DS
F. Incorporate a savegame manager.

I'm not a coder but I have these ideas, some might be crazy but I'm sure someday they'll all be available.
Have a nice day :)

part 1
A: I like
E: sounds like all_plugins_on_start= should be added to wiiflow.ini

part 2
B: I like - seems like something right up Overjoys alley
D. is already done by Overjoy - go to config there should be NAND emulation with a 'set' button which takes you to his new emuNAND menu where you have wiiflow extract the NAND
F: not bad

maybe Fix will do some of these but I wouldn't count on it - sounds like he's busy still trying to work out all the kinks such as getting emu nand games to work again
 
For Wii games you can say a savegame manager is already in as well, if you open the game settings, you can extract a gamesave FROM NAND and flash a save TO NAND as well.
Also, playing Master system games with genplus gx mod 3 (from the v2 pack, again available on wiiflow mod google code page) works for me (with the hidden wiiflow loader channel ofcource).

PLZ can other ppl try MasterSystem games too with the newest mod?
 
can anyone use adjust coverflow while emu/plugin mode? it shows for me but the buttons don't adjust anything on screen.
 

Site & Scene News

Popular threads in this forum