Various build-process updates
This commit is contained in:
parent
f9d97aa25d
commit
ceeb5d826d
3
.gitignore
vendored
3
.gitignore
vendored
@ -1,4 +1,4 @@
|
|||||||
# Ignore the stupid .DS_Store files
|
# Ignore stupid files and build-specific files
|
||||||
*.DS_Store
|
*.DS_Store
|
||||||
settings.json
|
settings.json
|
||||||
errors.txt
|
errors.txt
|
||||||
@ -8,3 +8,4 @@ nbproject/*
|
|||||||
*.o
|
*.o
|
||||||
*.app/*
|
*.app/*
|
||||||
OpenSQLManager
|
OpenSQLManager
|
||||||
|
*.app*
|
@ -9,9 +9,9 @@ before_script:
|
|||||||
- sh -c "psql -c 'create database test;' -U postgres"
|
- sh -c "psql -c 'create database test;' -U postgres"
|
||||||
- sh -c "mysql -e 'create database IF NOT EXISTS test;'"
|
- sh -c "mysql -e 'create database IF NOT EXISTS test;'"
|
||||||
- git submodule update --init
|
- git submodule update --init
|
||||||
- cd sys/db
|
- cd src/sys/db
|
||||||
- git checkout master
|
- git checkout master
|
||||||
- git pull origin master
|
- git pull origin master
|
||||||
- cd ../../
|
- cd ../../../
|
||||||
|
|
||||||
script: php ./tests/index.php
|
script: php ./tests/index.php
|
@ -20,6 +20,8 @@ int main(int argc, char *argv[])
|
|||||||
{
|
{
|
||||||
PHP_EMBED_START_BLOCK(argc,argv)
|
PHP_EMBED_START_BLOCK(argc,argv)
|
||||||
zend_eval_string(" \
|
zend_eval_string(" \
|
||||||
|
$name = 'wxwidgets.'.PHP_SHLIB_SUFFIX; \
|
||||||
|
dl($name); \
|
||||||
chdir(dirname($argv[0])); \
|
chdir(dirname($argv[0])); \
|
||||||
require ('OpenSQLManager.php'); \
|
require ('OpenSQLManager.php'); \
|
||||||
", NULL, "TEST" TSRMLS_CC);
|
", NULL, "TEST" TSRMLS_CC);
|
||||||
|
@ -1,7 +1,9 @@
|
|||||||
<?php
|
<?php
|
||||||
// Compile the binary
|
// Compile the binary
|
||||||
`make clean`;
|
`make clean`;
|
||||||
`make all`;
|
`make release`;
|
||||||
|
`rm OpenSQLManager.o`;
|
||||||
|
|
||||||
|
|
||||||
define('VERSION', '0.2.0');
|
define('VERSION', '0.2.0');
|
||||||
define('APP_PATH', __DIR__.'/OpenSQLManager.app');
|
define('APP_PATH', __DIR__.'/OpenSQLManager.app');
|
||||||
@ -31,41 +33,66 @@ if ( ! function_exists('glob_recursive'))
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Creates directories based on the array given
|
||||||
|
*
|
||||||
|
* @param array $structure
|
||||||
|
* @param string $path
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
function make_dir_tree($structure, $path=__DIR__)
|
||||||
|
{
|
||||||
|
foreach ($structure as $folder => $sub_folder)
|
||||||
|
{
|
||||||
|
// Folder with subfolders
|
||||||
|
if (is_array($sub_folder))
|
||||||
|
{
|
||||||
|
$new_path = "{$path}/{$folder}";
|
||||||
|
if ( ! is_dir($new_path)) mkdir($new_path);
|
||||||
|
call_user_func(__FUNCTION__, $sub_folder, $new_path);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$new_path = "{$path}/{$sub_folder}";
|
||||||
|
if ( ! is_dir($new_path)) mkdir($new_path);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Create bundle folder structure
|
* Create bundle folder structure
|
||||||
*/
|
*/
|
||||||
function create_dirs()
|
function create_dirs()
|
||||||
{
|
{
|
||||||
if ( ! is_dir(APP_PATH)) mkdir(APP_PATH);
|
$dir_tree = [
|
||||||
|
'OpenSQLManager.app' => [
|
||||||
|
'Contents' => [
|
||||||
|
'Frameworks',
|
||||||
|
'Resources' => [
|
||||||
|
'images'
|
||||||
|
],
|
||||||
|
'MacOS' => [
|
||||||
|
'sys' => [
|
||||||
|
'common',
|
||||||
|
'db' => [
|
||||||
|
'classes',
|
||||||
|
'drivers' => [
|
||||||
|
'mysql',
|
||||||
|
'pgsql',
|
||||||
|
'sqlite',
|
||||||
|
'odbc',
|
||||||
|
'firebird'
|
||||||
|
]
|
||||||
|
],
|
||||||
|
'widgets',
|
||||||
|
'windows'
|
||||||
|
]
|
||||||
|
]
|
||||||
|
]
|
||||||
|
]
|
||||||
|
];
|
||||||
|
|
||||||
if ( ! is_dir(CONTENTS))
|
make_dir_tree($dir_tree);
|
||||||
{
|
|
||||||
mkdir(CONTENTS);
|
|
||||||
//mkdir(CONTENTS.'/Frameworks');
|
|
||||||
}
|
|
||||||
|
|
||||||
if ( ! is_dir(RESOURCES))
|
|
||||||
{
|
|
||||||
mkdir(RESOURCES);
|
|
||||||
mkdir(RESOURCES.'/images');
|
|
||||||
}
|
|
||||||
|
|
||||||
if ( ! is_dir(MAC_OS))
|
|
||||||
{
|
|
||||||
mkdir(MAC_OS);
|
|
||||||
mkdir(MAC_OS.'/sys');
|
|
||||||
mkdir(MAC_OS.'/sys/common');
|
|
||||||
mkdir(MAC_OS.'/sys/db');
|
|
||||||
mkdir(MAC_OS.'/sys/widgets');
|
|
||||||
mkdir(MAC_OS.'/sys/windows');
|
|
||||||
mkdir(MAC_OS.'/sys/db/classes');
|
|
||||||
mkdir(MAC_OS.'/sys/db/drivers');
|
|
||||||
mkdir(MAC_OS.'/sys/db/drivers/mysql');
|
|
||||||
mkdir(MAC_OS.'/sys/db/drivers/pgsql');
|
|
||||||
mkdir(MAC_OS.'/sys/db/drivers/sqlite');
|
|
||||||
mkdir(MAC_OS.'/sys/db/drivers/odbc');
|
|
||||||
mkdir(MAC_OS.'/sys/db/drivers/firebird');
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -82,7 +109,7 @@ function copy_src()
|
|||||||
// Drop to shell because php treats it as text
|
// Drop to shell because php treats it as text
|
||||||
$src = __DIR__.'/OpenSQLManager';
|
$src = __DIR__.'/OpenSQLManager';
|
||||||
$dest = MAC_OS;
|
$dest = MAC_OS;
|
||||||
`cp {$src} {$dest}`;
|
`mv {$src} {$dest}`;
|
||||||
|
|
||||||
$raw_src_files = glob_recursive(SRC_DIR.'/*.php');
|
$raw_src_files = glob_recursive(SRC_DIR.'/*.php');
|
||||||
$src_files = array();
|
$src_files = array();
|
||||||
@ -119,13 +146,6 @@ function copy_src()
|
|||||||
// Copy the files
|
// Copy the files
|
||||||
copy($resource, $new_rs);
|
copy($resource, $new_rs);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Copy frameworks
|
|
||||||
/*if (is_dir('/Library/Frameworks/Firebird.Framework'))
|
|
||||||
{
|
|
||||||
$new_path = FRAMEWORKS;
|
|
||||||
`cp -R /Library/Frameworks/Firebird.framework/ {$new_path}/Firebird.framework`;
|
|
||||||
}*/
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -137,7 +157,7 @@ function create_plist()
|
|||||||
|
|
||||||
$plist = <<<XML
|
$plist = <<<XML
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||||
<plist version="1.0">
|
<plist version="1.0">
|
||||||
<dict>
|
<dict>
|
||||||
<key>CFBundleGetInfoString</key>
|
<key>CFBundleGetInfoString</key>
|
||||||
|
3
makefile
3
makefile
@ -1,5 +1,4 @@
|
|||||||
CFLAGS = -c `/opt/php-embed/bin/php-config --includes` -Wall -g
|
CFLAGS = -c `/opt/php-embed/bin/php-config --includes` -Wall -g
|
||||||
|
|
||||||
LDFLAGS = -L/Library/Frameworks/Firebird.framework/Libraries -L/opt/php-embed/lib -lphp5 `/opt/php-embed/bin/php-config --libs`
|
LDFLAGS = -L/Library/Frameworks/Firebird.framework/Libraries -L/opt/php-embed/lib -lphp5 `/opt/php-embed/bin/php-config --libs`
|
||||||
|
|
||||||
all: OpenSQLManager.c
|
all: OpenSQLManager.c
|
||||||
@ -12,3 +11,5 @@ release: OpenSQLManager.c
|
|||||||
|
|
||||||
clean:
|
clean:
|
||||||
rm -f OpenSQLManager.o
|
rm -f OpenSQLManager.o
|
||||||
|
rm -f OpenSQLManager
|
||||||
|
rm -rf OpenSQLManager.app
|
Binary file not shown.
BIN
resources/OpenSQLManager.ico
Normal file
BIN
resources/OpenSQLManager.ico
Normal file
Binary file not shown.
After Width: | Height: | Size: 472 KiB |
BIN
resources/OpenSQLManager.png
Normal file
BIN
resources/OpenSQLManager.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 50 KiB |
Reference in New Issue
Block a user