Loading of Settings - re-pesk/phpDesktop-mod GitHub Wiki

The way the modified phpdesktop loads it's settings was reworked.

Application now firstly loads chain of files in the json format until the branch named Settings was found. Each of files in the chain excepting the last one must contain at least FileName, storing the name of the next file in the chain.

Each of files in the chain can contain Path value storing the name of the folder where the next configuration file must be searched. The name of the first file in the chain is start.conf and it is located in the folder where phpdesktop-chrome.exe is placed. It can contain SubFolder value storing the name of subfolder in the path where configuration files must be placed.

File containing Settings value stores name of real settings file; it's FileName value (if exists) is ignored. File is exactly the same as settings.json file of original phpDesktop.

Example:

Folder where phpdesktop-chrome.exe is placed contains start.conf file:

{
	"SubFolder": "_conf",
	"FileName": "app.conf"
}

File _conf/app.conf (<SubFolder>/<FileName>) contains:

	"Path"    : "_apps/Example",
	"FileName": "app.conf"

File _apps/Example/_conf/app.conf (<Path>/<SubFolder>/<FileName>) contains:

	"Settings": "settings.json"

File _apps/Example/_conf/settings.json (<Path>/<SubFolder>/<FileName>) is the same as settings.json file of original phpDesktop.

⚠️ **GitHub.com Fallback** ⚠️