javaruntimes/installer/starterdll/src/main.cpp
branchRCL_3
changeset 24 6c158198356e
parent 18 9ac0a0a7da70
equal deleted inserted replaced
23:e5618cc85d74 24:6c158198356e
   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);
   210         LOG(EJavaRuntime, EInfo,
   219         LOG(EJavaRuntime, EInfo,
   211             "InstallerStarter: startJavaCaptain javacaptain.exe was started ok");
   220             "InstallerStarter: startJavaCaptain javacaptain.exe was started ok");
   212 #endif
   221 #endif
   213 
   222 
   214         // Wait 3 seconds so that Java Captain has time to start
   223         // Wait 3 seconds so that Java Captain has time to start
   215         User::After(3000000);
   224         User::After(3000000); // codescanner::userafter
   216     }
   225     }
   217     else
   226     else
   218     {
   227     {
   219 #ifdef RD_JAVA_S60_RELEASE_5_0_IAD
   228 #ifdef RD_JAVA_S60_RELEASE_5_0_IAD
   220         ELOG1(EJavaRuntime,
   229         ELOG1(EJavaRuntime,
   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");
   367         L"com.nokia.mj.impl.installer.ui.eswt2.InstallerUiEswt");
   382         L"com.nokia.mj.impl.installer.ui.eswt2.InstallerUiEswt");
   368     // Replace RuntimeUi with installer specific implementation.
   383     // Replace RuntimeUi with installer specific implementation.
   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 #else
   387 #ifdef __SYMBIAN32__
       
   388 #ifndef __WINS__
       
   389     //jvm->appendSystemProperty(L"-Dcom.nokia.mj.impl.installer.ui.disableui=1");
       
   390 #endif //__WINS__
       
   391 #endif // __SYMBIAN32__
       
   392 #else // RD_JAVA_S60_RELEASE_10_1_ONWARDS
   373     jvm->appendSystemProperty(
   393     jvm->appendSystemProperty(
   374         L"-Dcom.nokia.mj.impl.installer.ui="
   394         L"-Dcom.nokia.mj.impl.installer.ui="
   375         L"com.nokia.mj.impl.installer.ui.eswt.InstallerUiEswt");
   395         L"com.nokia.mj.impl.installer.ui.eswt.InstallerUiEswt");
   376 #endif // RD_JAVA_S60_RELEASE_10_1_ONWARDS
   396 #endif // RD_JAVA_S60_RELEASE_10_1_ONWARDS
   377 #endif // RD_JAVA_INSTALLERUI_ENABLED
   397 #endif // RD_JAVA_INSTALLERUI_ENABLED