Revision: 18749
http://vice-emu.svn.sourceforge.net/vice-emu/?rev=18749&view=rev
Author: strik
Date: 2008-04-27 09:33:36 -0700 (Sun, 27 Apr 2008)
Log Message:
-----------
2008-04-20 Christian Vogelgsang <ch...@vo...>
* build/macosx/build-inc.sh, build/macosx/build-ffmpeglame.sh:
updated Mac OS X build scripts.
* arch/unix/archdep.c, arch/unix/archdep.h: added global
'archdep_pref_path' to relocate preferences to System Directory
in Mac OS X Cocoa Port.
Modified Paths:
--------------
trunk/vice/ChangeLog
trunk/vice/build/macosx/build-ffmpeglame.sh
trunk/vice/build/macosx/build-inc.sh
trunk/vice/src/ChangeLog
trunk/vice/src/arch/unix/archdep.c
trunk/vice/src/arch/unix/archdep.h
Modified: trunk/vice/ChangeLog
===================================================================
--- trunk/vice/ChangeLog 2008-04-27 09:00:53 UTC (rev 18748)
+++ trunk/vice/ChangeLog 2008-04-27 16:33:36 UTC (rev 18749)
@@ -1,3 +1,8 @@
+2008-04-20 Christian Vogelgsang <ch...@vo...>
+
+ * build/macosx/build-inc.sh, build/macosx/build-ffmpeglame.sh:
+ updated Mac OS X build scripts.
+
2008-04-26 Spiro Trikaliotis <spi...@gm...>
* Version 1.22.12.
Modified: trunk/vice/build/macosx/build-ffmpeglame.sh
===================================================================
--- trunk/vice/build/macosx/build-ffmpeglame.sh 2008-04-27 09:00:53 UTC (rev 18748)
+++ trunk/vice/build/macosx/build-ffmpeglame.sh 2008-04-27 16:33:36 UTC (rev 18749)
@@ -29,8 +29,8 @@
"svn checkout svn://svn.mplayerhq.hu/ffmpeg/trunk ffmpeg-svn" \
"--disable-ffmpeg --disable-ffserver --disable-ffplay \
--disable-static --enable-shared --enable-libmp3lame \
- \"--extra-cflags=$CPPFLAGS\" \"--extra-ldflags=$LDFLAGS\" \
- \"--cc=$CC\" --arch=$ARCH"
+ \"--extra-cflags=$CPPFLAGS $COMPILE_TAG\" \"--extra-ldflags=$LDFLAGS $COMPILE_TAG\" \
+ --arch=$ARCH --disable-altivec --disable-mmx"
echo "===== ffmpeg+lame ready for $ARCH ====="
Modified: trunk/vice/build/macosx/build-inc.sh
===================================================================
--- trunk/vice/build/macosx/build-inc.sh 2008-04-27 09:00:53 UTC (rev 18748)
+++ trunk/vice/build/macosx/build-inc.sh 2008-04-27 16:33:36 UTC (rev 18749)
@@ -177,7 +177,8 @@
# EXTRA_OPT="--host=$ARCH-apple-darwin`uname -r`"
#fi
- export CC="gcc -arch $ARCH -isysroot $SDK -mmacosx-version-min=$SDK_VERSION"
- export CXX="g++ -arch $ARCH -isysroot $SDK -mmacosx-version-min=$SDK_VERSION"
- export LD="gcc -arch $ARCH -isysroot $SDK -mmacosx-version-min=$SDK_VERSION"
+ export COMPILE_TAG="-arch $ARCH -isysroot $SDK -mmacosx-version-min=$SDK_VERSION"
+ export CC="gcc $COMPILE_TAG"
+ export CXX="g++ $COMPILE_TAG"
+ export LD="gcc $COMPILE_TAG"
}
Modified: trunk/vice/src/ChangeLog
===================================================================
--- trunk/vice/src/ChangeLog 2008-04-27 09:00:53 UTC (rev 18748)
+++ trunk/vice/src/ChangeLog 2008-04-27 16:33:36 UTC (rev 18749)
@@ -1,3 +1,9 @@
+2008-04-20 Christian Vogelgsang <ch...@vo...>
+
+ * arch/unix/archdep.c, arch/unix/archdep.h: added global
+ 'archdep_pref_path' to relocate preferences to System Directory
+ in Mac OS X Cocoa Port.
+
2008-04-26 Spiro Trikaliotis <spi...@gm...>
* Version 1.22.12.
Modified: trunk/vice/src/arch/unix/archdep.c
===================================================================
--- trunk/vice/src/arch/unix/archdep.c 2008-04-27 09:00:53 UTC (rev 18748)
+++ trunk/vice/src/arch/unix/archdep.c 2008-04-27 16:33:36 UTC (rev 18749)
@@ -60,6 +60,9 @@
static char *argv0 = NULL;
static char *boot_path = NULL;
+/* alternate storage of preferences */
+char *archdep_pref_path = NULL; /* NULL -> use home_path + ".vice" */
+
int archdep_init(int *argc, char **argv)
{
argv0 = lib_stralloc(argv[0]);
@@ -227,38 +230,51 @@
char *archdep_default_resource_file_name(void)
{
- const char *home;
-
- home = archdep_home_path();
- return util_concat(home, "/.vice/vicerc", NULL);
+ if(archdep_pref_path==NULL) {
+ const char *home;
+
+ home = archdep_home_path();
+ return util_concat(home, "/.vice/vicerc", NULL);
+ } else {
+ return util_concat(archdep_pref_path, "/vicerc", NULL);
+ }
}
char *archdep_default_fliplist_file_name(void)
{
- const char *home;
+ if(archdep_pref_path==NULL) {
+ const char *home;
- home = archdep_home_path();
- return util_concat(home, "/.vice/fliplist-", machine_name, ".vfl", NULL);
+ home = archdep_home_path();
+ return util_concat(home, "/.vice/fliplist-", machine_name, ".vfl", NULL);
+ } else {
+ return util_concat(archdep_pref_path, "/fliplist-", machine_name, ".vfl", NULL);
+ }
}
char *archdep_default_save_resource_file_name(void)
-{
+{
char *fname;
const char *home;
char *viceuserdir;
- home = archdep_home_path();
+ if(archdep_pref_path==NULL) {
+ home = archdep_home_path();
+ viceuserdir = util_concat(home, "/.vice", NULL);
+ } else {
+ viceuserdir = archdep_pref_path;
+ }
- viceuserdir = util_concat(home, "/.vice", NULL);
-
if (access(viceuserdir, F_OK)) {
mkdir(viceuserdir, 0700);
}
fname = util_concat(viceuserdir, "/vicerc", NULL);
+
+ if(archdep_pref_path==NULL) {
+ lib_free(viceuserdir);
+ }
- lib_free(viceuserdir);
-
return fname;
}
Modified: trunk/vice/src/arch/unix/archdep.h
===================================================================
--- trunk/vice/src/arch/unix/archdep.h 2008-04-27 09:00:53 UTC (rev 18748)
+++ trunk/vice/src/arch/unix/archdep.h 2008-04-27 16:33:36 UTC (rev 18749)
@@ -105,6 +105,9 @@
extern const char *archdep_home_path(void);
+/* set this path to customize the preference storage */
+extern char *archdep_pref_path;
+
/* Define the default system directory (where the ROMs are). */
#ifdef __NetBSD__
#define LIBDIR PREFIX "/share/vice"
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|