The following code will save the specified private path, shared path, and backup path directory settings to the registry. This is necessary when the runtime distribution copy doesn't install the required directory settings to access these parts of your application.
For instance, my application folder under the program folder in windows has several sub folders. One of these sub folders contains my application files, another subfolder contains my archive database backups, and another contains my backup graphics files. At present the only automatic presets in Alpha5 track the location of the exe files path and the location of the applications files path, with options for defining the location of the shared, private, and backup directories.
Aliases can use variations on all five of these predefined directory path settings. However, to use them all requires defining the shared, private, and backup directory paths. These definitions are not automatically distributed with the runtime creation which means the developer must define them during the installation at load time. This code will update the registry with the defined settings so that the Alpha5 runtime engine can read them on load and work with your aliases and their directory presets.
In the following code, the:
<App_Folder> is the root directory for your application
<Exe_Path> is the directory for your runtime files
<App_Path> is the directory for your application files
dim varSharedPath as c
dim varPrivatePath as c
dim varBackupPath as c
varPrivatePath = "C:"+chr(92)+"Program Files"+chr(92)+"<App_Folder>\\"
varSharedPath = "<Exe_Path>"
varBackupPath = "[App_Path]Archive Database\\"
paths.private = varPrivatePath
paths.shared = varSharedPath
backup.folder = varBackupPath
:registry.save_settings("init\paths",paths)
:registry.save_settings("init\backup",backup)
I hope this helps those with runtime distribution questions.
Kind regards,
Gordon MacCarthy,
SCS
For instance, my application folder under the program folder in windows has several sub folders. One of these sub folders contains my application files, another subfolder contains my archive database backups, and another contains my backup graphics files. At present the only automatic presets in Alpha5 track the location of the exe files path and the location of the applications files path, with options for defining the location of the shared, private, and backup directories.
Aliases can use variations on all five of these predefined directory path settings. However, to use them all requires defining the shared, private, and backup directory paths. These definitions are not automatically distributed with the runtime creation which means the developer must define them during the installation at load time. This code will update the registry with the defined settings so that the Alpha5 runtime engine can read them on load and work with your aliases and their directory presets.
In the following code, the:
<App_Folder> is the root directory for your application
<Exe_Path> is the directory for your runtime files
<App_Path> is the directory for your application files
dim varSharedPath as c
dim varPrivatePath as c
dim varBackupPath as c
varPrivatePath = "C:"+chr(92)+"Program Files"+chr(92)+"<App_Folder>\\"
varSharedPath = "<Exe_Path>"
varBackupPath = "[App_Path]Archive Database\\"
paths.private = varPrivatePath
paths.shared = varSharedPath
backup.folder = varBackupPath
:registry.save_settings("init\paths",paths)
:registry.save_settings("init\backup",backup)
I hope this helps those with runtime distribution questions.
Kind regards,
Gordon MacCarthy,
SCS