minor changes
authorVictor Kirhenshtein <victor@netxms.org>
Tue, 2 Aug 2011 14:48:06 +0000 (14:48 +0000)
committerVictor Kirhenshtein <victor@netxms.org>
Tue, 2 Aug 2011 14:48:06 +0000 (14:48 +0000)
.gitattributes
android/src/console/.externalToolBuilders/Build Number Generator.launch [new file with mode: 0644]
android/src/console/.externalToolBuilders/generate_build.pl [new file with mode: 0755]
android/src/console/.project

index 9375634..ffb3870 100644 (file)
@@ -1,4 +1,5 @@
 * text=auto !eol
+android/src/console/.externalToolBuilders/Build[!!-~]Number[!!-~]Generator.launch -text
 android/src/console/AndroidManifest.xml -text
 android/src/console/default.properties -text
 android/src/console/res/drawable-hdpi/alarms.png -text
diff --git a/android/src/console/.externalToolBuilders/Build Number Generator.launch b/android/src/console/.externalToolBuilders/Build Number Generator.launch
new file mode 100644 (file)
index 0000000..fda9f1b
--- /dev/null
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>\r
+<launchConfiguration type="org.eclipse.ui.externaltools.ProgramBuilderLaunchConfigurationType">\r
+<stringAttribute key="org.eclipse.debug.core.ATTR_REFRESH_SCOPE" value="${working_set:&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;&#13;&#10;&lt;resources&gt;&#13;&#10;&lt;item path=&quot;/android-console/res/values&quot; type=&quot;2&quot;/&gt;&#13;&#10;&lt;/resources&gt;}"/>\r
+<booleanAttribute key="org.eclipse.debug.ui.ATTR_LAUNCH_IN_BACKGROUND" value="false"/>\r
+<stringAttribute key="org.eclipse.ui.externaltools.ATTR_LOCATION" value="${workspace_loc:/android-console/.externalToolBuilders/generate_build.pl}"/>\r
+<stringAttribute key="org.eclipse.ui.externaltools.ATTR_RUN_BUILD_KINDS" value="full,incremental,"/>\r
+<stringAttribute key="org.eclipse.ui.externaltools.ATTR_TOOL_ARGUMENTS" value="${workspace_loc:/android-console/.externalToolBuilders/generate_build.pl}"/>\r
+<booleanAttribute key="org.eclipse.ui.externaltools.ATTR_TRIGGERS_CONFIGURED" value="true"/>\r
+<stringAttribute key="org.eclipse.ui.externaltools.ATTR_WORKING_DIRECTORY" value="${workspace_loc:/android-console/res/values}"/>\r
+</launchConfiguration>\r
diff --git a/android/src/console/.externalToolBuilders/generate_build.pl b/android/src/console/.externalToolBuilders/generate_build.pl
new file mode 100755 (executable)
index 0000000..833b786
--- /dev/null
@@ -0,0 +1,19 @@
+#!/usr/bin/perl
+
+$version = `svnversion`;
+chomp $version;
+if ($version =~ /[0-9]+\:([0-9]+)/)
+{
+       $version = $1;
+}
+print "Setting build number to $version\n";
+
+open(OUT, ">build_number.xml") || die "out: $!";
+
+print OUT "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n";
+print OUT "<resources>\n";
+print OUT "\t<string name=\"build_number\">$version</string>\n";
+print OUT "</resources>\n";
+
+close OUT;
+exit 0;
index 659be1b..95a4205 100644 (file)
@@ -5,6 +5,16 @@
        <projects>
        </projects>
        <buildSpec>
+               <buildCommand>
+                       <name>org.eclipse.ui.externaltools.ExternalToolBuilder</name>
+                       <triggers>full,incremental,</triggers>
+                       <arguments>
+                               <dictionary>
+                                       <key>LaunchConfigHandle</key>
+                                       <value>&lt;project&gt;/.externalToolBuilders/Build Number Generator.launch</value>
+                               </dictionary>
+                       </arguments>
+               </buildCommand>
                <buildCommand>
                        <name>com.android.ide.eclipse.adt.ResourceManagerBuilder</name>
                        <arguments>