zoukankan      html  css  js  c++  java
  • Eclipse启动之一:外壳程序(百度空间迁移)

     

    当用户双击Eclipse.exe文件时,先进入到外壳程序。

    外壳程序的主要作用是读取配置文件,加载动态库和调用动态库函数

    源代码位于Plugin/org.eclipse.platform.source_xxx/launchersrc.zip压缩包中

    如果没有此文件夹,则可以从org.eclipse.platform.source_xxx.jar中解压缩得到

    外壳程序的入口函数位于eclipseMain.c文件中的main函数

    1.获取exe文件名字,如eclipse

    2.查找配置文件。如果传入参数有--launcher.ini ,则读取--launcher.ini指定的配置文件,否则读取exe文件名+'.ini'文件

    3.合并配置文件和传入的参数

    4.查找动态库位置

    动态库定位:

    4.1 如果所有参数中包含 --launcher.library 且 --launcher.library指定的路径为绝对路径,则直接定位到绝对路径

    4.2 如果所有参数中包含  --launcher.library 且 --launcher.library指定的路径为相对路径,则以exe文件所在路径为基准,计算出绝对路径

    4.3 如果所有参数中不包含  --launcher.library ,则到Plugin下查找以org.eclipse.equinox.launcher.wsname.osname.archname开头的目录

    wsname SWT supported GUI

    osname operation system name

    archname chip architecture name

    4.4 在之前定位的目录下查找以"Eclipse_"开头且后面连接的数字最大的dll

    5.加载动态的库

    6.调用动态库中的函数setArgs

    7.调用动态库中的函数runW

  • 相关阅读:
    LeetCode 169
    LeetCode 152
    LeetCode 238
    LeetCode 42
    LeetCode 11
    GDB基本调试
    小咪买东西(最大化平均值)
    codeforces 903D
    hdu 5883
    hdu 5874
  • 原文地址:https://www.cnblogs.com/fengpeng/p/4628361.html
Copyright © 2011-2022 走看看