+ added U3Helper-GUID to variable U3HUUID
+ added example manifest to SVN x also copy empty directories on hostConfigure / hostCleanUp x hostCleanUp fails if device is unplugged (Issue: 2,9)
This commit is contained in:
parent
180a78acc2
commit
61831aed16
@ -100,28 +100,41 @@ Else
|
||||
OutIndex = %A_Index%
|
||||
FileCount = 0
|
||||
SetWorkingDir %U3_HOST_EXEC_PATH%\%CurFile%
|
||||
Loop *.*, 0, 1
|
||||
Loop *.*, 1, 1
|
||||
{
|
||||
FileCount++
|
||||
}
|
||||
Loop *.*, 0, 1
|
||||
Loop *.*, 1, 1
|
||||
{
|
||||
Progress % StepsPos*StepsStep+StepsStep*(OutIndex-1.00+(A_Index/FileCount))/datexe0, Saving data directory %CurFile% ... (CPY:%Copied% / SKP:%Skipped% / ERR:%Errors%)
|
||||
FileCopyNewer(A_LoopFileLongPath, U3_APP_DATA_PATH . "\" CurFile . "\" . A_LoopFileFullPath)
|
||||
If ErrorLevel = 2
|
||||
{
|
||||
CopyErrors .= "Dir-entry: " . CurFile . "\" . A_LoopFileFullPath . " (Error while copying)`n"
|
||||
Errors++
|
||||
FileGetAttrib FAttr, %A_LoopFileLongPath%
|
||||
IfInString FAttr, D
|
||||
{
|
||||
IfNotExist %U3_APP_DATA_PATH%\%CurFile%\%A_LoopFileFullPath%
|
||||
FileCreateDir %U3_APP_DATA_PATH%\%CurFile%\%A_LoopFileFullPath%
|
||||
If ErrorLevel
|
||||
Errors++
|
||||
Else
|
||||
Copied++
|
||||
}
|
||||
else if ErrorLevel = 1
|
||||
{
|
||||
CopyErrors .= "Dir-entry: " . CurFile . "\" . A_LoopFileFullPath . " (File does not exist)`n"
|
||||
Errors++
|
||||
Else
|
||||
{
|
||||
FileCopyNewer(A_LoopFileLongPath, U3_APP_DATA_PATH . "\" CurFile . "\" . A_LoopFileFullPath)
|
||||
If ErrorLevel = 2
|
||||
{
|
||||
CopyErrors .= "Dir-entry: " . CurFile . "\" . A_LoopFileFullPath . " (Error while copying)`n"
|
||||
Errors++
|
||||
}
|
||||
else if ErrorLevel = 1
|
||||
{
|
||||
CopyErrors .= "Dir-entry: " . CurFile . "\" . A_LoopFileFullPath . " (File does not exist)`n"
|
||||
Errors++
|
||||
}
|
||||
else if ErrorLevel = -1
|
||||
Skipped++
|
||||
else
|
||||
Copied++
|
||||
}
|
||||
else if ErrorLevel = -1
|
||||
Skipped++
|
||||
else
|
||||
Copied++
|
||||
}
|
||||
SetWorkingDir %A_ScriptDir%
|
||||
}
|
||||
|
@ -5,6 +5,8 @@
|
||||
; ##########################################################################
|
||||
|
||||
StepsAll = 0
|
||||
IfNotExist %U3_HOST_EXEC_PATH%\%A_ScriptName%
|
||||
StepsAll++
|
||||
If regsvr0 > 0
|
||||
StepsAll++
|
||||
If datini0 > 0
|
||||
@ -21,7 +23,15 @@ StepsPos = 0
|
||||
Progress b2 x%PL% y%PT% w%PW% m FM%PFM% FS%PFS%, U3Helper %U3HVer% - (c)2006-2007 Markus Birth <mbirth@webwriters.de>, Preparing %AppName% ..., AHKProgress-%AppName%
|
||||
WinSet Transparent, %PTrans%, AHKProgress-%AppName%
|
||||
|
||||
Progress, , Checking registry settings...
|
||||
; made following step not to display b/c it occurs only once on the first launch of any U3H-app
|
||||
IfNotExist %U3_HOST_EXEC_PATH%\%A_ScriptName%
|
||||
{
|
||||
Progress % StepsPos*StepsStep, Copying U3Helper to disk...
|
||||
FileCopy %A_ScriptFullPath%, %U3_HOST_EXEC_PATH%\%A_ScriptName%, 0
|
||||
StepsPos++
|
||||
}
|
||||
|
||||
Progress % StepsPos*StepsStep, Checking registry settings...
|
||||
keycount = 0
|
||||
;Registry stuff
|
||||
Loop %regbak0%
|
||||
@ -143,18 +153,27 @@ Loop %datexe0%
|
||||
OutIndex = %A_Index%
|
||||
FileCount = 0
|
||||
SetWorkingDir %U3_APP_DATA_PATH%\%CurFile%
|
||||
Loop *.*, 0, 1
|
||||
Loop *.*, 1, 1
|
||||
{
|
||||
FileCount++
|
||||
}
|
||||
IfNotExist %U3_HOST_EXEC_PATH%\%CurFile%
|
||||
FileCreateDir %U3_HOST_EXEC_PATH%\%CurFile%
|
||||
Loop *.*, 0, 1
|
||||
Loop *.*, 1, 1
|
||||
{
|
||||
Progress % StepsPos*StepsStep+StepsStep*(OutIndex-1.00+(A_Index/FileCount))/datexe0, Copying data directory %CurFile% ... (CPY:%Copied% / ERR:%Errors%)
|
||||
IfNotExist %U3_HOST_EXEC_PATH%\%CurFile%\%A_LoopFileDir%
|
||||
FileCreateDir %U3_HOST_EXEC_PATH%\%CurFile%\%A_LoopFileDir%
|
||||
FileCopy %A_LoopFileLongPath%, %U3_HOST_EXEC_PATH%\%CurFile%\%A_LoopFileFullPath%, 1
|
||||
FileGetAttrib FAttr, %A_LoopFileLongPath%
|
||||
IfInString FAttr, D
|
||||
{
|
||||
IfNotExist %U3_HOST_EXEC_PATH%\%CurFile%\%A_LoopFileFullPath%
|
||||
FileCreateDir %U3_HOST_EXEC_PATH%\%CurFile%\%A_LoopFileFullPath%
|
||||
}
|
||||
Else
|
||||
{
|
||||
IfNotExist %U3_HOST_EXEC_PATH%\%CurFile%\%A_LoopFileDir%
|
||||
FileCreateDir %U3_HOST_EXEC_PATH%\%CurFile%\%A_LoopFileDir%
|
||||
FileCopy %A_LoopFileLongPath%, %U3_HOST_EXEC_PATH%\%CurFile%\%A_LoopFileFullPath%, 1
|
||||
}
|
||||
If ErrorLevel
|
||||
Errors++
|
||||
Else
|
||||
|
@ -3,7 +3,8 @@
|
||||
#Include mb_EnvTools.ahk
|
||||
#Include mb_IniTools.ahk
|
||||
#Include mb_TextTools.ahk
|
||||
U3HVer = 2.0
|
||||
U3HVer = 2.1
|
||||
U3HUUID = 0f90f88c-5e05-4cab-8c3a-e1c0112b06fd
|
||||
|
||||
U3_APP_DATA_PATH := EnvValue("U3_APP_DATA_PATH")
|
||||
U3_HOST_EXEC_PATH := EnvValue("U3_HOST_EXEC_PATH")
|
||||
|
18
manifestex.u3i
Normal file
18
manifestex.u3i
Normal file
@ -0,0 +1,18 @@
|
||||
<u3manifest version="1.0">
|
||||
<application uuid="6873fef3-2000-44ff-81fa-f1a1aa0797a7" version="1.31.0.0325">
|
||||
<icon>CCleaner.ico</icon>
|
||||
<name>CCleaner</name>
|
||||
<vendor url="http://www.ccleaner.com/">Piriform Ltd.</vendor>
|
||||
<description>CCleaner is a freeware system optimization and privacy tool. It removes unused files from your system - allowing Windows to run faster and freeing up valuable hard disk space. It also cleans traces of your online activities such as your Internet history.</description>
|
||||
<options>
|
||||
<upgrade appData="add" deviceExec="add" />
|
||||
<minFreeSpace>2.0</minFreeSpace>
|
||||
</options>
|
||||
</application>
|
||||
<actions>
|
||||
<hostConfigure cmd="%U3_DEVICE_EXEC_PATH%\..\..\0f90f88c-5e05-4cab-8c3a-e1c0112b06fd\Exec\U3Helper.exe">config</hostConfigure>
|
||||
<appStart workingdir="%U3_APP_DATA_PATH%" cmd="%U3_HOST_EXEC_PATH%\ccleaner.exe"></appStart>
|
||||
<appStop cmd="%U3_HOST_EXEC_PATH%\U3Helper.exe">appstop</appStop>
|
||||
<hostCleanUp cmd="%U3_HOST_EXEC_PATH%\U3Helper.exe">unconfig</hostCleanUp>
|
||||
</actions>
|
||||
</u3manifest>
|
Reference in New Issue
Block a user