From b25290cef48251a31cb0f693a53677b566c1b1a4 Mon Sep 17 00:00:00 2001 From: Christian Weiske Date: Tue, 16 Feb 2010 21:38:59 +0100 Subject: [PATCH 01/11] add package task --- build.xml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/build.xml b/build.xml index 9cf4de9..1915115 100644 --- a/build.xml +++ b/build.xml @@ -48,6 +48,14 @@ + + + + + + From 95887ff823ba0470a27f0e12a6561e5969819780 Mon Sep 17 00:00:00 2001 From: Christian Weiske Date: Thu, 12 Aug 2010 21:08:50 +0200 Subject: [PATCH 02/11] update readme --- doc/developers/release-new-version | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/developers/release-new-version b/doc/developers/release-new-version index 69530df..4b2540a 100644 --- a/doc/developers/release-new-version +++ b/doc/developers/release-new-version @@ -4,8 +4,8 @@ How to release a new version of SemanticScuttle 0. Run unit tests and verify that all of them pass 1. Update doc/ChangeLog 2. Update doc/UPGRADE.txt -3. Update version in data/templates/about.tpl.php - and build.xml +3. Update version in data/templates/about.tpl.php, + build.xml and doc/README.txt 4. Create a release zip file via the build script: Just type "phing". 5. Make a test installation from your zip file with a fresh From 8798309bfe5619d52fd129ab3504e13563418ea4 Mon Sep 17 00:00:00 2001 From: Christian Weiske Date: Thu, 12 Aug 2010 22:01:48 +0200 Subject: [PATCH 03/11] basic package.xml generation with native pearpkg2 task - does not really work since file roles are not supported --- build.xml | 64 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 64 insertions(+) diff --git a/build.xml b/build.xml index 364613a..bda5641 100644 --- a/build.xml +++ b/build.xml @@ -10,6 +10,17 @@ + + @@ -52,6 +63,59 @@ description="Creates the pear package" > + + From d51768ab404c1313f6dec702550e825c80a42395 Mon Sep 17 00:00:00 2001 From: Christian Weiske Date: Sun, 22 Aug 2010 00:25:54 +0200 Subject: [PATCH 04/11] nearly there; using d51pearpkg2 now --- .gitignore | 1 + build.xml | 100 +++++++++++++++++++++++++++++------------------------ 2 files changed, 55 insertions(+), 46 deletions(-) diff --git a/.gitignore b/.gitignore index 3895c5b..888ac2e 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ dist/ build.properties +package.xml diff --git a/build.xml b/build.xml index bda5641..0654a2b 100644 --- a/build.xml +++ b/build.xml @@ -27,6 +27,8 @@ + + @@ -63,59 +65,65 @@ description="Creates the pear package" > - - From 4d9b6950cf280e718354eb5888ae41ef04b9afb8 Mon Sep 17 00:00:00 2001 From: Christian Weiske Date: Sun, 22 Aug 2010 00:57:31 +0200 Subject: [PATCH 05/11] on the way making package.xml better --- build.xml | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/build.xml b/build.xml index 0654a2b..6134ad7 100644 --- a/build.xml +++ b/build.xml @@ -93,12 +93,14 @@ + www data doc php test + build* dist doc/developers @@ -122,6 +124,37 @@ --> + + + + + + + + + + + + + + + + + From eaa847a93d4b9d0c77d70ef219836b9f89bd67c7 Mon Sep 17 00:00:00 2001 From: Christian Weiske Date: Sun, 22 Aug 2010 01:04:03 +0200 Subject: [PATCH 06/11] package.xml now looks really good --- build.xml | 22 +++++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) diff --git a/build.xml b/build.xml index 6134ad7..2e1e0e8 100644 --- a/build.xml +++ b/build.xml @@ -102,9 +102,9 @@ build* - dist + dist/** doc/developers - scripts + scripts/** **/messages.po @@ -147,9 +147,25 @@ /> + + + + From aba3327b5b8beffea75687a11ccf034f5e0d0969 Mon Sep 17 00:00:00 2001 From: Christian Weiske Date: Sun, 22 Aug 2010 01:07:29 +0200 Subject: [PATCH 07/11] time to test the package --- build.xml | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/build.xml b/build.xml index 2e1e0e8..389dfd4 100644 --- a/build.xml +++ b/build.xml @@ -100,12 +100,19 @@ php test - + + **/.gitignore + **/.svn build* + data/config.php + data/locales/messages.po + data/locales/*/LC_MESSAGES/messages.po dist/** - doc/developers + doc/developers/** scripts/** - **/messages.po + src/php-gettext/examples/** + src/php-gettext/bin/** - Many SQL optimizations - SemanticScuttle shows bookmarks 4 times faster now From f93aa6c7aceeb7ed9ea899cfe232b3bd097b2422 Mon Sep 17 00:00:00 2001 From: Christian Weiske Date: Sun, 22 Aug 2010 01:26:30 +0200 Subject: [PATCH 08/11] make files use pear directories --- build.xml | 17 +++++++++++++++++ src/SemanticScuttle/header.php | 17 ++++++++++++++--- tests/prepare.php | 8 +++++++- www/www-header.php | 8 +++++++- 4 files changed, 45 insertions(+), 5 deletions(-) diff --git a/build.xml b/build.xml index 389dfd4..accae3b 100644 --- a/build.xml +++ b/build.xml @@ -113,6 +113,23 @@ scripts/** src/php-gettext/examples/** src/php-gettext/bin/** + *.tgz + + + + - Many SQL optimizations - SemanticScuttle shows bookmarks 4 times faster now diff --git a/src/SemanticScuttle/header.php b/src/SemanticScuttle/header.php index ef36e83..bc60088 100644 --- a/src/SemanticScuttle/header.php +++ b/src/SemanticScuttle/header.php @@ -14,9 +14,21 @@ * @license GPL http://www.gnu.org/licenses/gpl.html * @link http://sourceforge.net/projects/semanticscuttle */ -if (!file_exists(dirname(__FILE__) .'/../../data/config.php')) { + +if ('@data_dir@' == '@' . 'data_dir@') { + //non pear-install + $datadir = dirname(__FILE__) . '/../../data/'; +} else { + //pear installation; files are in include path + $datadir = '@data_dir@'; +} + +if (!file_exists($datadir . '/config.php')) { header('HTTP/1.0 500 Internal Server Error'); - die('Please copy "config.php.dist" to "config.php" in data/ folder.'); + die( + 'Please copy "config.php.dist" to "config.php" in data/ folder.' + . "\n" + ); } set_include_path( get_include_path() . PATH_SEPARATOR @@ -24,7 +36,6 @@ set_include_path( ); // 1 // First requirements part (before debug management) -$datadir = dirname(__FILE__) . '/../../data/'; require_once $datadir . '/config.default.php'; require_once $datadir . '/config.php'; diff --git a/tests/prepare.php b/tests/prepare.php index ce9cd1c..6afc284 100644 --- a/tests/prepare.php +++ b/tests/prepare.php @@ -19,7 +19,13 @@ $_SERVER['HTTP_HOST'] = 'http://localhost/'; define('UNIT_TEST_MODE', true); -require_once dirname(__FILE__) . '/../src/SemanticScuttle/header.php'; +if ('@data_dir@' == '@' . 'data_dir@') { + //non pear-install + require_once dirname(__FILE__) . '/../src/SemanticScuttle/header.php'; +} else { + //pear installation; files are in include path + require_once 'SemanticScuttle/header.php'; +} require_once dirname(__FILE__) . '/TestBase.php'; require_once dirname(__FILE__) . '/TestBaseApi.php'; diff --git a/www/www-header.php b/www/www-header.php index 0688b71..cc5a5ae 100644 --- a/www/www-header.php +++ b/www/www-header.php @@ -15,5 +15,11 @@ * @license GPL http://www.gnu.org/licenses/gpl.html * @link http://sourceforge.net/projects/semanticscuttle */ -require_once dirname(__FILE__) . '/../src/SemanticScuttle/header.php'; +if ('@data_dir@' == '@' . 'data_dir@') { + //non pear-install + require_once dirname(__FILE__) . '/../src/SemanticScuttle/header.php'; +} else { + //pear installation; files are in include path + require_once 'SemanticScuttle/header.php'; +} ?> \ No newline at end of file From 8fd5efb7c7fecf91ab850d2f5dfeced4b07e8562 Mon Sep 17 00:00:00 2001 From: Christian Weiske Date: Sun, 22 Aug 2010 01:32:14 +0200 Subject: [PATCH 09/11] make test running on installed pear package work: pear run-tests -pu __uri/semanticscuttle --- src/SemanticScuttle/header.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/SemanticScuttle/header.php b/src/SemanticScuttle/header.php index bc60088..d1a5c29 100644 --- a/src/SemanticScuttle/header.php +++ b/src/SemanticScuttle/header.php @@ -20,7 +20,7 @@ if ('@data_dir@' == '@' . 'data_dir@') { $datadir = dirname(__FILE__) . '/../../data/'; } else { //pear installation; files are in include path - $datadir = '@data_dir@'; + $datadir = '@data_dir@/SemanticScuttle/'; } if (!file_exists($datadir . '/config.php')) { From b243ecd53f82b3559980ce31d84a59554eb5b8f5 Mon Sep 17 00:00:00 2001 From: Christian Weiske Date: Sun, 22 Aug 2010 01:33:58 +0200 Subject: [PATCH 10/11] remove unneeded code --- tests/TagsCacheTest.php | 3 --- 1 file changed, 3 deletions(-) diff --git a/tests/TagsCacheTest.php b/tests/TagsCacheTest.php index 9097bcb..84f4ec0 100644 --- a/tests/TagsCacheTest.php +++ b/tests/TagsCacheTest.php @@ -54,9 +54,6 @@ class TagsCacheTest extends PHPUnit_Framework_TestCase protected function setUp() { - global $dbhost, $dbuser, $dbpass, $dbname, $dbport, $dbpersist, $dbtype, $tableprefix, $TEMPLATES_DIR, $debugMode; - require_once dirname(__FILE__) . '/../src/SemanticScuttle/header.php'; - $this->us =SemanticScuttle_Service_Factory::get('User'); $this->bs =SemanticScuttle_Service_Factory::get('Bookmark'); $this->bs->deleteAll(); From 25baf614b8b00bb39b9d35cf6ce5ce79f0954aeb Mon Sep 17 00:00:00 2001 From: Christian Weiske Date: Sun, 22 Aug 2010 01:46:20 +0200 Subject: [PATCH 11/11] package generation is fully working now --- build.xml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/build.xml b/build.xml index accae3b..1a979dd 100644 --- a/build.xml +++ b/build.xml @@ -22,6 +22,7 @@ - Fix bug #2976593: fr_FR locale is vietnamese " /> + @@ -195,13 +196,16 @@ - + + + + -