-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathOpenUpdater_menu.xys
46 lines (35 loc) · 1.73 KB
/
OpenUpdater_menu.xys
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
// Provides the menu structure that refers to the OpenUpdater base script for
// the scripts that do the actual work.
"_Config"
global $updater, $iniFile;
// --------- user configuration settings -----------------------------------
// Filename or path/filename (relative or absolute) of the ini file.
// If it doesn't exist, it will be created.
$iniFile = self("path")."\OpenUpdater.ini";
// Path (relative or absolute) to the folder of the main script.
// Path/filename of the main script. This only applies if the ini file
// doesn't contain this setting.
$updaterDir = self("path")."\OpenUpdater";
// --------- end user configuration settings -------------------------------
// --------- DO NOT MODIFY BELOW THIS LINE ---------------------------------
// Get the path to the main updater file from the ini
// Creates the ini file if it doesn't exist, using the defaults from the
// configuration settings above.
$dir = getkey("UpdaterDir", "OpenUpdater", $iniFile);
if ($dir == "") {
$dir = $updaterDir;
setkey($updaterDir, "UpdaterDir", "OpenUpdater", $iniFile);
}
// Add the filename to the path
$updater = $dir . "\OpenUpdater.xys";
// Let the main script set up or read the .ini file and initialize
load($updater, "_Config");
"Check for Updates|<xypath>\<xyexe>|1 : CheckForUpdates"
global $updater; sub "_Config"; load($updater, "_CheckForUpdates");
"-"
"Clear cache|:labels : ClearCache"
global $updater; sub "_Config"; load($updater, "_ClearCache");
"Revert/Upgrade to a downloaded package|:meta : RevertOrUpgrade"
global $updater; sub "_Config"; load($updater, "_RevertOrUpgrade");
"Clean old downloaded packages|:del : CleanOldPackages"
global $updater; sub "_Config"; load($updater, "_CleanOldPackages");