diff --git a/.gitignore b/.gitignore index cd2946a..c8302a2 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,6 @@ +# Folders +_Archiv + # Windows image file caches Thumbs.db ehthumbs.db diff --git a/Changelog.txt b/Changelog.txt index 0a47981..4e2df82 100644 --- a/Changelog.txt +++ b/Changelog.txt @@ -1,8 +1,10 @@ Changelog: ------------ -16.04.XX: +16.06.XX: - Update: AIMP3 Icons +- Update: Mozilla Firefox / Thunderbird Theme compatibility Updates +- Fix: Updater will now simply download the latest Offline-Installer from ZippyShare. No more updating of parts due to bandwith limitations of Dropbox. 16.01.07: - Update: Several elementary icons & bitmaps diff --git a/LatestVersion.ini b/LatestVersion.ini index b4e2927..7b69d3a 100644 --- a/LatestVersion.ini +++ b/LatestVersion.ini @@ -1,37 +1,3 @@ -;Pak-Names: scripts|icons|bitmaps|notepad2|desktops|theme-win| -; theme-aimp|theme-jdownloader|theme-firefox-thunderbird|theme-smplayer -; theme-apps - [Updater] -UpdatedPaks=scripts|icons|bitmaps|theme-win|theme-aimp|theme-firefox-thunderbird|theme-smplayer|theme-apps -MainApp=16.01.07 -[IconThemes] -gnome=3.18 -cheser=3.16.1 -gnome-colors=5.5.1 -tango=0.8.90 -tangerine=0.27 -elementary=3.2.2 -humanity=0.6.10 -[Tools] -ultrauxthemepatcher=2.5.12 -uxtheme_multi-patcher=14.2 -[Resources] -icons=1.0 -bitmaps=1.0 -scripts=1.0 -[Files] -desktops=2.0 -notepad2=4.2.25 -[Theme-Win] -shikicolors=1.0 -elementary=1.0 -ubuntu=1.0 -cursors=1.0 -wallpapers=1.0 -[Theme-Apps] -aimp=1.0 -firefox-thunderbird=1.0 -jdownloader=1.0 -smplayer=1.0 -misc=1.0 \ No newline at end of file +MainApp=16.06.XX +URL=http://www10.zippyshare.com/d/DIDzcPHu/3545653/WinTango-Patcher-LATEST-offline.exe diff --git a/project/Changelog.txt b/project/Changelog.txt deleted file mode 100644 index 0bf444c..0000000 --- a/project/Changelog.txt +++ /dev/null @@ -1,16 +0,0 @@ -Changelog: ------------- - -15.11.09: -- Update: Support for LibreOffice 5.x -- Update: elementary Icon Theme -- Update: Mozilla Firefox Theme compatibility Updates -- Update: Removed Aero Fog on Tabbar of Mozilla Thunderbird -- Update: WinTango Patcher GUIs -- Update: Moved the whole documentation on the Homepage -- Update: Small fixes for the Shiki-Colors Visual Style -- New: Support for localization of the CPL GUI -- New: elementaryOS cursors (credits to DMZ Cursors by Nighted) -- New: RadioSure Skins for the elementary and Shiki-Colors styles -- New: Support for Winyl and Flat Skins for all icon themes -- Fix: Disabled patching of VirtualBox due to an error since version 5 \ No newline at end of file diff --git a/project/FuncMisc.au3 b/project/FuncMisc.au3 index b99f3e1..cf5d321 100644 --- a/project/FuncMisc.au3 +++ b/project/FuncMisc.au3 @@ -2,7 +2,7 @@ Func Defines() ;This defines all the globally used Variables Global $AppName = "WinTango Patcher" - Global $AppVersion = "16.01.07" + Global $AppVersion = "16.06.XX" Global $AppPublisher = "heebijeebi" Global $AppRegKey = "HKLM\Software\" & $AppName @@ -34,10 +34,7 @@ Func Defines() Global $UninstallRegKey = "HKLM\Software\Microsoft\Windows\CurrentVersion\Uninstall\" & $AppName ;URLs - Global $FilesURL_Stable = "https://dl.dropboxusercontent.com/u/825387/WinTango-Patcher" - Global $FilesURL_Beta = "https://dl.dropboxusercontent.com/u/825387/WinTango-Patcher_BETA" - - Global $FilesURL = $FilesURL_Beta ;$FilesURL_Stable ;define which is the main source + Global $FilesURL = "https://dl.dropboxusercontent.com/u/825387/WinTango-Patcher" ;Folders Global $ResourcesDir = @ScriptDir & "\Resources" @@ -74,82 +71,3 @@ Func Defines() Global $UXServiceReg = "HKLM\Software\Windows X\UXTheme Multi-Patcher" Global $UXServiceFile = $ProgramFiles & "\UXTheme Multi-Patcher\themeengine.exe" EndFunc - - -#Region Download Routines -Func DownloadResources($sName, $sFileLocal, $sFileServer) - If FileExists($sFileLocal) Then FileDelete($sFileLocal) - InstallMsg("Downloading: " & $sName) - $sURL = $sFileServer - $iSize = InetGetSize($sUrl) - $hDL = InetGet($sURL, $sFileLocal, 1, 1) - Do - $hIndexLastEntry = _GUICtrlListBox_GetCount($lstPatchStatus)-1 - $sTextLastEntry = _GUICtrlListBox_GetText($lstPatchStatus, $hIndexLastEntry) - - $aInfo = InetGetInfo($hDL) - Sleep(500) - $iPercent = Round($aInfo[0] / $iSize * 100) - - $sDlPercentageText = "Downloading: " & $sName & " (" & $iPercent & " %)..." - _GUICtrlListBox_ReplaceString($lstPatchStatus, $hIndexLastEntry, $sDlPercentageText) - ControlCommand($MainGUI, "", $lstPatchStatus, "SelectString", $sDlPercentageText) - - ;GUICtrlSetData($lstPatchStatus, "") - ;GUICtrlSetData($lstPatchStatus, "Downloading: " & $sName & " (" & $iPercent & " %)...") - Until $aInfo[2] - InetClose($hDL) ;Handle schließen um die Resourcen freizugeben - - ;retry once if filesizes differ - If FileGetSize($sFileLocal) < $iSize Then - InstallMsg("Error Downloading: " & $sName) - InstallMsg("Re-Downloading: " & $sName) - $sURL = $sFileServer - $iSize = InetGetSize($sUrl) - $hDL = InetGet($sURL, $sFileLocal, 1, 1) - Do - $hIndexLastEntry = _GUICtrlListBox_GetCount($lstPatchStatus)-1 - $sTextLastEntry = _GUICtrlListBox_GetText($lstPatchStatus, $hIndexLastEntry) - - $aInfo = InetGetInfo($hDL) - Sleep(500) - $iPercent = Round($aInfo[0] / $iSize * 100) - - $sDlPercentageText = "Re-Downloading: " & $sName & " (" & $iPercent & " %)..." - _GUICtrlListBox_ReplaceString($lstPatchStatus, $hIndexLastEntry, $sDlPercentageText) - ControlCommand($MainGUI, "", $lstPatchStatus, "SelectString", $sDlPercentageText) - - ;GUICtrlSetData($lstPatchStatus, "") - ;GUICtrlSetData($lstPatchStatus, "Re-Downloading: " & $sName & " (" & $iPercent & " %)...") - Until $aInfo[2] - InetClose($hDL) ;Handle schließen um die Resourcen freizugeben - EndIf - - ;if still not right -> Error Msg - If FileGetSize($sFileLocal) < $iSize Then - DownloadError($sFileLocal, "missing") - EndIf - - InstallMsg("done") -EndFunc - -Func DownloadError($sErrorFile, $sErrorType = "missing") - InstallMsg("Error Downloading: " & $sErrorFile) - - If $sErrorType = "size" Then - $errorMsg = "There seems to be a problem with the downloaded file. The filesize of the downloaded file differs from the source-file." - Debug("File Download Error: " & $errorMsg) - $query = MsgBox(20,"Filesize Error",$errorMsg & @CRLF & @CRLF & "Please visit: " & $AppWebsite & " to download the Offline-Installer." & @CRLF & @CRLF & "Do you want to open this URL now?") - If $query = 6 Then ShellExecute($AppWebsite) - Exit - - Else - $errorMsg = "There seems to be a problem with the downloaded file. The following file cannot be found: " & $sErrorFile - Debug("File Missing Error: " & $errorMsg) - $query = MsgBox(20,"File Missing",$errorMsg & @CRLF & @CRLF & "Please visit: " & $AppWebsite & " to download the Offline-Installer." & @CRLF & @CRLF & "Do you want to open this URL now?") - If $query = 6 Then ShellExecute($AppWebsite) - Exit - - EndIf -EndFunc -#EndRegion \ No newline at end of file diff --git a/project/FuncUpdatecheck.au3 b/project/FuncUpdatecheck.au3 index 61b5f32..6030356 100644 --- a/project/FuncUpdatecheck.au3 +++ b/project/FuncUpdatecheck.au3 @@ -1,5 +1,7 @@ Func _CheckForUpdate() - $sVerLatest = "" + Local $sVerLatest[2] + ;[0] = Version + ;[1] = URL ;Check Database for new Version $sUrl = $FilesURL & "/LatestVersion.ini" @@ -10,25 +12,27 @@ Func _CheckForUpdate() $sData = IniRead($sDest, "Updater", "MainApp", "") ;Version Latest $sVer = RegRead($AppRegKey, "Version") ;Version Installed - $sUpdatedPaks = IniRead($sDest, "Updater", "UpdatedPaks", "all") - FileDelete($sDest) ;Delete the Infofile - If $sData <> $sVer Then + If $sData = "" Then + ;MsgBox(0, "error", "download error") + $sVerLatest[0] = $sVer + + ElseIf $sData <> $sVer Then $sUrlChangelog = $FilesURL & "/Changelog.txt" $sDestChangelog = @ScriptDir & "\Changelog.txt" InetGet($sUrlChangelog,$sDestChangelog) ;Download Changelog to view - RegWrite($AppRegKey, "UpdatedPaks", "REG_SZ", $sUpdatedPaks) ;Tell the patcher which files are new - - $sVerLatest = $sData + $sVerLatest[0] = $sData ElseIf $sData = $sVer Then - $sVerLatest = $sVer + $sVerLatest[0] = $sVer EndIf + $sVerLatest[1] = IniRead($sDest, "Updater", "URL", "") ;URL for Installer + Return $sVerLatest ;Return Latest Version Number EndFunc @@ -56,8 +60,7 @@ EndFunc Func _RunDownload($sDest) If FileExists($sDest) Then - RunWait($ToolsDir & '\7z.exe x -yo"' & @TempDir & '" "' & $sDest & '"', @ScriptDir ,@SW_HIDE) - Run(StringTrimRight($sDest, 2) & "exe") + Run($sDest) Else $errorMsg = "There seems to be a problem with the downloaded file. The following file cannot be found: " & $sDest $query = MsgBox(20,"File Missing",$errorMsg & @CRLF & @CRLF & "Please visit: " & $AppWebsite & " to manually download the Installer." & @CRLF & @CRLF & "Do you want to open this URL now?") diff --git a/project/JobsPatcher.au3 b/project/JobsPatcher.au3 index 5df2616..d3efd4d 100644 --- a/project/JobsPatcher.au3 +++ b/project/JobsPatcher.au3 @@ -1,20 +1,14 @@ -Func DlAndExResources() +Func ExtractResources() #Region: Scripts - ;Check for updates - $FilesToUpdate_Scripts = 0 - If StringInStr($sFilesToUpdate, "scripts") <> 0 or $sFilesToUpdate = "all" Then $FilesToUpdate_Scripts = 1 - $sResName = "ResHacker Scripts" $sResFileLocal = @ScriptDir & '\Themes\scripts.7z' - $sResFileServer = $FilesURL & "/scripts.7z" - If not FileExists($sResFileLocal) or $FilesToUpdate_Scripts = 1 Then DownloadResources($sResName, $sResFileLocal, $sResFileServer) ;Extract resources InstallMsg("Extracting: " & $sResName) If FileExists($sResFileLocal) Then RunWait($ToolsDir & '\7z.exe x -yo"' & $ResourcesDir & '" "' & $sResFileLocal & '"', @ScriptDir ,@SW_HIDE) Else - DownloadError($sResFileLocal) + ;Some kind of Errorchecking needed? EndIf InstallMsg("done") @@ -24,15 +18,9 @@ Func DlAndExResources() #Region: Icons - ;Check for Updates - $FilesToUpdate_Icons = 0 - If StringInStr($sFilesToUpdate, "icons") <> 0 or $sFilesToUpdate = "all" Then $FilesToUpdate_Icons = 1 - $sResName = "Icon Resources" If $SelectedTheme = "gnome" Then $sResFileLocal = @ScriptDir & '\Themes\icons-' & $SelectedTheme & '.7z' - $sResFileServer = $FilesURL & "/icons-" & $SelectedTheme & ".7z" - If not FileExists($sResFileLocal) or $FilesToUpdate_Icons = 1 Then DownloadResources($sResName & " (" & $SelectedTheme & ")", $sResFileLocal, $sResFileServer) $sResFileLocal2 = "" $sResFileLocal3 = "" @@ -40,21 +28,15 @@ Func DlAndExResources() ElseIf $SelectedTheme = "cheser" or $SelectedTheme = "gnome-brave" or $SelectedTheme = "tango" or $SelectedTheme = "elementary" Then ;base icons $sResFileLocal = @ScriptDir & '\Themes\icons-gnome.7z' - $sResFileServer = $FilesURL & "/icons-gnome.7z" - If not FileExists($sResFileLocal) or $FilesToUpdate_Icons = 1 Then DownloadResources($sResName & " (Gnome)", $sResFileLocal, $sResFileServer) ;specific icons $sResFileLocal2 = @ScriptDir & '\Themes\icons-' & $SelectedTheme & '.7z' - $sResFileServer = $FilesURL & "/icons-" & $SelectedTheme & ".7z" - If not FileExists($sResFileLocal2) or $FilesToUpdate_Icons = 1 Then DownloadResources($sResName & " (" & $SelectedTheme & ")", $sResFileLocal2, $sResFileServer) $sResFileLocal3 = "" Else ;base icons $sResFileLocal = @ScriptDir & '\Themes\icons-gnome.7z' - $sResFileServer = $FilesURL & "/icons-gnome.7z" - If not FileExists($sResFileLocal) or $FilesToUpdate_Icons = 1 Then DownloadResources($sResName & " (Gnome)", $sResFileLocal, $sResFileServer) ;2nd base icons If $SelectedTheme = "tangerine" Then @@ -65,13 +47,9 @@ Func DlAndExResources() $parent_theme = "gnome-brave" EndIf $sResFileLocal2 = @ScriptDir & '\Themes\icons-' & $parent_theme & '.7z' - $sResFileServer = $FilesURL & "/icons-" & $parent_theme & ".7z" - If not FileExists($sResFileLocal2) or $FilesToUpdate_Icons = 1 Then DownloadResources($sResName & " (" & $parent_theme & ")", $sResFileLocal2, $sResFileServer) ;specific icons $sResFileLocal3 = @ScriptDir & '\Themes\icons-' & $SelectedTheme & '.7z' - $sResFileServer = $FilesURL & "/icons-" & $SelectedTheme & ".7z" - If not FileExists($sResFileLocal3) or $FilesToUpdate_Icons = 1 Then DownloadResources($sResName & " (" & $SelectedTheme & ")", $sResFileLocal3, $sResFileServer) EndIf @@ -82,7 +60,7 @@ Func DlAndExResources() If $sResFileLocal2 <> "" Then RunWait($ToolsDir & '\7z.exe x -yo"' & $ResourcesDir & '" "' & $sResFileLocal2 & '"', @ScriptDir ,@SW_HIDE) If $sResFileLocal3 <> "" Then RunWait($ToolsDir & '\7z.exe x -yo"' & $ResourcesDir & '" "' & $sResFileLocal3 & '"', @ScriptDir ,@SW_HIDE) Else - DownloadError($sResFileLocal) + ;Some kind of Errorchecking needed? EndIf InstallMsg("done") @@ -92,15 +70,9 @@ Func DlAndExResources() #Region: Bitmaps - ;Check for Updates - $FilesToUpdate_Bitmaps = 0 - If StringInStr($sFilesToUpdate, "bitmaps") <> 0 or $sFilesToUpdate = "all" Then $FilesToUpdate_Bitmaps = 1 - $sResName = "Bitmap Resources" If $SelectedTheme = "gnome" Then $sResFileLocal = @ScriptDir & '\Themes\bitmaps-' & $SelectedTheme & '.7z' - $sResFileServer = $FilesURL & "/bitmaps-" & $SelectedTheme & ".7z" - If not FileExists($sResFileLocal) or $FilesToUpdate_Bitmaps = 1 Then DownloadResources($sResName & " (" & $SelectedTheme & ")", $sResFileLocal, $sResFileServer) $sResFileLocal2 = "" $sResFileLocal3 = "" @@ -108,21 +80,15 @@ Func DlAndExResources() ElseIf $SelectedTheme = "cheser" or $SelectedTheme = "gnome-brave" or $SelectedTheme = "tango" or $SelectedTheme = "elementary" Then ;base icons $sResFileLocal = @ScriptDir & '\Themes\bitmaps-gnome.7z' - $sResFileServer = $FilesURL & "/bitmaps-gnome.7z" - If not FileExists($sResFileLocal) or $FilesToUpdate_Bitmaps = 1 Then DownloadResources($sResName & " (Gnome)", $sResFileLocal, $sResFileServer) ;specific icons $sResFileLocal2 = @ScriptDir & '\Themes\bitmaps-' & $SelectedTheme & '.7z' - $sResFileServer = $FilesURL & "/bitmaps-" & $SelectedTheme & ".7z" - If not FileExists($sResFileLocal2) or $FilesToUpdate_Bitmaps = 1 Then DownloadResources($sResName & " (" & $SelectedTheme & ")", $sResFileLocal2, $sResFileServer) $sResFileLocal3 = "" Else ;base icons $sResFileLocal = @ScriptDir & '\Themes\bitmaps-gnome.7z' - $sResFileServer = $FilesURL & "/bitmaps-gnome.7z" - If not FileExists($sResFileLocal) or $FilesToUpdate_Bitmaps = 1 Then DownloadResources($sResName & " (Gnome)", $sResFileLocal, $sResFileServer) ;2nd base icons If $SelectedTheme = "tangerine" Then @@ -133,13 +99,9 @@ Func DlAndExResources() $parent_theme = "gnome-brave" EndIf $sResFileLocal2 = @ScriptDir & '\Themes\bitmaps-' & $parent_theme & '.7z' - $sResFileServer = $FilesURL & "/bitmaps-" & $parent_theme & ".7z" - If not FileExists($sResFileLocal2) or $FilesToUpdate_Bitmaps = 1 Then DownloadResources($sResName & " (" & $parent_theme & ")", $sResFileLocal2, $sResFileServer) ;specific icons $sResFileLocal3 = @ScriptDir & '\Themes\bitmaps-' & $SelectedTheme & '.7z' - $sResFileServer = $FilesURL & "/bitmaps-" & $SelectedTheme & ".7z" - If not FileExists($sResFileLocal3) or $FilesToUpdate_Bitmaps = 1 Then DownloadResources($sResName & " (" & $SelectedTheme & ")", $sResFileLocal3, $sResFileServer) EndIf @@ -150,7 +112,7 @@ Func DlAndExResources() If $sResFileLocal2 <> "" Then RunWait($ToolsDir & '\7z.exe x -yo"' & $ResourcesDir & '" "' & $sResFileLocal2 & '"', @ScriptDir ,@SW_HIDE) If $sResFileLocal3 <> "" Then RunWait($ToolsDir & '\7z.exe x -yo"' & $ResourcesDir & '" "' & $sResFileLocal3 & '"', @ScriptDir ,@SW_HIDE) Else - DownloadError($sResFileLocal) + ;Some kind of Errorchecking needed? EndIf InstallMsg("done") @@ -161,23 +123,14 @@ Func DlAndExResources() #Region Themes-Apps - ;Check for Updates - $FilesToUpdate_Apps = 0 - If StringInStr($sFilesToUpdate, "theme-apps") <> 0 or $sFilesToUpdate = "all" Then $FilesToUpdate_Apps = 1 - $sResName = "Application Theme Files" - ;Download ;step1: GNOME base $sResFileLocal = @ScriptDir & '\Themes\theme-apps-gnome.7z' - $sResFileServer = $FilesURL & "/theme-apps/theme-apps-gnome.7z" - If not FileExists($sResFileLocal) or $FilesToUpdate_Apps = 1 Then DownloadResources($sResName & " (Gnome)", $sResFileLocal, $sResFileServer) ;step2: specific theme If $SelectedTheme <> "gnome" Then $sResFileLocal2 = @ScriptDir & '\Themes\theme-apps-' & $SelectedTheme & '.7z' - $sResFileServer = $FilesURL & "/theme-apps/theme-apps-" & $SelectedTheme & ".7z" - If not FileExists($sResFileLocal2) or $FilesToUpdate_Apps = 1 Then DownloadResources($sResName & " (" & $SelectedTheme & ")", $sResFileLocal2, $sResFileServer) Else $sResFileLocal2 = "" EndIf @@ -188,7 +141,7 @@ Func DlAndExResources() RunWait($ToolsDir & '\7z.exe x -yo"' & $ResourcesDir & '" "' & $sResFileLocal & '"', @ScriptDir ,@SW_HIDE) If $sResFileLocal2 <> "" Then RunWait($ToolsDir & '\7z.exe x -yo"' & $ResourcesDir & '" "' & $sResFileLocal2 & '"', @ScriptDir ,@SW_HIDE) Else - DownloadError($sResFileLocal) + ;Some kind of Errorchecking needed? EndIf InstallMsg("done") #EndRegion @@ -252,23 +205,15 @@ EndFunc Func Apply_Notepad2() ;Replace MS Notepad with Notepad2 - ;Check for Updates - $FilesToUpdate_Notepad2 = 0 - If StringInStr($sFilesToUpdate, "notepad2") <> 0 or $sFilesToUpdate = "all" Then $FilesToUpdate_Notepad2 = 1 - $sResName = "Notepad2" - - ;Download $sResFileLocal = @ScriptDir & '\Themes\files-notepad2-' & $SelectedTheme & '.7z' - $sResFileServer = $FilesURL & "/tools/files-notepad2-" & $SelectedTheme & ".7z" - If not FileExists($sResFileLocal) or $FilesToUpdate_Notepad2 = 1 Then DownloadResources($sResName, $sResFileLocal, $sResFileServer) ;Extract InstallMsg("Extracting: " & $sResName) If FileExists($sResFileLocal) Then RunWait($ToolsDir & '\7z.exe x -yo"' & $ResourcesDir & '" "' & $sResFileLocal & '"', @ScriptDir ,@SW_HIDE) Else - DownloadError($sResFileLocal) + ;Some kind of Errorchecking needed? EndIf InstallMsg("done") @@ -291,32 +236,22 @@ EndFunc Func Apply_Desktops() ;Install Sysinternals Desktops - - ;Check for Updates - $FilesToUpdate_Desktops = 0 - If StringInStr($sFilesToUpdate, "desktops") <> 0 or $sFilesToUpdate = "all" Then $FilesToUpdate_Desktops = 1 - $sResName = "Sysinternals Desktops" - ;Download If $SelectedTheme = "gnome" or $SelectedTheme = "cheser" or $SelectedTheme = "elementary" or $SelectedTheme = "tango" Then $sResFileLocal = @ScriptDir & '\Themes\files-desktops-gnome-brave.7z' - $sResFileServer = $FilesURL & "/tools/files-desktops-gnome-brave.7z" ElseIf $SelectedTheme = "tangerine" Then $sResFileLocal = @ScriptDir & '\Themes\files-desktops-gnome-human.7z' - $sResFileServer = $FilesURL & "/tools/files-desktops-gnome-human.7z" Else $sResFileLocal = @ScriptDir & '\Themes\files-desktops-' & $SelectedTheme & '.7z' - $sResFileServer = $FilesURL & "/tools/files-desktops-" & $SelectedTheme & ".7z" EndIf - If not FileExists($sResFileLocal) or $FilesToUpdate_Desktops = 1 Then DownloadResources($sResName, $sResFileLocal, $sResFileServer) ;Extract InstallMsg("Extracting: " & $sResName) If FileExists($sResFileLocal) Then RunWait($ToolsDir & '\7z.exe x -yo"' & $ResourcesDir & '" "' & $sResFileLocal & '"', @ScriptDir ,@SW_HIDE) Else - DownloadError($sResFileLocal) + ;Some kind of Errorchecking needed? EndIf InstallMsg("done") @@ -343,10 +278,10 @@ Func Apply_ReloaderStartup() ;Automatically Reload on Boot InstallMsg("Applying: Automatically Reload on Startup") - FileDelete(@StartupCommonDir & "\" & $AppName & " Reloader.lnk") - FileCreateShortcut(@ScriptDir & "\Patcher.exe", @StartupDir & "\" & $AppName & " Reloader.lnk", @ScriptDir, "/reload /S") + FileDelete(@StartupCommonDir & "\" & $AppName & " Reloader.lnk") + FileCreateShortcut(@ScriptDir & "\Patcher.exe", @StartupDir & "\" & $AppName & " Reloader.lnk", @ScriptDir, "/reload /S") - InstallMsg("done") + InstallMsg("done") EndFunc ;Windows: Theme @@ -369,24 +304,15 @@ EndFunc Func ApplyTheme_Wallpapers() ;Matching Wallpapers for the VS - - ;Check for Updates - $FilesToUpdate_Wallpapers = 0 - If StringInStr($sFilesToUpdate, "wallpapers") <> 0 or $sFilesToUpdate = "all" Then $FilesToUpdate_Wallpapers = 1 - $sResName = "Wallpapers" - - ;Download $sResFileLocal = @ScriptDir & '\Themes\wallpapers.7z' - $sResFileServer = $FilesURL & "/theme-win/wallpapers.7z" - If not FileExists($sResFileLocal) or $FilesToUpdate_Wallpapers = 1 Then DownloadResources($sResName, $sResFileLocal, $sResFileServer) ;Extract InstallMsg("Extracting: " & $sResName) If FileExists($sResFileLocal) Then RunWait($ToolsDir & '\7z.exe x -yo"' & $ResourcesDir & '" "' & $sResFileLocal & '"', @ScriptDir ,@SW_HIDE) Else - DownloadError($sResFileLocal) + ;Some kind of Errorchecking needed? EndIf InstallMsg("done") @@ -400,24 +326,15 @@ EndFunc Func ApplyTheme_Cursors($Cursor_Style) ;Ubuntu Classic Cursors - - ;Check for Updates - $FilesToUpdate_Cursors = 0 - If StringInStr($sFilesToUpdate, "cursors") <> 0 or $sFilesToUpdate = "all" Then $FilesToUpdate_Cursors = 1 - $sResName = $Cursor_Style & " Cursors" - - ;Download $sResFileLocal = @ScriptDir & '\Themes\cursors-' & $Cursor_Style & '.7z' - $sResFileServer = $FilesURL & "/theme-win/cursors-" & $Cursor_Style & ".7z" - If not FileExists($sResFileLocal) or $FilesToUpdate_Cursors = 1 Then DownloadResources($sResName, $sResFileLocal, $sResFileServer) ;Extract InstallMsg("Extracting: " & $sResName) If FileExists($sResFileLocal) Then RunWait($ToolsDir & '\7z.exe x -yo"' & $ResourcesDir & '" "' & $sResFileLocal & '"', @ScriptDir ,@SW_HIDE) Else - DownloadError($sResFileLocal) + ;Some kind of Errorchecking needed? EndIf InstallMsg("done") @@ -450,29 +367,21 @@ EndFunc Func ApplyTheme_VisualStyle($VS_Name) ;VisualStyle - - ;Check for Updates - $FilesToUpdate_ThemeWin = 0 - If StringInStr($sFilesToUpdate, "theme-win") <> 0 or $sFilesToUpdate = "all" Then $FilesToUpdate_ThemeWin = 1 - $sResName = "Visual Style for Windows" ;Definitions If $VS_Name = "elementary" Then $sResFileLocal = @ScriptDir & '\Themes\visualstyle-elementary.7z' - $sResFileServer = $FilesURL & "/theme-win/visualstyle-elementary.7z" $VS_FileName = "elementary" ElseIf $VS_Name = "Ubuntu" Then $sResFileLocal = @ScriptDir & '\Themes\visualstyle-ubuntu.7z' - $sResFileServer = $FilesURL & "/theme-win/visualstyle-ubuntu.7z" $VS_FileName = "Ubuntu" ElseIf $VS_Name = "Shiki-Colors" Then $sResFileLocal = @ScriptDir & '\Themes\visualstyle-shikicolors.7z' - $sResFileServer = $FilesURL & "/theme-win/visualstyle-shikicolors.7z" If $SelectedTheme = "gnome" Then $VS_FileName = "Shiki-Colors Dust" @@ -485,15 +394,12 @@ Func ApplyTheme_VisualStyle($VS_Name) EndIf EndIf - ;Download - If not FileExists($sResFileLocal) or $FilesToUpdate_ThemeWin = 1 Then DownloadResources($sResName, $sResFileLocal, $sResFileServer) - ;Extract InstallMsg("Extracting: " & $sResName) If FileExists($sResFileLocal) Then RunWait($ToolsDir & '\7z.exe x -yo"' & $ResourcesDir & '" "' & $sResFileLocal & '"', @ScriptDir ,@SW_HIDE) Else - DownloadError($sResFileLocal) + ;Some kind of Errorchecking needed? EndIf InstallMsg("done") @@ -682,28 +588,6 @@ EndFunc ;3rd Party Apps: Themes Func ApplyTheme_Aimp() ;Theme - no need for a backup - If FileExists($ProgramFiles & "\AIMP3\AIMP3.exe") or FileExists($ProgramFiles & "\AIMP\AIMP.exe") Then - ;Check for Updates - $FilesToUpdate_Aimp = 0 - If StringInStr($sFilesToUpdate, "theme-aimp") <> 0 or $sFilesToUpdate = "all" Then $FilesToUpdate_Aimp = 1 - - $sResName = "Aimp Theme Files" - - ;Download - $sResFileLocal = @ScriptDir & '\Themes\theme-Aimp-' & $SelectedTheme & '.7z' - $sResFileServer = $FilesURL & "/theme-apps/theme-Aimp-" & $SelectedTheme & ".7z" - If not FileExists($sResFileLocal) or $FilesToUpdate_Aimp = 1 Then DownloadResources($sResName, $sResFileLocal, $sResFileServer) - - ;Extract - InstallMsg("Extracting: " & $sResName) - If FileExists($sResFileLocal) Then - RunWait($ToolsDir & '\7z.exe x -yo"' & $ResourcesDir & '" "' & $sResFileLocal & '"', @ScriptDir ,@SW_HIDE) - Else - DownloadError($sResFileLocal) - EndIf - InstallMsg("done") - EndIf - If FileExists($ProgramFiles & "\AIMP3\AIMP3.exe") Then ;Install InstallMsg("Installing Theme: Aimp") @@ -749,26 +633,6 @@ EndFunc Func ApplyTheme_jDownloader() ;Theme - no need for a backup If FileExists($ProgramFiles & "\jDownloader\jDownloader.exe") Then - ;Check for Updates - $FilesToUpdate_jDownloader = 0 - If StringInStr($sFilesToUpdate, "theme-jdownloader") <> 0 or $sFilesToUpdate = "all" Then $FilesToUpdate_jDownloader = 1 - - $sResName = "jDownloader Theme Files" - - ;Download - $sResFileLocal = @ScriptDir & '\Themes\theme-jDownloader-' & $SelectedTheme & '.7z' - $sResFileServer = $FilesURL & "/theme-apps/theme-jDownloader-" & $SelectedTheme & ".7z" - If not FileExists($sResFileLocal) or $FilesToUpdate_jDownloader = 1 Then DownloadResources($sResName, $sResFileLocal, $sResFileServer) - - ;Extract - InstallMsg("Extracting: " & $sResName) - If FileExists($sResFileLocal) Then - RunWait($ToolsDir & '\7z.exe x -yo"' & $ResourcesDir & '" "' & $sResFileLocal & '"', @ScriptDir ,@SW_HIDE) - Else - DownloadError($sResFileLocal) - EndIf - InstallMsg("done") - ;Install InstallMsg("Installing Theme: jDownloader") @@ -783,26 +647,6 @@ EndFunc Func ApplyTheme_Firefox() ;Theme - no need for a backup If FileExists($ProgramFiles & "\Mozilla Firefox\firefox.exe") or FileExists($ProgramFiles64 & "\Mozilla Firefox\firefox.exe") Then - ;Check for Updates - $FilesToUpdate_Mozilla = 0 - If StringInStr($sFilesToUpdate, "theme-firefox-thunderbird") <> 0 or $sFilesToUpdate = "all" Then $FilesToUpdate_Mozilla = 1 - - $sResName = "Firefox/Thunderbird Theme Files" - - ;Download - $sResFileLocal = @ScriptDir & '\Themes\theme-firefox-thunderbird-' & $SelectedTheme & '.7z' - $sResFileServer = $FilesURL & "/theme-apps/theme-firefox-thunderbird-" & $SelectedTheme & ".7z" - If not FileExists($sResFileLocal) or $FilesToUpdate_Mozilla = 1 Then DownloadResources($sResName, $sResFileLocal, $sResFileServer) - - ;Extract - InstallMsg("Extracting: " & $sResName) - If FileExists($sResFileLocal) Then - RunWait($ToolsDir & '\7z.exe x -yo"' & $ResourcesDir & '" "' & $sResFileLocal & '"', @ScriptDir ,@SW_HIDE) - Else - DownloadError($sResFileLocal) - EndIf - InstallMsg("done") - ;Install InstallMsg("Installing Theme: Mozilla Firefox") @@ -819,66 +663,23 @@ EndFunc Func ApplyTheme_Thunderbird() ;Theme - no need for a backup - If FileExists($ProgramFiles & "\Mozilla Thunderbird\thunderbird.exe") Then - ;Check for Updates - $FilesToUpdate_Mozilla = 0 - If StringInStr($sFilesToUpdate, "theme-firefox-thunderbird") <> 0 or $sFilesToUpdate = "all" Then $FilesToUpdate_Mozilla = 1 + If FileExists($ProgramFiles & "\Mozilla Thunderbird\thunderbird.exe") Then + ;Install + InstallTheme("Mozilla Thunderbird", $ProgramFiles & "\Mozilla Thunderbird\thunderbird.exe", $ProgramFiles & "\Mozilla Thunderbird\chrome\icons\default", "abcardWindow.ico", $ResourcesDir & "\themes\Firefox-Thunderbird\Thunderbird\abcardWindow.ico") + InstallTheme("Mozilla Thunderbird", $ProgramFiles & "\Mozilla Thunderbird\thunderbird.exe", $ProgramFiles & "\Mozilla Thunderbird\chrome\icons\default", "addressbookWindow.ico", $ResourcesDir & "\themes\Firefox-Thunderbird\Thunderbird\addressbookWindow.ico") + InstallTheme("Mozilla Thunderbird", $ProgramFiles & "\Mozilla Thunderbird\thunderbird.exe", $ProgramFiles & "\Mozilla Thunderbird\chrome\icons\default", "messengerWindow.ico", $ResourcesDir & "\themes\Firefox-Thunderbird\Thunderbird\messengerWindow.ico") + InstallTheme("Mozilla Thunderbird", $ProgramFiles & "\Mozilla Thunderbird\thunderbird.exe", $ProgramFiles & "\Mozilla Thunderbird\chrome\icons\default", "msgcomposeWindow.ico", $ResourcesDir & "\themes\Firefox-Thunderbird\Thunderbird\msgcomposeWindow.ico") - $sResName = "Firefox/Thunderbird Theme Files" + InstallMsg("Installing Theme: Mozilla Thunderbird") - ;Download - $sResFileLocal = @ScriptDir & '\Themes\theme-firefox-thunderbird-' & $SelectedTheme & '.7z' - $sResFileServer = $FilesURL & "/theme-apps/theme-firefox-thunderbird-" & $SelectedTheme & ".7z" - If not FileExists($sResFileLocal) or $FilesToUpdate_Mozilla = 1 Then DownloadResources($sResName, $sResFileLocal, $sResFileServer) + CheckAndCloseProcess("thunderbird.exe", "Mozilla Thunderbird") - ;Extract - InstallMsg("Extracting: " & $sResName) - If FileExists($sResFileLocal) Then - RunWait($ToolsDir & '\7z.exe x -yo"' & $ResourcesDir & '" "' & $sResFileLocal & '"', @ScriptDir ,@SW_HIDE) - Else - DownloadError($sResFileLocal) - EndIf - InstallMsg("done") - - ;Install - InstallTheme("Mozilla Thunderbird", $ProgramFiles & "\Mozilla Thunderbird\thunderbird.exe", $ProgramFiles & "\Mozilla Thunderbird\chrome\icons\default", "abcardWindow.ico", $ResourcesDir & "\themes\Firefox-Thunderbird\Thunderbird\abcardWindow.ico") - InstallTheme("Mozilla Thunderbird", $ProgramFiles & "\Mozilla Thunderbird\thunderbird.exe", $ProgramFiles & "\Mozilla Thunderbird\chrome\icons\default", "addressbookWindow.ico", $ResourcesDir & "\themes\Firefox-Thunderbird\Thunderbird\addressbookWindow.ico") - InstallTheme("Mozilla Thunderbird", $ProgramFiles & "\Mozilla Thunderbird\thunderbird.exe", $ProgramFiles & "\Mozilla Thunderbird\chrome\icons\default", "messengerWindow.ico", $ResourcesDir & "\themes\Firefox-Thunderbird\Thunderbird\messengerWindow.ico") - InstallTheme("Mozilla Thunderbird", $ProgramFiles & "\Mozilla Thunderbird\thunderbird.exe", $ProgramFiles & "\Mozilla Thunderbird\chrome\icons\default", "msgcomposeWindow.ico", $ResourcesDir & "\themes\Firefox-Thunderbird\Thunderbird\msgcomposeWindow.ico") - - InstallMsg("Installing Theme: Mozilla Thunderbird") - - CheckAndCloseProcess("thunderbird.exe", "Mozilla Thunderbird") - - FileCopy($ResourcesDir & "\themes\Firefox-Thunderbird\*.xpi", $ProgramFiles & "\Mozilla Thunderbird\extensions", 1) - InstallMsg("done") - EndIf + FileCopy($ResourcesDir & "\themes\Firefox-Thunderbird\*.xpi", $ProgramFiles & "\Mozilla Thunderbird\extensions", 1) + InstallMsg("done") + EndIf EndFunc Func ApplyTheme_SMPlayer() - ;Download - If FileExists($ProgramFiles & "\SMPlayer\SMPlayer.exe") or FileExists($ProgramFiles64 & "\SMPlayer\SMPlayer.exe") Then - ;Check for Updates - $FilesToUpdate_SMPlayer = 0 - If StringInStr($sFilesToUpdate, "theme-smplayer") <> 0 or $sFilesToUpdate = "all" Then $FilesToUpdate_SMPlayer = 1 - - $sResName = "SMPlayer Theme Files" - - ;Download - $sResFileLocal = @ScriptDir & '\Themes\theme-SMPlayer-' & $SelectedTheme & '.7z' - $sResFileServer = $FilesURL & "/theme-apps/theme-SMPlayer-" & $SelectedTheme & ".7z" - If not FileExists($sResFileLocal) or $FilesToUpdate_SMPlayer = 1 Then DownloadResources($sResName, $sResFileLocal, $sResFileServer) - - ;Extract - InstallMsg("Extracting: " & $sResName) - If FileExists($sResFileLocal) Then - RunWait($ToolsDir & '\7z.exe x -yo"' & $ResourcesDir & '" "' & $sResFileLocal & '"', @ScriptDir ,@SW_HIDE) - Else - DownloadError($sResFileLocal) - EndIf - InstallMsg("done") - EndIf - ;Theme - no need for a backup If $SelectedTheme = "gnome-brave" or $SelectedTheme = "gnome-human" or $SelectedTheme = "gnome-noble" or $SelectedTheme = "gnome-wine" or $SelectedTheme = "gnome-wise" Then $theme_SMPlayer = "gnome-" & $SelectedTheme diff --git a/project/Lang/english.ini b/project/Lang/english.ini index d9b880c..00645a2 100644 --- a/project/Lang/english.ini +++ b/project/Lang/english.ini @@ -63,7 +63,6 @@ lblVersionLatest=Server Version: btnUpdate_a=Check now btnUpdate_b=Apply Update lblUpdateStartup=Automatically check for a new version on system startup -lblUpdateBeta=Get Updates faster and search for BETA Versions lblUninstall=Uninstall lblUninstallDesc=Completely remove the Patcher and all of its files btnUninstall=Uninstall diff --git a/project/Lang/german.ini b/project/Lang/german.ini index 775cff4..7d075c8 100644 --- a/project/Lang/german.ini +++ b/project/Lang/german.ini @@ -56,7 +56,6 @@ lblVersionLatest=Server Version: btnUpdate_a=Prüfen btnUpdate_b=Update lblUpdateStartup=Bei Systemstart auf neue Version prüfen -lblUpdateBeta=Updates schneller erhalten (BETA-Versionen installieren) lblUninstall=Entfernen lblUninstallDesc=Den Patcher und alle seine Dateien entfernen btnUninstall=Entfernen diff --git a/project/Patcher.au3 b/project/Patcher.au3 index ae8afc3..fbb4b2b 100644 --- a/project/Patcher.au3 +++ b/project/Patcher.au3 @@ -77,15 +77,6 @@ If _Singleton($AppName,1) = 0 Then Exit EndIf -;Option: Also install BETA Versions -If RegRead($AppRegKey, "Beta") = 1 or StringInStr($FilesURL, "BETA") > 0 Then - $OptUpdateBeta = 1 - $FilesURL = $FilesURL_Beta -Else - $OptUpdateBeta = 0 - $FilesURL = $FilesURL_Stable -EndIf - ;COM-Error Handler $oMyError = ObjEvent("AutoIt.Error","MyErrFunc") ;Initialize a COM error handler Func MyErrFunc() ;This is my custom defined error handler @@ -187,9 +178,6 @@ ElseIf $Modus = "Reloader" Then PatcherGUI("Reloader") Else - ;Check if Updater was previously run and resources need to be updated - Global $sFilesToUpdate = RegRead($AppRegKey, "UpdatedPaks") - ;MainGUI PatcherGUI("Patcher") EndIf @@ -407,9 +395,9 @@ Func Patch() If $OsArch = "x64" Then DirCreate($LogsDir64) ;Download all the needed resources - Debug("=== Download/Extract Basics Start ===") - DlAndExResources() - Debug("=== Download/Extract Basics End ===") + Debug("=== Extract Basics Start ===") + ExtractResources() + Debug("=== Extract Basics End ===") ;The patching magic: Debug("=== ApplyOptions Start ===") diff --git a/project/PatcherCPL.au3 b/project/PatcherCPL.au3 index 5f66483..bef4b51 100644 --- a/project/PatcherCPL.au3 +++ b/project/PatcherCPL.au3 @@ -19,10 +19,10 @@ #AutoIt3Wrapper_Res_requestedExecutionLevel=requireAdministrator ;Permissions Defines() ;Global Standards -$AppTitle = $AppName & " CPL" -$AppVersionInst = RegRead($AppRegKey, "Version") -$AppVersionLatest = "" -$InstalledTheme = RegRead($AppRegKey, "IconTheme") +GLobal $AppTitle = $AppName & " CPL" +Global $AppVersionInst = RegRead($AppRegKey, "Version") +Global $AppVersionLatest +Global $InstalledTheme = RegRead($AppRegKey, "IconTheme") _Strings_CPL() ;localized Strings ;Check: Only one Instance of the App should run @@ -48,15 +48,6 @@ Else $OptReloaderStartup = 0 EndIf -;Option: Also install BETA Versions -If RegRead($AppRegKey, "Beta") = 1 or StringInStr($FilesURL, "BETA") > 0 Then - $OptUpdateBeta = 1 - $FilesURL = $FilesURL_Beta -Else - $OptUpdateBeta = 0 - $FilesURL = $FilesURL_Stable -EndIf - ;Create GUI PatcherGUI() @@ -101,13 +92,13 @@ While 1 If $UpdateAvailable = 0 Then ;Update available = false $AppVersionInst = RegRead($AppRegKey, "Version") $AppVersionLatest = _CheckForUpdate() - GUICtrlSetData($lblVersionLatest, $string_lblVersionLatest & " " & $AppVersionLatest) + GUICtrlSetData($lblVersionLatest, $string_lblVersionLatest & " " & $AppVersionLatest[0]) ;Check local version vs. server and highlight accordingly if there is a difference or not - If $AppVersionLatest <> $AppVersionInst and $AppVersionLatest <> "" Then + If $AppVersionLatest[0] <> $AppVersionInst and $AppVersionLatest[0] <> "" Then GUICtrlSetColor($lblVersionInst, $COLOR_RED) GUICtrlSetData($btnUpdate, $string_btnUpdate_b) $UpdateAvailable = 1 - ElseIf $AppVersionLatest = $AppVersionInst Then + ElseIf $AppVersionLatest[0] = $AppVersionInst Then GUICtrlSetColor($lblVersionInst, $COLOR_GREEN) EndIf @@ -115,8 +106,8 @@ While 1 GUICtrlSetState($prgbarUpdate, $GUI_SHOW) GUICtrlSetState($btnUpdate, $GUI_HIDE) ;Download Latest Version... - $sUrl = $FilesURL & "/" & StringReplace($AppName, " ", "-") & "-LATEST.7z" - $sDest = @TempDir & "\" & StringReplace($AppName, " ", "-") & "-LATEST.7z" + $sUrl = $AppVersionLatest[1] + $sDest = @TempDir & "\" & StringReplace($AppName, " ", "-") & "-LATEST.exe" _DownloadLatestVersion($sUrl, $sDest) ;...and install it _RunDownload($sDest) @@ -135,22 +126,6 @@ While 1 $OptUpdateStartup = 1 EndIf - Case $icoUpdateBeta - If $OptUpdateBeta = 1 Then ;Install BETA = true - GUICtrlSetImage($icoUpdateBeta, $SwitchIconOff) - RegWrite($AppRegKey, "Beta", "REG_SZ", "0") - $FilesURL = $FilesURL_Stable - $OptUpdateBeta = 0 - Else ;Install BETA = false - GUICtrlSetImage($icoUpdateBeta, $SwitchIconOn) - RegWrite($AppRegKey, "Beta", "REG_SZ", "1") - $FilesURL = $FilesURL_Beta - $OptUpdateBeta = 1 - ;reset Update Button - GUICtrlSetData($btnUpdate, $string_btnUpdate_a) - $UpdateAvailable = 0 - EndIf - Case $btnUninstall $UninstQuery = MsgBox(48+4, $string_msgUninstall, $string_msgUninstall_msg) If $UninstQuery = 6 Then ;yes @@ -260,11 +235,6 @@ Func PatcherGUI() Global $icoUpdateStartup = GUICtrlCreateIcon($SwitchIconOn, -1, $btn_left+60, $lbl_item_top+3, 43, 16) If $OptUpdateStartup = 0 Then GUICtrlSetImage($icoUpdateStartup, $SwitchIconOff) - $lbl_item_top = $lbl_group_top+(4*$lbl_height)+2 - $lblUpdateBeta = GUICtrlCreateLabel($string_lblUpdateBeta, 68, $lbl_item_top, $lbl_width_max, $lbl_height) - Global $icoUpdateBeta = GUICtrlCreateIcon($SwitchIconOff, -1, $btn_left+60, $lbl_item_top+3, 43, 16) - If $OptUpdateBeta = 1 Then GUICtrlSetImage($icoUpdateBeta, $SwitchIconOn) - $lbl_group_end = $lbl_item_top+$lbl_height ;Uninstallation diff --git a/project/PatcherStrings.au3 b/project/PatcherStrings.au3 index 0a57428..5548091 100644 --- a/project/PatcherStrings.au3 +++ b/project/PatcherStrings.au3 @@ -115,7 +115,6 @@ Func _Strings_CPL() Global $string_btnUpdate_a = IniRead(@ScriptDir & "\lang\" & $lang & ".ini", "CPL", "btnUpdate_a", "Check now") Global $string_btnUpdate_b = IniRead(@ScriptDir & "\lang\" & $lang & ".ini", "CPL", "btnUpdate_b", "Apply Update") Global $string_lblUpdateStartup = IniRead(@ScriptDir & "\lang\" & $lang & ".ini", "CPL", "lblUpdateStartup", "Automatically check for a new version on system startup") - Global $string_lblUpdateBeta = IniRead(@ScriptDir & "\lang\" & $lang & ".ini", "CPL", "lblUpdateBeta", "Get Updates faster and search for BETA Versions") Global $string_lblUninstall = IniRead(@ScriptDir & "\lang\" & $lang & ".ini", "CPL", "lblUninstall", "Uninstall") Global $string_lblUninstallDesc = IniRead(@ScriptDir & "\lang\" & $lang & ".ini", "CPL", "lblUninstallDesc", "Completely remove the Patcher and all of its files") Global $string_btnUninstall = IniRead(@ScriptDir & "\lang\" & $lang & ".ini", "CPL", "btnUninstall", "Uninstall") diff --git a/project/Updater.au3 b/project/Updater.au3 index 45217be..fbb0646 100644 --- a/project/Updater.au3 +++ b/project/Updater.au3 @@ -15,9 +15,9 @@ #AutoIt3Wrapper_Res_requestedExecutionLevel=requireAdministrator ;Permissions Defines() ;Global Standards -$AppTitle = $AppName & " Updater" -$AppVersionInst = RegRead($AppRegKey, "Version") -$AppVersionLatest = "" +Global $AppTitle = $AppName & " Updater" +Global $AppVersionInst = RegRead($AppRegKey, "Version") +Global $AppVersionLatest _Strings_Updater() ;localized Strings ;Mode: Silent @@ -26,15 +26,6 @@ If not $CmdLine[0] = 0 Then If _StringInArray($CmdLine, '/S') Then $SilentInstall = 1 EndIf -;Option: Also install BETA Versions -If RegRead($AppRegKey, "Beta") = 1 or StringInStr($FilesURL, "BETA") > 0 Then - $OptUpdateBeta = 1 - $FilesURL = $FilesURL_Beta -Else - $OptUpdateBeta = 0 - $FilesURL = $FilesURL_Stable -EndIf - ;Create GUI $MainGUI = GUICreate($AppTitle, 491, 163, -1, -1) @@ -52,13 +43,13 @@ DirCreate(@ScriptDir & "\Themes") GUICtrlSetData($lblCurrent,$string_msgChecking) $AppVersionLatest = _CheckForUpdate() -If $AppVersionInst = $AppVersionLatest Then +If $AppVersionInst = $AppVersionLatest[0] Then GUICtrlSetData($lblOverall, $string_msgNoUpdate) If $SilentInstall = 0 Then Sleep(3000) Exit EndIf -If $AppVersionInst <> $AppVersionLatest Then +If $AppVersionInst <> $AppVersionLatest[0] Then $sDataChangelog = FileRead(@ScriptDir & "\Changelog.txt") $queryUpdate = MsgBox(4, $string_msgYesUpdate, $AppName & " " & $AppVersionLatest & " " & $string_msgYesUpdate_msg1 & @LF & @LF & $string_msgYesUpdate_msg2 & @LF & @LF & $sDataChangelog) @@ -73,8 +64,8 @@ EndIf ;Download GUICtrlSetData($lblCurrent, $string_msgDownloading) -$sUrl = $FilesURL & "/" & StringReplace($AppName, " ", "-") & "-LATEST.7z" -$sDest = @TempDir & "\" & StringReplace($AppName, " ", "-") & "-LATEST.7z" +$sUrl = $AppVersionLatest[1] +$sDest = @TempDir & "\" & StringReplace($AppName, " ", "-") & "-LATEST.exe" _DownloadLatestVersion($sUrl, $sDest) GUICtrlSetData($lblOverall, $string_msgDownloadDone) diff --git a/project/_Resources/_BuildRessources.au3 b/project/_Resources/_BuildRessources.au3 index 3244b23..4ef00ff 100644 --- a/project/_Resources/_BuildRessources.au3 +++ b/project/_Resources/_BuildRessources.au3 @@ -111,11 +111,7 @@ _ActionImages("bitmaps") _ActionImages("icons") ;Apps -_ActionApps("aimp", "all", 1) -_ActionMozilla() -_ActionApps("smplayer", "all", 1) -_ActionApps("jdownloader", "all", 1) -_ActionAppsMisc() ;misc in one pak +_ActionApps() ;misc in one pak DirRemove($TempDirMain, 1) @@ -182,56 +178,7 @@ Func _RoutineByTheme($dirSource, $dirTemp, $sFileOut, $sTheme) EndFunc -Func _ActionApps($sApp, $sThemes, $vRoutine = 1) - If StringInStr($sThemes, "tango") > 0 or $sThemes = "all" Then _RoutineApps($sApp, "tango", $vRoutine) - If StringInStr($sThemes, "tangerine") > 0 or $sThemes = "all" Then _RoutineApps($sApp, "tangerine", $vRoutine) - If StringInStr($sThemes, "gnome") > 0 or $sThemes = "all" Then _RoutineApps($sApp, "gnome", $vRoutine) - If StringInStr($sThemes, "cheser") > 0 or $sThemes = "all" Then _RoutineApps($sApp, "cheser", $vRoutine) - If StringInStr($sThemes, "gnome-brave") > 0 or $sThemes = "all" Then _RoutineApps($sApp, "gnome-brave", $vRoutine) - If StringInStr($sThemes, "gnome-human") > 0 or $sThemes = "all" Then _RoutineApps($sApp, "gnome-human", $vRoutine) - If StringInStr($sThemes, "gnome-noble") > 0 or $sThemes = "all" Then _RoutineApps($sApp, "gnome-noble", $vRoutine) - If StringInStr($sThemes, "gnome-wine") > 0 or $sThemes = "all" Then _RoutineApps($sApp, "gnome-wine", $vRoutine) - If StringInStr($sThemes, "gnome-wise") > 0 or $sThemes = "all" Then _RoutineApps($sApp, "gnome-wise", $vRoutine) - If StringInStr($sThemes, "elementary") > 0 or $sThemes = "all" Then _RoutineApps($sApp, "elementary", $vRoutine) - If StringInStr($sThemes, "humanity") > 0 or $sThemes = "all" Then _RoutineApps($sApp, "humanity", $vRoutine) -EndFunc - -Func _ActionMozilla() - _RoutineApps("firefox", "tango", 1, 1) - _RoutineApps("firefox-thunderbird", "tango", 2, 0) - - _RoutineApps("firefox", "tangerine", 1, 1) - _RoutineApps("firefox-thunderbird", "tangerine", 2, 0) - - _RoutineApps("firefox", "gnome", 1, 1) - _RoutineApps("firefox-thunderbird", "gnome", 2, 0) - - _RoutineApps("firefox", "cheser", 1, 1) - _RoutineApps("firefox-thunderbird", "cheser", 2, 0) - - _RoutineApps("firefox", "gnome-brave", 1, 1) - _RoutineApps("firefox-thunderbird", "gnome-brave", 2, 0) - - _RoutineApps("firefox", "gnome-human", 1, 1) - _RoutineApps("firefox-thunderbird", "gnome-human", 2, 0) - - _RoutineApps("firefox", "gnome-noble", 1, 1) - _RoutineApps("firefox-thunderbird", "gnome-noble", 2, 0) - - _RoutineApps("firefox", "gnome-wine", 1, 1) - _RoutineApps("firefox-thunderbird", "gnome-wine", 2, 0) - - _RoutineApps("firefox", "gnome-wise", 1, 1) - _RoutineApps("firefox-thunderbird", "gnome-wise", 2, 0) - - _RoutineApps("firefox", "elementary", 1, 1) - _RoutineApps("firefox-thunderbird", "elementary", 2, 0) - - _RoutineApps("firefox", "humanity", 1, 1) - _RoutineApps("firefox-thunderbird", "humanity", 2, 0) -EndFunc - -Func _ActionAppsMisc() +Func _ActionApps() $sTheme = "tango" _RoutineApps("crystaldiskinfo", $sTheme, 2, 1) ;_RoutineApps("foobar2000", $sTheme, 2, 1) ;only GNOME @@ -246,6 +193,13 @@ Func _ActionAppsMisc() _RoutineApps("utorrent", $sTheme, 2, 1) _RoutineApps("radiosure", $sTheme, 2, 1) _RoutineApps("winyl", $sTheme, 2, 1) + + _RoutineApps("aimp", $sTheme, 1, 1) + _RoutineApps("smplayer", $sTheme, 1, 1) + _RoutineApps("jdownloader", $sTheme, 1, 1) + _RoutineApps("firefox", $sTheme, 1, 1) + _RoutineApps("firefox-thunderbird", $sTheme, 2, 1) + _Compress("theme-apps-" & $sTheme & ".7z") DirRemove($TempDirMain, 1) @@ -263,6 +217,13 @@ Func _ActionAppsMisc() _RoutineApps("utorrent", $sTheme, 2, 1) _RoutineApps("radiosure", $sTheme, 2, 1) _RoutineApps("winyl", $sTheme, 2, 1) + + _RoutineApps("aimp", $sTheme, 1, 1) + _RoutineApps("smplayer", $sTheme, 1, 1) + _RoutineApps("jdownloader", $sTheme, 1, 1) + _RoutineApps("firefox", $sTheme, 1, 1) + _RoutineApps("firefox-thunderbird", $sTheme, 2, 1) + _Compress("theme-apps-" & $sTheme & ".7z") DirRemove($TempDirMain, 1) @@ -280,6 +241,13 @@ Func _ActionAppsMisc() _RoutineApps("utorrent", $sTheme, 2, 1) _RoutineApps("radiosure", $sTheme, 2, 1) _RoutineApps("winyl", $sTheme, 2, 1) + + _RoutineApps("aimp", $sTheme, 1, 1) + _RoutineApps("smplayer", $sTheme, 1, 1) + _RoutineApps("jdownloader", $sTheme, 1, 1) + _RoutineApps("firefox", $sTheme, 1, 1) + _RoutineApps("firefox-thunderbird", $sTheme, 2, 1) + _Compress("theme-apps-" & $sTheme & ".7z") DirRemove($TempDirMain, 1) @@ -297,6 +265,13 @@ Func _ActionAppsMisc() _RoutineApps("utorrent", $sTheme, 2, 1) ;_RoutineApps("radiosure", $sTheme, 2, 1) ;not CHESER ;_RoutineApps("winyl", $sTheme, 2, 1) ;not CHESER + + _RoutineApps("aimp", $sTheme, 1, 1) + _RoutineApps("smplayer", $sTheme, 1, 1) + _RoutineApps("jdownloader", $sTheme, 1, 1) + _RoutineApps("firefox", $sTheme, 1, 1) + _RoutineApps("firefox-thunderbird", $sTheme, 2, 1) + _Compress("theme-apps-" & $sTheme & ".7z") DirRemove($TempDirMain, 1) @@ -314,6 +289,13 @@ Func _ActionAppsMisc() _RoutineApps("utorrent", $sTheme, 2, 1) _RoutineApps("radiosure", $sTheme, 2, 1) _RoutineApps("winyl", $sTheme, 2, 1) + + _RoutineApps("aimp", $sTheme, 1, 1) + _RoutineApps("smplayer", $sTheme, 1, 1) + _RoutineApps("jdownloader", $sTheme, 1, 1) + _RoutineApps("firefox", $sTheme, 1, 1) + _RoutineApps("firefox-thunderbird", $sTheme, 2, 1) + _Compress("theme-apps-" & $sTheme & ".7z") DirRemove($TempDirMain, 1) @@ -331,6 +313,13 @@ Func _ActionAppsMisc() _RoutineApps("utorrent", $sTheme, 2, 1) _RoutineApps("radiosure", $sTheme, 2, 1) _RoutineApps("winyl", $sTheme, 2, 1) + + _RoutineApps("aimp", $sTheme, 1, 1) + _RoutineApps("smplayer", $sTheme, 1, 1) + _RoutineApps("jdownloader", $sTheme, 1, 1) + _RoutineApps("firefox", $sTheme, 1, 1) + _RoutineApps("firefox-thunderbird", $sTheme, 2, 1) + _Compress("theme-apps-" & $sTheme & ".7z") DirRemove($TempDirMain, 1) @@ -348,6 +337,13 @@ Func _ActionAppsMisc() _RoutineApps("utorrent", $sTheme, 2, 1) _RoutineApps("radiosure", $sTheme, 2, 1) _RoutineApps("winyl", $sTheme, 2, 1) + + _RoutineApps("aimp", $sTheme, 1, 1) + _RoutineApps("smplayer", $sTheme, 1, 1) + _RoutineApps("jdownloader", $sTheme, 1, 1) + _RoutineApps("firefox", $sTheme, 1, 1) + _RoutineApps("firefox-thunderbird", $sTheme, 2, 1) + _Compress("theme-apps-" & $sTheme & ".7z") DirRemove($TempDirMain, 1) @@ -365,6 +361,13 @@ Func _ActionAppsMisc() _RoutineApps("utorrent", $sTheme, 2, 1) _RoutineApps("radiosure", $sTheme, 2, 1) _RoutineApps("winyl", $sTheme, 2, 1) + + _RoutineApps("aimp", $sTheme, 1, 1) + _RoutineApps("smplayer", $sTheme, 1, 1) + _RoutineApps("jdownloader", $sTheme, 1, 1) + _RoutineApps("firefox", $sTheme, 1, 1) + _RoutineApps("firefox-thunderbird", $sTheme, 2, 1) + _Compress("theme-apps-" & $sTheme & ".7z") DirRemove($TempDirMain, 1) @@ -382,6 +385,13 @@ Func _ActionAppsMisc() _RoutineApps("utorrent", $sTheme, 2, 1) _RoutineApps("radiosure", $sTheme, 2, 1) _RoutineApps("winyl", $sTheme, 2, 1) + + _RoutineApps("aimp", $sTheme, 1, 1) + _RoutineApps("smplayer", $sTheme, 1, 1) + _RoutineApps("jdownloader", $sTheme, 1, 1) + _RoutineApps("firefox", $sTheme, 1, 1) + _RoutineApps("firefox-thunderbird", $sTheme, 2, 1) + _Compress("theme-apps-" & $sTheme & ".7z") DirRemove($TempDirMain, 1) @@ -400,6 +410,13 @@ Func _ActionAppsMisc() _RoutineApps("radiosure", $sTheme, 2, 1) _RoutineApps("vlc", $sTheme, 2, 1) _RoutineApps("winyl", $sTheme, 2, 1) + + _RoutineApps("aimp", $sTheme, 1, 1) + _RoutineApps("smplayer", $sTheme, 1, 1) + _RoutineApps("jdownloader", $sTheme, 1, 1) + _RoutineApps("firefox", $sTheme, 1, 1) + _RoutineApps("firefox-thunderbird", $sTheme, 2, 1) + _Compress("theme-apps-" & $sTheme & ".7z") DirRemove($TempDirMain, 1) @@ -417,6 +434,13 @@ Func _ActionAppsMisc() _RoutineApps("utorrent", $sTheme, 2, 1) _RoutineApps("radiosure", $sTheme, 2, 1) _RoutineApps("winyl", $sTheme, 2, 1) + + _RoutineApps("aimp", $sTheme, 1, 1) + _RoutineApps("smplayer", $sTheme, 1, 1) + _RoutineApps("jdownloader", $sTheme, 1, 1) + _RoutineApps("firefox", $sTheme, 1, 1) + _RoutineApps("firefox-thunderbird", $sTheme, 2, 1) + _Compress("theme-apps-" & $sTheme & ".7z") DirRemove($TempDirMain, 1) EndFunc diff --git a/project/_Resources/_BuildRessources.exe b/project/_Resources/_BuildRessources.exe index 4d8ba3d..db79052 100644 Binary files a/project/_Resources/_BuildRessources.exe and b/project/_Resources/_BuildRessources.exe differ