21

Linuxのスクリプトから完全に無人の方法で高度にカスタマイズされたEclipseコーディング環境をセットアップする方法が必要です。カスタマイズされたEclipse環境では、さまざまなソース(protobuf、pydev、cmakeed、openinterminal、egit、yaml、webpageeditorなど)から約10個の異なるプラグインをインストールする必要があります。GUIを使用して毎回手動でこれを行うには、20〜30分かかります。スクリプト内のプラグインのインストールを自動化して、Linuxを実行しているすべての人が、人間の介入なしにプラグインのカスタムセットを使用して私のEclipse環境を再作成できるようにしたいです。誰かがこれを行う方法についてアドバイスがありますか?

4

2 に答える 2

22

これが私のお気に入りのプラグインのいくつかをインストールするためのコマンドラインスニペットです(Eclipse Indigo 3.7でテスト済み)...トリックはパッケージの「installIU」パラメーターの値を把握することです...EclipseGUIは次の場合にこれを表示しますインストーラーウィンドウで目的のパッケージが選択されたら、[詳細]リンクをクリックします。

cmakeed -CMakeエディター

eclipse -nosplash -application org.eclipse.equinox.p2.director -repository http://download.eclipse.org/releases/indigo/,http://cmakeed.sourceforge.net/eclipse/ -installIU com.cthing.cmakeed.feature.feature.group

OpenInTerminal-コンテキストメニューにオプションを追加

eclipse -nosplash -application org.eclipse.equinox.p2.director -repository http://download.eclipse.org/releases/indigo/,http://eclipse-openinterminal.googlecode.com/svn/trunk/site/ -installIU OpenInTerminal.feature.group

protobuf-dt -GoogleProtobufferエディター

eclipse -nosplash -application org.eclipse.equinox.p2.director -repository http://download.eclipse.org/releases/indigo/,http://download.eclipse.org/modeling/tmf/xtext/updates/composite/releases/,http://protobuf-dt.googlecode.com/git/update-site -installIU com.google.eclipse.protobuf.feature.group

yedit -YAMLエディター

eclipse -nosplash -application org.eclipse.equinox.p2.director -repository http://download.eclipse.org/releases/indigo/,http://dadacoalition.org/yedit -installIU org.dadacoalition.yedit.feature.group

shelled -Bashスクリプトエディター

eclipse -nosplash -application org.eclipse.equinox.p2.director -repository http://download.eclipse.org/releases/indigo/,http://download.eclipse.org/technology/dltk/updates/,https://sourceforge.net/projects/shelled/files/shelled/update/ -installIU net.sourceforge.shelled.feature.group

Webページエディタ

eclipse -nosplash -application org.eclipse.equinox.p2.director -repository http://download.eclipse.org/releases/indigo/ -installIU org.eclipse.jst.webpageeditor.feature.feature.group

Pydev
Pydevは、最初に証明書をインストールする必要があるため、注意が必要です...そのステップを自動化するスクリプトは次のとおりです。

#!/usr/bin/python
# Add PyDev's certificate to Java's key and certificate database
# Certificate file here: http://pydev.org/pydev_certificate.cer
import os, sys, pexpect, urllib2
def main():
  # NOTE: You may have to update the path to your system's cacerts file
  certs_file = '/usr/lib/jvm/default-java/jre/lib/security/cacerts'  
  pydev_certs_url = 'http://pydev.org/pydev_certificate.cer'
  print "Adding pydev_certificate.cer to %s" % (certs_file)
  pydev_cert = open('pydev_certificate.cer', 'w')
  pydev_cert.write(urllib2.urlopen(pydev_certs_url).read())
  pydev_cert.close()
  cmd = "keytool -import -file ./pydev_certificate.cer -keystore %s" % (certs_file)
  child = pexpect.spawn(cmd)
  child.expect("Enter keystore password:")
  child.sendline("changeit")
  if child.expect(["Trust this certificate?", "already exists"]) == 0:
    child.sendline("yes")
  try:
    child.interact()
  except OSError:
    pass  
  print "done"

if __name__ == "__main__":
  main()

次に、実行できます。

eclipse -nosplash -application org.eclipse.equinox.p2.director -repository http://download.eclipse.org/releases/indigo/,http://pydev.org/updates/ -installIU org.python.pydev.feature.feature.group
于 2013-03-07T08:11:35.980 に答える
8

p2 Directorアプリケーションを使用して、スクリプトを使用してEclipse機能をインストールできます。ここに役立つかもしれないいくつかのより多くの リンクがあります。

于 2013-03-07T05:06:44.207 に答える