Turned install into an equinox plugin providing an eclipse application

Modified build script to deploy the equinox container

https://sourceforge.net/tracker/?func=detail&aid=2700937&group_id=176962&atid=879334
This commit is contained in:
joergviola 2010-04-28 20:59:00 +00:00
parent 4623a11668
commit 44a323ff99
10 changed files with 135 additions and 40 deletions

View File

@ -14,5 +14,6 @@
<classpathentry kind="lib" path="/tools/lib/commons-net-1.4.0.jar"/> <classpathentry kind="lib" path="/tools/lib/commons-net-1.4.0.jar"/>
<classpathentry kind="lib" path="/tools/lib/ocrs12.jar"/> <classpathentry kind="lib" path="/tools/lib/ocrs12.jar"/>
<classpathentry kind="lib" path="/tools/lib/ojdbc14.jar"/> <classpathentry kind="lib" path="/tools/lib/ojdbc14.jar"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="output" path="build"/> <classpathentry kind="output" path="build"/>
</classpath> </classpath>

View File

@ -21,8 +21,19 @@
<arguments> <arguments>
</arguments> </arguments>
</buildCommand> </buildCommand>
<buildCommand>
<name>org.eclipse.pde.ManifestBuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.pde.SchemaBuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec> </buildSpec>
<natures> <natures>
<nature>org.eclipse.jdt.core.javanature</nature> <nature>org.eclipse.jdt.core.javanature</nature>
<nature>org.eclipse.pde.PluginNature</nature>
</natures> </natures>
</projectDescription> </projectDescription>

View File

@ -26,7 +26,10 @@ ARGS=CONFIG
# To test the OCI driver, add -DTestOCI=Y to the command - example: # To test the OCI driver, add -DTestOCI=Y to the command - example:
# $JAVA -classpath $CP -DADEMPIERE_HOME=$ADEMPIERE_HOME -DTestOCI=Y org.compiere.install.Setup $ARGS # $JAVA -classpath $CP -DADEMPIERE_HOME=$ADEMPIERE_HOME -DTestOCI=Y org.compiere.install.Setup $ARGS
$JAVA -classpath $CP -DADEMPIERE_HOME=$ADEMPIERE_HOME org.compiere.install.Setup $ARGS # $JAVA -classpath $CP -DADEMPIERE_HOME=$ADEMPIERE_HOME org.compiere.install.Setup $ARGS
# OSGi:
$JAVA -jar osgi/org.eclipse.osgi_3.5.0.v20090520.jar -clean -console -application org.adempiere.Install
#echo =================================== #echo ===================================
#echo Setup Adempiere Server Environment #echo Setup Adempiere Server Environment
@ -41,7 +44,7 @@ find . -name '*.sh' -exec chmod a+x '{}' \;
# Sign database build # Sign database build
cd utils cd utils
. ./RUN_SignDatabaseBuild.sh #. ./RUN_SignDatabaseBuild.sh
. ./RUN_UnixEnv.sh . ./RUN_UnixEnv.sh

View File

@ -338,7 +338,7 @@
<!-- ==================================================== --> <!-- ==================================================== -->
<!-- Setup Lib --> <!-- Setup Lib -->
<!-- ==================================================== --> <!-- ==================================================== -->
<target name="setupLib" depends="setupInit, setupWin, setupNonWin, setupCLib, setupSLib, setupALib, setupWLib, signOtherJars" <target name="setupLib" depends="setupInit, setupWin, setupNonWin"
description="Setup Adempiere Lib directory"> description="Setup Adempiere Lib directory">
<!-- Filter files Overwrite --> <!-- Filter files Overwrite -->
@ -349,7 +349,7 @@
<copy file="${basedir}/utils/adempiereDirectTemplate.jnlp" <copy file="${basedir}/utils/adempiereDirectTemplate.jnlp"
tofile="${basedir}/lib/adempiereDirect.jnlp" filtering="yes" overwrite="yes" /> tofile="${basedir}/lib/adempiereDirect.jnlp" filtering="yes" overwrite="yes" />
<!-- Create Client Zip --> <!-- Create Client Zip
<zip zipfile="${basedir}/lib/AdempiereClient.zip"> <zip zipfile="${basedir}/lib/AdempiereClient.zip">
<zipfileset dir="." prefix="Adempiere" <zipfileset dir="." prefix="Adempiere"
includes="*.html" /> includes="*.html" />
@ -360,7 +360,7 @@
<zipfileset dir="lib" prefix="Adempiere/lib" <zipfileset dir="lib" prefix="Adempiere/lib"
includes="Adempiere.exe,*.ico,customization.jar,patches.jar,CompiereJasperReqs.jar,Adempiere.jar,AdempiereCLib.jar,adempiereDirect.jnlp,index.html,*.0" /> includes="Adempiere.exe,*.ico,customization.jar,patches.jar,CompiereJasperReqs.jar,Adempiere.jar,AdempiereCLib.jar,adempiereDirect.jnlp,index.html,*.0" />
</zip> </zip>
-->
<!-- Save properties --> <!-- Save properties -->
<copy file="AdempiereEnv.properties" <copy file="AdempiereEnv.properties"
tofile="AdempiereEnv.properties.save" /> tofile="AdempiereEnv.properties.save" />
@ -515,7 +515,7 @@
<!-- ==================================================== --> <!-- ==================================================== -->
<!-- Setup (Main) --> <!-- Setup (Main) -->
<!-- ==================================================== --> <!-- ==================================================== -->
<target name="setup" depends="setupDeploy" <target name="setup" depends=""
description="Setup Adempiere"> description="Setup Adempiere">
</target> </target>

View File

@ -0,0 +1,19 @@
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: install
Bundle-SymbolicName: org.adempiere.install;singleton:=true
Bundle-Version: 0.0.0.1
Bundle-ClassPath: install.jar,
lib/ant.jar,
lib/ant-commons-net.jar,
lib/ant-launcher.jar,
lib/commons-net-1.4.0.jar,
lib/ocrs12.jar,
lib/ojdbc14.jar
Export-Package: images,
org.compiere.install
Require-Bundle: org.eclipse.core.runtime;bundle-version="3.5.0",
org.adempiere.base;bundle-version="0.0.0",
org.adempiere.client;bundle-version="0.0.0",
org.adempiere.tools;bundle-version="0.0.0"
Bundle-Activator: org.compiere.install.Activator

10
install/build.properties Normal file
View File

@ -0,0 +1,10 @@
source.install.jar = src/,build/
bin.includes = META-INF/,\
lib/ant.jar,\
lib/ant-commons-net.jar,\
lib/ant-launcher.jar,\
lib/commons-net-1.4.0.jar,\
lib/ocrs12.jar,\
lib/ojdbc14.jar,\
install.jar,\
plugin.xml

View File

@ -16,6 +16,7 @@
<property name="web.dir" value="../../adempiereWeb"/> <property name="web.dir" value="../../adempiereWeb"/>
<property name="dbStartup.dir" value="../db/database/Startup"/> <property name="dbStartup.dir" value="../db/database/Startup"/>
<property name="lib.dir" value="../lib"/> <property name="lib.dir" value="../lib"/>
<property name="dist.dir" value="../lib"/>
<property name="utils.dir" value="../utils"/> <property name="utils.dir" value="../utils"/>
<property name="launch.dir" value="../launch"/> <property name="launch.dir" value="../launch"/>
<property name="keystore.dir" value="../keystore"/> <property name="keystore.dir" value="../keystore"/>
@ -117,7 +118,7 @@
<!-- ======================================================= --> <!-- ======================================================= -->
<!-- Update from Web Site + Clean .sh --> <!-- Update from Web Site + Clean .sh -->
<!-- ======================================================= --> <!-- ======================================================= -->
<target name="installUpdate" depends="installCompile" <target name="installUpdate" depends=""
description="Update install directory with copies of web site"> description="Update install directory with copies of web site">
<fixcrlf srcdir="${src.dir}" <fixcrlf srcdir="${src.dir}"
@ -179,10 +180,22 @@
</copy> </copy>
<copy file="${launch.dir}/Release/Adempiere.exe" todir="${build.dir}/Adempiere/lib"/> <copy file="${launch.dir}/Release/Adempiere.exe" todir="${build.dir}/Adempiere/lib"/>
<copy file="CInstall.jar" todir="${build.dir}/Adempiere/lib"/> <copy file="CInstall.jar" todir="${build.dir}/Adempiere/lib"/>
<copy file="../sqlj/sqlj.jar" todir="${build.dir}/Adempiere/lib"/> <!-- <copy file="../sqlj/sqlj.jar" todir="${build.dir}/Adempiere/lib"/>
<copy file="../JasperReports/CompiereJasperReqs.jar" todir="${build.dir}/Adempiere/lib"/> <copy file="../JasperReports/CompiereJasperReqs.jar" todir="${build.dir}/Adempiere/lib"/> -->
<concat destfile="${build.dir}/Adempiere/lib/index.html">AdempiereHome</concat> <concat destfile="${build.dir}/Adempiere/lib/index.html">AdempiereHome</concat>
<!-- OSGi Container -->
<mkdir dir="${build.dir}/Adempiere/osgi"/>
<copy overwrite="true" todir="${build.dir}/Adempiere/osgi" >
<fileset dir="../equinox-target">
<include name="configuration/**/*"/>
<include name="plugins/**/*"/>
<include name="org.eclipse.*.jar"/>
</fileset>
<fileset dir="../lib">
<include name="plugins/**/*"/>
</fileset>
</copy>
<!-- Utils Directory --> <!-- Utils Directory -->
<mkdir dir="${build.dir}/Adempiere/utils"/> <mkdir dir="${build.dir}/Adempiere/utils"/>
@ -264,6 +277,13 @@
</target> </target>
<target name="plugin">
<buildPlugin workspaceDirectory=".."
projectName="install"
targetPlatformId="target.platform"
destination="${dist.dir}"
buildSourceJar="false" />
</target>
<target name="clean" description="deletes build"> <target name="clean" description="deletes build">
<delete dir="${build.dir}"/> <delete dir="${build.dir}"/>

12
install/plugin.xml Normal file
View File

@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<?eclipse version="3.4"?>
<plugin>
<extension
id="org.adempiere.Install"
point="org.eclipse.core.runtime.applications">
<application>
<run class="org.compiere.install.Application" />
</application>
</extension>
</plugin>

View File

@ -0,0 +1,16 @@
package org.compiere.install;
import org.eclipse.equinox.app.IApplication;
import org.eclipse.equinox.app.IApplicationContext;
public class Application implements IApplication {
public Object start(IApplicationContext arg0) throws Exception {
Setup.main(new String[]{});
return null;
}
public void stop() {
}
}

View File

@ -36,6 +36,7 @@ import javax.swing.JSeparator;
import javax.swing.SwingUtilities; import javax.swing.SwingUtilities;
import javax.swing.border.TitledBorder; import javax.swing.border.TitledBorder;
import org.adempiere.base.Core;
import org.apache.tools.ant.Main; import org.apache.tools.ant.Main;
import org.compiere.Adempiere; import org.compiere.Adempiere;
import org.compiere.swing.CButton; import org.compiere.swing.CButton;
@ -47,6 +48,8 @@ import org.compiere.swing.CPassword;
import org.compiere.swing.CTextField; import org.compiere.swing.CTextField;
import org.compiere.util.CLogger; import org.compiere.util.CLogger;
import com.sfcommerce.jpaymentcomponent.ssl.Client;
/** /**
* Configuration Panel * Configuration Panel
@ -98,8 +101,8 @@ public class ConfigurationPanel extends CPanel implements ActionListener
private ConfigurationData m_data = new ConfigurationData(this); private ConfigurationData m_data = new ConfigurationData(this);
private static ImageIcon iOpen = new ImageIcon(ConfigurationPanel.class.getResource("openFile.gif")); private static ImageIcon iOpen = new ImageIcon(ConfigurationPanel.class.getResource("openFile.gif"));
private static ImageIcon iSave = new ImageIcon(Adempiere.class.getResource("images/Save16.gif")); private static ImageIcon iSave = new ImageIcon(Core.getResourceFinder().getResource("images/Save16.gif"));
private static ImageIcon iHelp = new ImageIcon(Adempiere.class.getResource("images/Help16.gif")); private static ImageIcon iHelp = new ImageIcon(Core.getResourceFinder().getResource("images/Help16.gif"));
// ------------- Static UI // ------------- Static UI