javaruntimes/installer/starterdll/src/main.cpp
changeset 61 bf7ee68962da
parent 48 e0d6e9bd3ca7
equal deleted inserted replaced
48:e0d6e9bd3ca7 61:bf7ee68962da
   147         WLOG(EJavaRuntime, "Installer already running. Exiting.");
   147         WLOG(EJavaRuntime, "Installer already running. Exiting.");
   148         JavaOsLayer::startUpTrace("INSTALLER main() end", -1, -1);
   148         JavaOsLayer::startUpTrace("INSTALLER main() end", -1, -1);
   149         return INSTALLER_ALREADY_RUNNING;
   149         return INSTALLER_ALREADY_RUNNING;
   150     }
   150     }
   151 
   151 
       
   152     // Check whether executing this process during first boot.
       
   153     ret = JavaCommonUtils::initIsFirstBoot();
       
   154     if (0 != ret)
       
   155     {
       
   156         ELOG1(EJavaRuntime, 
       
   157             "INSTALLER main() Cannot create first_boot_done.dat flag file, errno.h err %d",
       
   158             ret);
       
   159     }
       
   160 
   152     int result = -1;
   161     int result = -1;
   153     try
   162     try
   154     {
   163     {
   155         // Start the VM.
   164         // Start the VM.
   156         result = startJvm(argc, argv);
   165         result = startJvm(argc, argv);
   346 
   355 
   347     // Set the old heap size to 512K
   356     // Set the old heap size to 512K
   348     const int oldHeapSize = 512;
   357     const int oldHeapSize = 512;
   349     jvm->overrideOldHeapSize(oldHeapSize);
   358     jvm->overrideOldHeapSize(oldHeapSize);
   350 
   359 
       
   360 #ifdef __WINSCW__
       
   361     // Setting smaller max heap in the emulator.
       
   362     const int maxHeapSize = 8 * 1024; // 8 MB
       
   363     jvm->overrideMaxHeapSize(maxHeapSize);
       
   364 #endif  // __WINSCW__
       
   365 
   351     jvm->enableThreadDumping();
   366     jvm->enableThreadDumping();
   352 
   367 
   353     jvm->setMainClass(INSTALLER_MAIN_CLASS);
   368     jvm->setMainClass(INSTALLER_MAIN_CLASS);
   354 
   369 
   355     jvm->appendSystemProperty(L"-Dcom.nokia.rt.port=installer");
   370     jvm->appendSystemProperty(L"-Dcom.nokia.rt.port=installer");
   369     jvm->appendSystemProperty(
   384     jvm->appendSystemProperty(
   370         L"-Dcom.nokia.mj.impl.rt.ui="
   385         L"-Dcom.nokia.mj.impl.rt.ui="
   371         L"com.nokia.mj.impl.installer.ui.eswt2.InstallerRuntimeUi");
   386         L"com.nokia.mj.impl.installer.ui.eswt2.InstallerRuntimeUi");
   372 #ifdef __SYMBIAN32__
   387 #ifdef __SYMBIAN32__
   373 #ifndef __WINS__
   388 #ifndef __WINS__
   374     jvm->appendSystemProperty(L"-Dcom.nokia.mj.impl.installer.ui.disableui=1");
   389     //jvm->appendSystemProperty(L"-Dcom.nokia.mj.impl.installer.ui.disableui=1");
   375 #endif //__WINS__
   390 #endif //__WINS__
   376 #endif // __SYMBIAN32__
   391 #endif // __SYMBIAN32__
   377 #else // RD_JAVA_S60_RELEASE_10_1_ONWARDS
   392 #else // RD_JAVA_S60_RELEASE_10_1_ONWARDS
   378     jvm->appendSystemProperty(
   393     jvm->appendSystemProperty(
   379         L"-Dcom.nokia.mj.impl.installer.ui="
   394         L"-Dcom.nokia.mj.impl.installer.ui="