diff --git a/src/parameters/parameters.m b/src/parameters/parameters.m index 0d898907a7..d2d80d71e0 100644 --- a/src/parameters/parameters.m +++ b/src/parameters/parameters.m @@ -1,6 +1,7 @@ #import #include "pharovm/pharo.h" #include "pharovm/parameters/parameters.h" +#include "pharovm/parameters/parameterVector.h" #include "pharovm/debug.h" #include "pharovm/pathUtilities.h" @@ -28,7 +29,7 @@ CFNumberRef maxOldSpaceSizeRef; CFNumberRef edenSizeRef; CFNumberRef codeSizeRef; - + CFArrayRef argumentsRef; mainBundle = CFBundleGetMainBundle(); @@ -84,7 +85,6 @@ parameters->isWorker = !CFBooleanGetValue(workerRef); } - maxFramesToLogRef = CFBundleGetValueForInfoDictionaryKey(mainBundle, CFSTR("PharoMaxFramesToLog")); if(maxFramesToLogRef != NULL){ @@ -109,4 +109,23 @@ CFNumberGetValue(codeSizeRef, kCFNumberSInt64Type, ¶meters->maxCodeSize); } + + argumentsRef = CFBundleGetValueForInfoDictionaryKey(mainBundle, CFSTR("PharoImageParameters")); + + if(argumentsRef != NULL){ + CFIndex count = CFArrayGetCount(argumentsRef); + + for(CFIndex i=0; i < count; i++){ + CFStringRef value = CFArrayGetValueAtIndex(argumentsRef, i); + + if(value != NULL){ + char* valueString = calloc(1, 255+1); + + CFStringGetCString(value, valueString, 255 + 1, kCFStringEncodingUTF8); + vm_parameter_vector_insert_from(¶meters->imageParameters, 1, &valueString); + } + + } + } + }