From f443476435cb14ae5f2d22330fb84ff18674699c Mon Sep 17 00:00:00 2001 From: Timothy Warren Date: Wed, 28 Nov 2012 13:13:30 -0500 Subject: [PATCH] Source rearrangement, OS X app bundle script --- .gitmodules | 4 +- OpenSQLManager.c | 1 - build_osx_bundle.php | 168 ++++++++++++++++++ makefile | 7 +- phpdoc.dist.xml | 6 +- resources/OSM.icns | Bin 0 -> 55076 bytes OpenSQLManager.php => src/OpenSQLManager.php | 2 +- {sys => src/sys}/common/db_reg.php | 0 {sys => src/sys}/common/functions.php | 0 {sys => src/sys}/common/settings.php | 0 {sys => src/sys}/db | 0 .../sys}/widgets/connection_sidebar.php | 0 {sys => src/sys}/widgets/data_grid.php | 0 {sys => src/sys}/widgets/db_tabs.php | 0 .../sys}/windows/connection_manager.php | 0 {sys => src/sys}/windows/main.php | 0 16 files changed, 179 insertions(+), 9 deletions(-) create mode 100644 build_osx_bundle.php create mode 100644 resources/OSM.icns rename OpenSQLManager.php => src/OpenSQLManager.php (98%) rename {sys => src/sys}/common/db_reg.php (100%) rename {sys => src/sys}/common/functions.php (100%) rename {sys => src/sys}/common/settings.php (100%) rename {sys => src/sys}/db (100%) rename {sys => src/sys}/widgets/connection_sidebar.php (100%) rename {sys => src/sys}/widgets/data_grid.php (100%) rename {sys => src/sys}/widgets/db_tabs.php (100%) rename {sys => src/sys}/windows/connection_manager.php (100%) rename {sys => src/sys}/windows/main.php (100%) diff --git a/.gitmodules b/.gitmodules index 475c754..3c7a6ac 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,3 +1,3 @@ -[submodule "sys/db"] - path = sys/db +[submodule "src/sys/db"] + path = src/sys/db url = git://github.com/aviat4ion/Query.git diff --git a/OpenSQLManager.c b/OpenSQLManager.c index 3af9bcb..e10e581 100644 --- a/OpenSQLManager.c +++ b/OpenSQLManager.c @@ -14,7 +14,6 @@ * Wrapper program for embeded php */ -#include #include int main(int argc, char *argv[]) diff --git a/build_osx_bundle.php b/build_osx_bundle.php new file mode 100644 index 0000000..9423ec9 --- /dev/null +++ b/build_osx_bundle.php @@ -0,0 +1,168 @@ + + !DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> + + + CFBundleGetInfoString + App for managing databases. + CFBundleExecutable + OpenSQLManager + CFBundleIdentifier + com.aviat4ion.OpenSQLManager + CFBundleName + OpenSQLManager + CFBundleIconFile + OSM.icns + CFBundleShortVersionString + {$version} + CFBundleInfoDictionaryVersion + 6.0 + CFBundlePackageType + APPL + IFMajorVersion + {$major} + IFMinorVersion + {$minor} + + +XML; + + // Add the plist to the bundle + file_put_contents(CONTENTS.'/Info.plist', $plist); +} + +create_dirs(); +copy_src(); +create_plist(); +exit("App bundle created \n"); \ No newline at end of file diff --git a/makefile b/makefile index b8ead0f..d2ab3c8 100644 --- a/makefile +++ b/makefile @@ -1,8 +1,11 @@ -CC = gcc 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` all: OpenSQLManager.c ${CC} -O0 -o OpenSQLManager.o OpenSQLManager.c ${CFLAGS} - ${CC} -O0 -o OpenSQLManager OpenSQLManager.o ${LDFLAGS} \ No newline at end of file + ${CC} -O0 -o OpenSQLManager OpenSQLManager.o ${LDFLAGS} + +release: OpenSQLManager.c + ${CC} -O2 -o OpenSQLManager.o OpenSQLManager.c ${CFLAGS} + ${CC} -O2 -o OpenSQLManager OpenSQLManager.o ${LDFLAGS} \ No newline at end of file diff --git a/phpdoc.dist.xml b/phpdoc.dist.xml index 73a484f..ab430bb 100644 --- a/phpdoc.dist.xml +++ b/phpdoc.dist.xml @@ -11,10 +11,10 @@