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
|
||||
define('VERSION', '0.1.0');
|
||||
define('MAJOR_VERSION', '0');
|
||||
define('MINOR_VERSION', '1');
|
||||
// Compile the binary
|
||||
`make clean`;
|
||||
`make all`;
|
||||
|
||||
define('VERSION', '0.2.0');
|
||||
define('APP_PATH', __DIR__.'/OpenSQLManager.app');
|
||||
define('CONTENTS', APP_PATH . '/Contents');
|
||||
define('FRAMEWORKS', CONTENTS . '/Frameworks');
|
||||
define('MAC_OS', CONTENTS . '/MacOS');
|
||||
define('RESOURCES', CONTENTS . '/Resources');
|
||||
define('SRC_DIR', __DIR__.'/src');
|
||||
@ -33,41 +36,36 @@ if ( ! function_exists('glob_recursive'))
|
||||
*/
|
||||
function create_dirs()
|
||||
{
|
||||
if ( ! is_dir(APP_PATH))
|
||||
{
|
||||
mkdir(APP_PATH);
|
||||
if ( ! is_dir(APP_PATH)) mkdir(APP_PATH);
|
||||
|
||||
if ( ! is_dir(CONTENTS))
|
||||
{
|
||||
mkdir(CONTENTS);
|
||||
|
||||
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');
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
if ( ! is_dir(CONTENTS))
|
||||
{
|
||||
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');
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@ -108,6 +106,9 @@ function copy_src()
|
||||
copy($file, $new_file);
|
||||
}
|
||||
|
||||
// Copy license file
|
||||
copy(SRC_RESOURCES.'/LICENSE', RESOURCES.'/LICENSE');
|
||||
|
||||
// Copy resources
|
||||
$rs = glob_recursive(SRC_RESOURCES.'/*.*');
|
||||
foreach ($rs as $resource)
|
||||
@ -118,6 +119,13 @@ function copy_src()
|
||||
// Copy the files
|
||||
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()
|
||||
{
|
||||
$version = VERSION;
|
||||
$minor = MINOR_VERSION;
|
||||
$major = MAJOR_VERSION;
|
||||
|
||||
$plist = <<<XML
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
@ -135,25 +141,23 @@ function create_plist()
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>CFBundleGetInfoString</key>
|
||||
<string>App for managing databases.</string>
|
||||
<string>App for managing databases.</string>
|
||||
<key>CFBundleExecutable</key>
|
||||
<string>OpenSQLManager</string>
|
||||
<string>OpenSQLManager</string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>com.aviat4ion.OpenSQLManager</string>
|
||||
<string>com.aviat4ion.OpenSQLManager</string>
|
||||
<key>CFBundleName</key>
|
||||
<string>OpenSQLManager</string>
|
||||
<string>OpenSQLManager</string>
|
||||
<key>CFBundleIconFile</key>
|
||||
<string>OSM.icns</string>
|
||||
<string>OpenSQLManager.icns</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>{$version}</string>
|
||||
<string>{$version}</string>
|
||||
<key>CFBundleInfoDictionaryVersion</key>
|
||||
<string>6.0</string>
|
||||
<string>6.0</string>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>APPL</string>
|
||||
<key>IFMajorVersion</key>
|
||||
<integer>{$major}</integer>
|
||||
<key>IFMinorVersion</key>
|
||||
<integer>{$minor}</integer>
|
||||
<string>APPL</string>
|
||||
<key>LSMinimumSystemVersion</key>
|
||||
<string>10.6.0</string>
|
||||
</dict>
|
||||
</plist>
|
||||
XML;
|
||||
|
7
makefile
7
makefile
@ -7,5 +7,8 @@ all: OpenSQLManager.c
|
||||
${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}
|
||||
${CC} -Os -o OpenSQLManager.o OpenSQLManager.c ${CFLAGS}
|
||||
${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
|
||||
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_PROGRAM_NAME', 'OpenSQLManager');
|
||||
define('OSM_VERSION', '0.2.0pre');
|
||||
echo OSM_RESOURCE_DIR . "\n";
|
||||
|
||||
// --------------------------------------------------------------------------
|
||||
|
||||
|
Reference in New Issue
Block a user