45 lines
1.3 KiB
Plaintext
45 lines
1.3 KiB
Plaintext
|
//******************************************************************************
|
|||
|
//
|
|||
|
// <20><>Ȩ<EFBFBD><C8A8><EFBFBD><EFBFBD>: <20><>Ϫʱ<CFAA><CAB1><EFBFBD>Ƽ<EFBFBD><C6BC><EFBFBD><EFBFBD><EFBFBD>˾
|
|||
|
// <20><>ϵ<EFBFBD><CFB5><EFBFBD><EFBFBD>: q.100@qq.com
|
|||
|
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>: 2024/03/20
|
|||
|
//
|
|||
|
//******************************************************************************
|
|||
|
|
|||
|
global proc SGUpdatePlugin ()
|
|||
|
{
|
|||
|
string $path_folder = `getenv("SG_PATH")` + "plug-ins-update";
|
|||
|
if(`file -q -ex $path_folder`){
|
|||
|
SGUnloadPlugin;
|
|||
|
string $version[] = {"2018","2019","2020","2022","2023","2024"};
|
|||
|
for($i=0; $i<size($version); $i++){
|
|||
|
string $path_update = `getenv("SG_PATH")` + "plug-ins-update/" + $version[$i];
|
|||
|
string $path = `getenv("SG_PATH")` + "plug-ins/" + $version[$i];
|
|||
|
string $plugins[] = `getFileList -fld $path_update -fs "*.mll"`;
|
|||
|
for($plugin in $plugins){
|
|||
|
string $new = $path_update + "/" + $plugin;
|
|||
|
string $old = $path + "/" + $plugin;
|
|||
|
if(`sysFile -copy $old $new`){
|
|||
|
print ($old + " update successd...\n");
|
|||
|
sysFile -delete $new;
|
|||
|
}
|
|||
|
else{
|
|||
|
print ($old + " update failing...\n");
|
|||
|
}
|
|||
|
}
|
|||
|
sysFile -removeEmptyDir $path_update;
|
|||
|
}
|
|||
|
sysFile -removeEmptyDir $path_folder;
|
|||
|
}
|
|||
|
}
|
|||
|
|
|||
|
global proc SGUnloadPlugin ()
|
|||
|
{
|
|||
|
string $version = `about -v`;
|
|||
|
if(`pluginInfo -q -l ("SuperRiggingEditor" + $version)`){
|
|||
|
unloadPlugin ("SuperRiggingEditor" + $version);
|
|||
|
}
|
|||
|
}
|
|||
|
|
|||
|
|