Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Tweaks to the packaging and build scripts. Removed incomplete objects…

… from plugin.xml
  • Loading branch information...
commit a2117c5c767709ba82d601b18df46986ee47e6b2 1 parent a9ee455
@mtoader mtoader authored
View
24 package.xml → build-package.xml
@@ -2,10 +2,13 @@
<!-- set global properties for this build -->
<property name="src" location="src"/>
- <property name="build" location="."/>
+
+ <property name="build" location="build"/>
<property name="dist" location="dist"/>
+
+ <property name="go.plugin.name" value="ro.redeul.google.go" />
<property name="idea.community.build" location="${user.home}/Tools/idea-IU-107.322/" />
- <property name="target.plugin.name" value="ro.redeul.google.go" />
+
<taskdef name="javac2" classname="com.intellij.ant.Javac2">
<classpath>
@@ -22,8 +25,9 @@
<tstamp/>
<!-- Create the build directory structure used by compile -->
<mkdir dir="${build}"/>
- <!--<mkdir dir="${dist}"/>-->
+ <mkdir dir="${dist}"/>
+ <echo message="Using IDEA build from: ${idea.community.build}" />
</target>
<target name="compile" depends="clean,init" description="compile the source ">
@@ -37,13 +41,9 @@
</target>
<target name="package" depends="compile" description="generate the distribution">
- <!-- Create the distribution directory -->
- <mkdir dir="${dist}"/>
-
- <!-- Put everything in ${build} into the MyProject-${DSTAMP}.jar file -->
- <!--<jar jarfile="${dist}/lib/MyProject-${DSTAMP}.jar" basedir="${build}"/>-->
- <jar jarfile="${dist}/${target.plugin.name}.jar">
+ <!-- Create the distribution archive -->
+ <jar jarfile="${dist}/${go.plugin.name}.jar" update="false">
<fileset dir="${build}" includes="**/*.*" />
<fileset dir="${src}" excludes="**/*.java" />
</jar>
@@ -51,8 +51,8 @@
</target>
<target name="clean" description="clean up">
- <!-- Delete the ${build} and ${dist} directory trees -->
- <delete dir="${build}"/>
- <delete dir="${dist}"/>
+ <delete dir="${build}" />
+ <delete file="${dist}/${go.plugin.name}.jar" />
</target>
+
</project>
View
93 go-ide/package_linux.sh
@@ -1,11 +1,19 @@
#!/bin/bash
-SOURCE_PATH_GO=~/Tools/google-go/release/
-SOURCE_PATH_IDEA=~/Work/IntellijIdea/idea/
-SOURCE_PATH_GO_PLUGIN=~/Work/google-go-language/
+SOURCE_PATH_GO=${SOURCE_PATH_GO:-${HOME}/Tools/google-go/release/}
+SOURCE_PATH_IDEA=${SOURCE_PATH_IDEA:-${HOME}/Work/IntellijIdea/idea/}
+SOURCE_PATH_IDEA_BUILT=idea_community_not_built
+SOURCE_PATH_GO_PLUGIN=${SOURCE_PATH_GO_PLUGIN:-`pwd`/..}
-RELEASE_TAG_GO="release.r58.1"
-RELEASE_TAG_IDEA=idea/107.322
+SKIP_GO_SDK_BUILD=${SKIP_GO_SDK_BUILD:-false}
+SKIP_IDEA_BUILD=${SKIP_IDEA_BUILD:-false}
+
+RELEASE_TAG_GO=${RELEASE_TAG_GO:-release.r58.1}
+RELEASE_TAG_IDEA=${RELEASE_TAG_IDEA:-idea/107.322}
+
+GO_IDE_VERSION=${GO_IDE_VERSION:-0.4.18}
+
+FOLDER_DIST=${FOLDER_DIST:-$SOURCE_PATH_GO_PLUGIN/dist}
function validate_go_sdk_location {
@@ -58,38 +66,89 @@ function validate_idea_community_location() {
}
function build_go_sdk() {
+ echo
+ echo
echo "Clean building Go Sdk"
+ echo
- pushd "$SOURCE_PATH_GO/src"
+ pushd "$SOURCE_PATH_GO/src" >/dev/null
- # fixup for when you also have a weekly go installed inside on your system.
- /home/mtoader/Tools/google-go/release/bin
- PATH=${SOURCE_PATH_GO}bin:$PATH
+ ./clean.bash
+ ./all.bash
- export PATH
- # call the build
- echo $PATH
- ./clean.bash && ./all.bash && popd
+ popd
# rm -r $IDEASOURCEPATH/build/conf/mac/go-sdk
# cp -r $GOSOURCEPATH $IDEASOURCEPATH/build/conf/mac/go-sdk
}
function build_idea_community() {
- cp "$SOURCE_PATH_GO_PLUGIN/go-ide/resources/idea_community_{about,logo}.png" "$SOURCE_PATH_IDEA/community-resources/src"
+ cp "$SOURCE_PATH_GO_PLUGIN/go-ide/resources/idea_community_about.png" "$SOURCE_PATH_IDEA/community-resources/src"
+ cp "$SOURCE_PATH_GO_PLUGIN/go-ide/resources/idea_community_logo.png" "$SOURCE_PATH_IDEA/community-resources/src"
+
+ echo
+ echo
echo "Cleanly building Idea Community"
- pushd ${SOURCE_PATH_IDEA}
+ echo
+ pushd ${SOURCE_PATH_IDEA} >/dev/null
# the default build target in Intellij Community will do a clean,build
ant
+ popd
+}
+
+function build_idea_go_plugin() {
+
+ echo
+ echo
+ echo "Cleanly building Idea Go plugin"
+ echo
+ pushd "$SOURCE_PATH_GO_PLUGIN" >/dev/null
+
+ # the default build target in Intellij Community will do a clean,build
+ ant -Didea.community.build=$SOURCE_PATH_IDEA_BUILT -f build-package.xml
+
+ popd
}
+function extract_idea_community_build() {
+ IDEA_BUILD_VERSION=`cat "$SOURCE_PATH_IDEA/build.txt"`
+
+ if [ -d "$FOLDER_DIST/idea-$IDEA_BUILD_VERSION" ]; then
+ rm -rf "$FOLDER_DIST/idea-$IDEA_BUILD_VERSION"
+ fi
+
+ mkdir -p "$FOLDER_DIST/idea-$IDEA_BUILD_VERSION"
+
+ pushd "$FOLDER_DIST" >/dev/null
+ tar -xzvf $SOURCE_PATH_IDEA/out/artifacts/ideaIC-$IDEA_BUILD_VERSION.tar.gz
+
+ SOURCE_PATH_IDEA_BUILT=$FOLDER_DIST/idea-$IDEA_BUILD_VERSION
+ popd
+}
+
+# fail on command errors
+set -eo pipefail
+
validate_go_sdk_location
validate_idea_community_location
-build_go_sdk && build_idea_community
-#build_idea_community
+if [ $SKIP_GO_SDK_BUILD != "true" ]; then
+ build_go_sdk
+fi
+
+if [ ! $SKIP_IDEA_BUILD != "true" ]; then
+ build_idea_community
+fi
+
+extract_idea_community_build
+
+echo
+
+build_idea_go_plugin
+
+assemble_distribution
exit 0;
View
20 src/META-INF/plugin.xml
@@ -235,9 +235,9 @@
<category>Custom Languages</category>
<application-components>
- <component>
- <implementation-class>ro.redeul.google.go.components.GoBundledSdkDetector</implementation-class>
- </component>
+ <!--<component>-->
+ <!--<implementation-class>ro.redeul.google.go.components.GoBundledSdkDetector</implementation-class>-->
+ <!--</component>-->
</application-components>
<project-components>
@@ -270,14 +270,14 @@
<add-to-group group-id="NewGroup" anchor="before" relative-to-action="NewFile"/>
</group>
- <group id="Go.Tools" popup="true" text="Go Tools" description="Go tools support" icon="/icons/go_16x16.png">
- <action id="Go.Tools.AddGoSdk" text="Add Go Sdk Support"
- description="Add Go Sdk to current module"
- class="ro.redeul.google.go.tools.actions.AddGoSdkSupport">
- </action>
+ <!--<group id="Go.Tools" popup="true" text="Go Tools" description="Go tools support" icon="/icons/go_16x16.png">-->
+ <!--<action id="Go.Tools.AddGoSdk" text="Add Go Sdk Support"-->
+ <!--description="Add Go Sdk to current module"-->
+ <!--class="ro.redeul.google.go.tools.actions.AddGoSdkSupport">-->
+ <!--</action>-->
- <add-to-group group-id="ToolsMenu" anchor="last" />
- </group>
+ <!--<add-to-group group-id="ToolsMenu" anchor="last" />-->
+ <!--</group>-->
</actions>
Please sign in to comment.
Something went wrong with that request. Please try again.