Here's how I've done my initialization in the past.
- All initialization scripts should end in *.init.il (SKILL) or *.init.ils (SKILL++)
- An initialization script, SKILL.init.il at the root of the repo will be called to initialize the library.
- Loads each of the source function scripts
- Each source function folder will have its own initialization script which loads all the files for that function.
Here's an example of the root initialization script:
/*****************************************************************
* *
* SKILL library initialization *
* *
*****************************************************************/
printf("Loading SKILL library\n")
let((file_path dir_path files)
; file and directory paths of this file
file_path = simplifyFilename(get_filename(piport))
dir_path = strcat("/" buildString(reverse(cdr(reverse(parseString(file_path "/")))) "/"))
files = list(
"cliosoft/Clio.init.il"
"navigation/Nav.init.il"
"schematic/Sch.init.il"
)
foreach(file files
loadi(strcat(dir_path "/src/" file))
)
)
printf("Done loading SKILL library\n")
Here's how I've done my initialization in the past.
Here's an example of the root initialization script: