commit 2d88b91a5e3e526d15139868fe33bffb9a1e587e
parent 3c6b1a78f820b2ad9d88060b543c6208480174e9
Author: felicitus <felicitus@feli-t420s-linux.felicitus.dn42>
Date: Fri, 16 Dec 2011 01:28:58 +0100
Preparations for the reorganization of our folder structure
Diffstat:
5 files changed, 135 insertions(+), 35 deletions(-)
diff --git a/.gitignore b/.gitignore
@@ -6,5 +6,6 @@
.project
config.php
/tests/reports
+/build-setup
partkeepr.jsb3
theme/sass/.sass-cache/
diff --git a/build.xml b/build.xml
@@ -35,12 +35,11 @@
<target name="git-update-submodules">
<exec command="git submodule update" checkreturn="true"/>
</target>
- <!-- Builds the frontend, regenerates the proxies and minifies the JS -->
- <target name="build">
- <phingcall target="git-update-submodules"/>
- <echo>Copying 3rdparty/extjs - this may take up to a few minutes</echo>
- <mkdir dir="build/"/>
- <copy overwrite="false" todir="build/extjs/">
+
+ <target name="build-setup">
+ <mkdir dir="build-setup/"/>
+
+ <copy overwrite="false" todir="build-setup/extjs/">
<fileset dir="${extjs.path}">
<include name="bootstrap.js"/>
<include name="compatibility/ext3-core-compat.js"/>
@@ -51,42 +50,75 @@
<include name="adapter/ext/ext-base.js"/>
<include name="adapter/ext/ext-base-debug-w-comments.js"/>
<include name="source/adapter/ext-base.js"/>
- <include name="resources/**"/>
- </fileset>
- </copy>
-
- <echo>Copying Ext Statusbar</echo>
- <copy overwrite="false" todir="build/js/Ext.ux/">
- <fileset dir="${extjs.path}/examples/ux">
- <include name="statusbar/**"/>
- </fileset>
- </copy>
-
- <echo>Copying Ext.tab.TabCloseMenu</echo>
- <copy overwrite="false" todir="build/js/Ext.ux/">
- <fileset dir="${extjs.path}/examples/ux">
- <include name="TabCloseMenu.js"/>
</fileset>
</copy>
- <echo>Copying phpjs</echo>
- <mkdir dir="build/js/org.phpjs.lib/"/>
- <copy overwrite="false" todir="build/js/org.phpjs.lib">
- <fileset dir="3rdparty/phpjs/">
- <include name="php.default.min.js"/>
- </fileset>
- </copy>
-
- <echo>Copying JS frontend</echo>
- <copy overwrite="true" todir="build/">
- <fileset dir="frontend">
+ <copy overwrite="true" todir="build-setup/">
+ <fileset dir="setup">
<include name="**"/>
</fileset>
</copy>
+
+ </target>
+
+ <target name="build-frontend">
+ <echo>Copying 3rdparty/extjs - this may take up to a few minutes</echo>
+ <mkdir dir="build/"/>
+ <copy overwrite="false" todir="build/extjs/">
+ <fileset dir="${extjs.path}">
+ <include name="bootstrap.js"/>
+ <include name="compatibility/ext3-core-compat.js"/>
+ <include name="compatibility/ext3-compat.js"/>
+ <include name="ext-all.js"/>
+ <include name="ext-all-debug.js"/>
+ <include name="ext-all-debug-w-comments.js"/>
+ <include name="adapter/ext/ext-base.js"/>
+ <include name="adapter/ext/ext-base-debug-w-comments.js"/>
+ <include name="source/adapter/ext-base.js"/>
+ <include name="resources/**"/>
+ </fileset>
+ </copy>
+
+ <echo>Copying Ext Statusbar</echo>
+ <copy overwrite="false" todir="build/js/Ext.ux/">
+ <fileset dir="${extjs.path}/examples/ux">
+ <include name="statusbar/**"/>
+ </fileset>
+ </copy>
+
+ <echo>Copying Ext.tab.TabCloseMenu</echo>
+ <copy overwrite="false" todir="build/js/Ext.ux/">
+ <fileset dir="${extjs.path}/examples/ux">
+ <include name="TabCloseMenu.js"/>
+ </fileset>
+ </copy>
+
+ <echo>Copying phpjs</echo>
+ <mkdir dir="build/js/org.phpjs.lib/"/>
+ <copy overwrite="false" todir="build/js/org.phpjs.lib">
+ <fileset dir="3rdparty/phpjs/">
+ <include name="php.default.min.js"/>
+ </fileset>
+ </copy>
+
+ <echo>Copying JS frontend</echo>
+ <copy overwrite="true" todir="build/">
+ <fileset dir="frontend">
+ <include name="**"/>
+ </fileset>
+ </copy>
+
+ <phingcall target="create-orm-proxies"/>
+
+ <phingcall target="jsbuilder"/>
+ </target>
+
+ <!-- Builds the frontend, regenerates the proxies and minifies the JS -->
+ <target name="build">
+ <phingcall target="git-update-submodules"/>
- <phingcall target="create-orm-proxies"/>
-
- <phingcall target="jsbuilder"/>
+ <phingcall target="build-frontend"/>
+ <phingcall target="build-setup"/>
</target>
diff --git a/setup/check.php b/setup/check.php
@@ -0,0 +1,29 @@
+<?php
+/**
+ * This file does various pre-flight checks in order to make sure the installer can run
+ * and do additional tests.
+ *
+ * The pre-flight check will immediately die if PHP is less than 5.3.0 or json_encode
+ * doesn't exist.
+ *
+ * Each pre-flight check consists of a json array returned in the following format:
+ *
+ * error: Either boolean true or false
+ * errormessage: An error message explaining what the error was
+ * checks: An additional array containing the check names and their results
+ */
+
+if (version_compare(PHP_VERSION, '5.3.0', '<')) {
+ echo '{"error":true,"errormessage":"You need at least PHP 5.3.0"}';
+ exit;
+}
+
+if (!function_exists("json_encode")) {
+ echo '{"error":true,"errormessage":"Your PHP installation lacks the function json_decode, which is mandatory for PartKeepr."}';
+ exit;
+}
+
+$aChecks = array();
+
+//echo json_encode(array("error" => true, "errormessage" => "You need at least PHP 5.3.0"));
+
diff --git a/setup/index.html b/setup/index.html
@@ -0,0 +1,27 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
+ "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+<html>
+ <head>
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
+ <title>PartKeepr Setup</title>
+
+ <link href='http://fonts.googleapis.com/css?family=Ubuntu:400,700italic' rel='stylesheet' type='text/css'>
+
+ <!-- Include the ExtJS CSS Theme -->
+ <link rel="stylesheet" type="text/css" href="css/partkeepr-theme.css"/>
+
+ <link rel="stylesheet" type="text/css" href="js/Ext.ux/statusbar/css/statusbar.css"/>
+
+ <link rel="stylesheet" type="text/css" href="css/PartKeepr.css"/>
+
+ <link rel="icon" href="favicon.ico"/>
+
+ <!-- Include the ExtJS JavaScript Library -->
+ <script type="text/javascript" src="extjs/bootstrap.js"></script>
+
+ <script type="text/javascript" src="extjs/ext-all.js"></script>
+ </head>
+ <body>
+ </body>
+</html>
+ +
\ No newline at end of file
diff --git a/setup/js/PartKeeprSetup.js b/setup/js/PartKeeprSetup.js
@@ -0,0 +1,9 @@
+Ext.application({
+ name: 'PartKeepr',
+ launch: function() {
+
+ },
+ testInstaller: function () {
+
+ }
+});+
\ No newline at end of file