@@ -93,6 +93,9 @@ downloadDir='downloads'
9393# The name of the dir holding the backend analysis services
9494analysisLayerDir=' AnalysisLayer'
9595
96+ :: The name of the dir holding the downloaded/sideloaded backend analysis services
97+ sideloadModulesDir=" modules"
98+
9699# Absolute paths :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
97100# The absolute path to the root directory of CodeProject.AI
98101currentDir=" $( pwd) "
@@ -102,6 +105,7 @@ cd $currentDir
102105
103106# The location of directories relative to the root of the solution directory
104107analysisLayerPath=" ${absoluteRootDir} /${srcDir} /${analysisLayerDir} "
108+ sideloadModulesPath=" ${absoluteRootDir} /${srcDir} /${sideloadModulesDir} "
105109downloadPath=" ${absoluteRootDir} /Installers/${downloadDir} "
106110
107111# Set Flags
@@ -200,7 +204,36 @@ for d in ${analysisLayerPath}/*/ ; do
200204 if [ -f " ${modulePath} /install.dev.sh" ]; then
201205
202206 # Pad right to 70 chars
203- announcement=$( printf %-70s " Processing ${moduleDir} " )
207+ announcement=$( printf %-70s " Processing pre-installed module ${moduleDir} " )
208+
209+ writeLine
210+ writeLine " ${announcement} " " White" " Blue"
211+ writeLine
212+
213+ correctLineEndings " ${modulePath} /install.dev.sh"
214+ source " ${modulePath} /install.dev.sh"
215+ fi
216+ fi
217+ done
218+
219+ # Walk through the sideloaded / downloaded modules directory and call the setup script in each dir
220+ for d in ${analysisLayerPath} /* / ; do
221+
222+ moduleDir=" $( basename $d ) "
223+ modulePath=$d
224+
225+ if [ " ${modulePath: -1} " == " /" ]; then
226+ modulePath=" ${modulePath: 0: ${# modulePath} -1} "
227+ fi
228+
229+ # dirname=${moduleDir,,} # requires bash 4.X, which isn't on macOS by default
230+ dirname=$( echo $moduleDir | tr ' [:upper:]' ' [:lower:]' )
231+ if [ " ${dirname} " != ' bin' ]; then
232+
233+ if [ -f " ${modulePath} /install.dev.sh" ]; then
234+
235+ # Pad right to 70 chars
236+ announcement=$( printf %-70s " Processing side-loaded module ${moduleDir} " )
204237
205238 writeLine
206239 writeLine " ${announcement} " " White" " Blue"
@@ -212,6 +245,17 @@ for d in ${analysisLayerPath}/*/ ; do
212245 fi
213246done
214247
248+ # demos
249+ moduleDir=" demos"
250+ modulePath=" ${absoluteRootDir} /${moduleDir} "
251+ announcement=$( printf %-70s " Processing demos" )
252+ writeLine
253+ writeLine " ${announcement} " " White" " Blue"
254+ writeLine
255+ correctLineEndings " ${modulePath} /install.dev.sh"
256+ source " ${modulePath} /install.dev.sh"
257+
258+
215259# libfontconfig1 is required for SkiaSharp, libgdplus is required for System.Drawing
216260if [ " ${verbosity} " == " quiet" ]; then
217261 write " Installing supporting image libraries..."
0 commit comments