从头开始构建Eclipse IDE - 如何通过JDT选择CDT? [英] Building Eclipse IDE from scratch - how to choose CDT over JDT?

查看:149
本文介绍了从头开始构建Eclipse IDE - 如何通过JDT选择CDT?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

最近我决定从头开始构建Eclipse IDE,所以我可以自由地根据需要进行调整。我正在采取的第一个动作是扩大图标。即使最新的Eclipse Neon版本在4k显示屏上仍然有一些小图标。





我发现以下教程指导我从头开始构建Eclipse的过程: http://www.vogella.com/tutorials/EclipsePlatformDevelopment/article.html



特别是该教程的第13章是有帮助的。我会描述在这里需要逐步采取的步骤,所以你不需要阅读vogella教程。



需要的软件: strong>



显然,您需要在(Windows)机器上安装以下软件:




  • Git

  • Maven版本3.3.1(请确保您将提取Maven的bin文件夹添加到PATH中。有关安装说明,请参阅 https://maven.apache.org/install.html

  • Oracle 1.8 JDK或更高版本(不要忘记设置JAVA_HOME环境变量)



现在您可以开始:



步骤1:



C中创建一个新文件夹: \ 磁盘。让我们命名为 C:\myEclipse 。这将是我们提取最新Eclipse版本的Git仓库的文件夹。



步骤2:



以管理员权限打开Windows cmd shell(右键单击 cmd 图标,如果您在桌面上创建一个,并选择打开管理员权限)。通过命令 cd C:\myEclipse 转到该文件夹​​。现在键入以下命令: git config --system core.longpaths true 。这将通知Git可以在存储库中发生长名称。



步骤3:



克隆Git仓库:

  git clone -b master --recursive git://git.eclipse.org/gitroot /platform/eclipse.platform.releng.aggregator.git 

显然,这个git存储库包含Eclipse IDE,安装JDT我不是Java开发人员,所以我想要其他选项。
经过大量的搜索,我终于找到了git仓库选择列表的网页: https://git.eclipse.org/r/#/admin/projects/?filter=platform 选择是无止境的:




  • git clone git://git.eclipse.org/gitroot/platform/eclipse.platform

  • git clone git://git.eclipse .org / gitroot / platform / eclipse.platform.common

  • git clone git://git.eclipse.org/gitroot/platform/eclipse.platform.debug

  • git clone git://git.eclipse.org/gitroot/platform/eclipse.platform.images

  • git clone git://git.eclipse.org/gitroot /platform/eclipse.platform.news

  • git clone git://git.eclipse.org/gitroot/platform/eclipse.platform.releng

  • ...



我应该选择哪一个来构建准系统的Eclipse平台?哪个用于安装CDT的Eclipse平台?



步骤4:



<最后是时候开始构建了。构建过程已经需要几个小时,所以跳过单元测试是明智之举。因此,不要忘记添加 -DskipTests 参数。这是开始构建的命令:

  mvn clean verify -DskipTests 
/ pre>

几个小时后,构建应该完成。



步骤5:



构建的结果现在应该在以下文件夹:



C:\myEclipse\eclipse.platform.releng.aggregator\eclipse.platform.releng.tychoeclipsebuilder\sdk \target\products



问题:


  1. 当您运行生成的 eclipse.exe 文件时,您会注意到您正在处理Eclipse for Java开发者。这就是我的理解 - 基本的Eclipse平台加上JDT(Java Development Tools)插件。我不是Java开发人员,而是希望用纯C编程的CDT插件(C开发工具)构建基本的Eclipse平台。如何做到这一点?


  2. 请注意,Eclipse IDE是为所有可能的目标机器构建的。 32位Windows,64位Windows,Macintosh,Linux,...难怪需要几个小时!我想为仅一个目标构建一个目标,例如我的64位Windows机器。这将有望大大减少构建时间,并允许我更快地验证代码更改。我已经在这里发布了这个问题:建筑Eclipse IDE从头开始 - 如何指定目标操作系统?
    不幸的是,给出的问题答案并没有导致正确的结果。


  3. 我想要修复的第三个问题是图标大小。 Eclipse有痛苦的小图标。对于有兴趣让他们更大的人,请参考这个StackOverflow问题:从头开始构建Eclipse IDE - 制作更大的图标有时成功


谢谢很多的帮助。

解决方案

对于您的CDT问题,我会尝试获取纯UI首先然后添加 CDT



对于您的Maven问题,请查看maven代码,看看是否有选项建立。我无法真正帮助太多,无法看到maven文件。


Lately I decided to build the Eclipse IDE from scratch - so I have the freedom to tweak it to my needs. The very first action I'm taking is enlarging the icons. Even the newest Eclipse Neon edition has still somewhat small icons on a 4k display.

I found the following tutorial to guide me through the procedure of building Eclipse from scratch: http://www.vogella.com/tutorials/EclipsePlatformDevelopment/article.html

Especially chapter 13 of that Tutorial is helpful. I will describe the steps that need to be taken one by one here - so you don't need to read the vogella tutorial.

NEEDED SOFTWARE :

Apparently you need to have the following software installed on your (Windows) machine:

  • Git
  • Maven Version 3.3.1 (make sure that the bin folder where you extract Maven is added to the PATH. For installation instructions see https://maven.apache.org/install.html)
  • Oracle 1.8 JDK or higher (don't forget to set the JAVA_HOME environment variable)

Now you're ready to start:

STEP 1 :

Create a new folder in the C:\ disk. Let's name it C:\myEclipse. This will be the folder in which we pull the Git repository of the latest Eclipse version.

STEP 2 :

Open the Windows cmd shell with administrator privileges (right click on cmd icon if you made one on your desktop, and select open with admin rights). Go to that folder through the command cd C:\myEclipse. Now type the following command: git config --system core.longpaths true. This notifies Git that long names can occur in the repository. Forget this command and it will result in errors later on.

STEP 3 :

Clone the Git repository:

git clone -b master --recursive git://git.eclipse.org/gitroot/platform/eclipse.platform.releng.aggregator.git

Apparently this git repository contains the Eclipse IDE with JDT installed. I'm not a Java developer, so I'd like other options. After lots of searching, I finally found the webpage where the choices of git repositories is listed: https://git.eclipse.org/r/#/admin/projects/?filter=platform The choices are endless:

  • git clone git://git.eclipse.org/gitroot/platform/eclipse.platform
  • git clone git://git.eclipse.org/gitroot/platform/eclipse.platform.common
  • git clone git://git.eclipse.org/gitroot/platform/eclipse.platform.debug
  • git clone git://git.eclipse.org/gitroot/platform/eclipse.platform.images
  • git clone git://git.eclipse.org/gitroot/platform/eclipse.platform.news
  • git clone git://git.eclipse.org/gitroot/platform/eclipse.platform.releng
  • ...

Which one should I choose to build the barebones Eclipse platform? And which one for building the Eclipse platform with CDT installed?

STEP 4 :

Finally it is time to start the build. The build procedure will already take hours, so it is wise to skip the unit tests. Therefore do not forget to add the -DskipTests parameter. This is the command to start the build:

mvn clean verify -DskipTests

After some hours, the build should be finished.

STEP 5 :

The results of the build should now be in the following folder:

C:\myEclipse\eclipse.platform.releng.aggregator\eclipse.platform.releng.tychoeclipsebuilder\sdk\target\products

THE QUESTIONS :

  1. When you run the resulting eclipse.exe file, you'll notice that you're dealing with the Eclipse for Java Developers. That is - to my understanding - the basic Eclipse platform plus the JDT (Java Development Tools) plugin. I am not a Java Developer, and would like to build the basic Eclipse platform with the CDT plugin (C Development Tools) for pure C programming. How do I do that?

  2. Notice that the Eclipse IDE is built for all possible target machines. 32-bit Windows, 64-bit Windows, Macintosh, Linux, ... No wonder it takes hours! I would like to build for just one single target - for example my 64-bit Windows machine. This will hopefully reduce the build time significantly and allow me to verify code changes quicker. I've already posted this question here: Building Eclipse IDE from scratch - how to specify the target OS? Unfortunately, the given answers to that question did not lead to a correct result.

  3. The third issue I'm trying to fix is the icon size. Eclipse has painfully small icons. For those who are interested in making them bigger, please refer to this StackOverflow question: Building Eclipse IDE from scratch - making bigger icons sometimes successful

Thank you so much for your help.

解决方案

For your CDT issue, I would try getting the pure UI first then add in the CDT

As for your Maven issue, look at the maven code and see if there are options for how to build. I can't really help too much without being able to see the maven file.

这篇关于从头开始构建Eclipse IDE - 如何通过JDT选择CDT?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆