More OS X adjustments
This commit is contained in:
parent
f443476435
commit
fcdcc070db
BIN
OpenSQLManager.app.zip
Executable file
BIN
OpenSQLManager.app.zip
Executable file
Binary file not shown.
@ -1,9 +1,12 @@
|
|||||||
<?php
|
<?php
|
||||||
define('VERSION', '0.1.0');
|
// Compile the binary
|
||||||
define('MAJOR_VERSION', '0');
|
`make clean`;
|
||||||
define('MINOR_VERSION', '1');
|
`make all`;
|
||||||
|
|
||||||
|
define('VERSION', '0.2.0');
|
||||||
define('APP_PATH', __DIR__.'/OpenSQLManager.app');
|
define('APP_PATH', __DIR__.'/OpenSQLManager.app');
|
||||||
define('CONTENTS', APP_PATH . '/Contents');
|
define('CONTENTS', APP_PATH . '/Contents');
|
||||||
|
define('FRAMEWORKS', CONTENTS . '/Frameworks');
|
||||||
define('MAC_OS', CONTENTS . '/MacOS');
|
define('MAC_OS', CONTENTS . '/MacOS');
|
||||||
define('RESOURCES', CONTENTS . '/Resources');
|
define('RESOURCES', CONTENTS . '/Resources');
|
||||||
define('SRC_DIR', __DIR__.'/src');
|
define('SRC_DIR', __DIR__.'/src');
|
||||||
@ -33,41 +36,36 @@ if ( ! function_exists('glob_recursive'))
|
|||||||
*/
|
*/
|
||||||
function create_dirs()
|
function create_dirs()
|
||||||
{
|
{
|
||||||
if ( ! is_dir(APP_PATH))
|
if ( ! is_dir(APP_PATH)) mkdir(APP_PATH);
|
||||||
{
|
|
||||||
mkdir(APP_PATH);
|
|
||||||
|
|
||||||
if ( ! is_dir(CONTENTS))
|
if ( ! is_dir(CONTENTS))
|
||||||
{
|
{
|
||||||
mkdir(CONTENTS);
|
mkdir(CONTENTS);
|
||||||
|
//mkdir(CONTENTS.'/Frameworks');
|
||||||
if ( ! is_dir(RESOURCES))
|
}
|
||||||
{
|
|
||||||
mkdir(RESOURCES);
|
if ( ! is_dir(RESOURCES))
|
||||||
mkdir(RESOURCES.'/images');
|
{
|
||||||
}
|
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');
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
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');
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -108,6 +106,9 @@ function copy_src()
|
|||||||
copy($file, $new_file);
|
copy($file, $new_file);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Copy license file
|
||||||
|
copy(SRC_RESOURCES.'/LICENSE', RESOURCES.'/LICENSE');
|
||||||
|
|
||||||
// Copy resources
|
// Copy resources
|
||||||
$rs = glob_recursive(SRC_RESOURCES.'/*.*');
|
$rs = glob_recursive(SRC_RESOURCES.'/*.*');
|
||||||
foreach ($rs as $resource)
|
foreach ($rs as $resource)
|
||||||
@ -118,6 +119,13 @@ 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`;
|
||||||
|
}*/
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -126,8 +134,6 @@ function copy_src()
|
|||||||
function create_plist()
|
function create_plist()
|
||||||
{
|
{
|
||||||
$version = VERSION;
|
$version = VERSION;
|
||||||
$minor = MINOR_VERSION;
|
|
||||||
$major = MAJOR_VERSION;
|
|
||||||
|
|
||||||
$plist = <<<XML
|
$plist = <<<XML
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
@ -135,25 +141,23 @@ function create_plist()
|
|||||||
<plist version="1.0">
|
<plist version="1.0">
|
||||||
<dict>
|
<dict>
|
||||||
<key>CFBundleGetInfoString</key>
|
<key>CFBundleGetInfoString</key>
|
||||||
<string>App for managing databases.</string>
|
<string>App for managing databases.</string>
|
||||||
<key>CFBundleExecutable</key>
|
<key>CFBundleExecutable</key>
|
||||||
<string>OpenSQLManager</string>
|
<string>OpenSQLManager</string>
|
||||||
<key>CFBundleIdentifier</key>
|
<key>CFBundleIdentifier</key>
|
||||||
<string>com.aviat4ion.OpenSQLManager</string>
|
<string>com.aviat4ion.OpenSQLManager</string>
|
||||||
<key>CFBundleName</key>
|
<key>CFBundleName</key>
|
||||||
<string>OpenSQLManager</string>
|
<string>OpenSQLManager</string>
|
||||||
<key>CFBundleIconFile</key>
|
<key>CFBundleIconFile</key>
|
||||||
<string>OSM.icns</string>
|
<string>OpenSQLManager.icns</string>
|
||||||
<key>CFBundleShortVersionString</key>
|
<key>CFBundleShortVersionString</key>
|
||||||
<string>{$version}</string>
|
<string>{$version}</string>
|
||||||
<key>CFBundleInfoDictionaryVersion</key>
|
<key>CFBundleInfoDictionaryVersion</key>
|
||||||
<string>6.0</string>
|
<string>6.0</string>
|
||||||
<key>CFBundlePackageType</key>
|
<key>CFBundlePackageType</key>
|
||||||
<string>APPL</string>
|
<string>APPL</string>
|
||||||
<key>IFMajorVersion</key>
|
<key>LSMinimumSystemVersion</key>
|
||||||
<integer>{$major}</integer>
|
<string>10.6.0</string>
|
||||||
<key>IFMinorVersion</key>
|
|
||||||
<integer>{$minor}</integer>
|
|
||||||
</dict>
|
</dict>
|
||||||
</plist>
|
</plist>
|
||||||
XML;
|
XML;
|
||||||
|
7
makefile
7
makefile
@ -7,5 +7,8 @@ all: OpenSQLManager.c
|
|||||||
${CC} -O0 -o OpenSQLManager OpenSQLManager.o ${LDFLAGS}
|
${CC} -O0 -o OpenSQLManager OpenSQLManager.o ${LDFLAGS}
|
||||||
|
|
||||||
release: OpenSQLManager.c
|
release: OpenSQLManager.c
|
||||||
${CC} -O2 -o OpenSQLManager.o OpenSQLManager.c ${CFLAGS}
|
${CC} -Os -o OpenSQLManager.o OpenSQLManager.c ${CFLAGS}
|
||||||
${CC} -O2 -o OpenSQLManager OpenSQLManager.o ${LDFLAGS}
|
${CC} -Os -o OpenSQLManager OpenSQLManager.o ${LDFLAGS}
|
||||||
|
|
||||||
|
clean:
|
||||||
|
rm -f OpenSQLManager.o
|
@ -32,10 +32,11 @@ ini_set('memory_limit', -1);
|
|||||||
|
|
||||||
// Set the current directory as the base for included files
|
// Set the current directory as the base for included files
|
||||||
define('OSM_BASE_DIR', __DIR__.'/sys');
|
define('OSM_BASE_DIR', __DIR__.'/sys');
|
||||||
define('OSM_RESOURCE_DIR', __DIR__.'/../Resources');
|
define('OSM_RESOURCE_DIR', realpath(__DIR__.'/../Resources'));
|
||||||
define('OSM_SETTINGS_DIR', __DIR__);
|
define('OSM_SETTINGS_DIR', __DIR__);
|
||||||
define('OSM_PROGRAM_NAME', 'OpenSQLManager');
|
define('OSM_PROGRAM_NAME', 'OpenSQLManager');
|
||||||
define('OSM_VERSION', '0.2.0pre');
|
define('OSM_VERSION', '0.2.0pre');
|
||||||
|
echo OSM_RESOURCE_DIR . "\n";
|
||||||
|
|
||||||
// --------------------------------------------------------------------------
|
// --------------------------------------------------------------------------
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user