Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/monodevelop.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlan McGovern <alan@xamarin.com>2015-01-15 22:06:41 +0300
committerAlan McGovern <alan@xamarin.com>2015-01-15 22:06:41 +0300
commit8e357d6be321e716f361ebc9591e4cee7f217c21 (patch)
tree0ea1066fec61178b208d68a850c211405fda8f5a
parent1aec36cb8cd0ca3b19ea33b46458102d47eb2351 (diff)
Revert "[MacOSX] Update MonoDevelop launch code according to latest Xamarin.Mac API."
This reverts commit 9cdebddc6ad9d12c4dac927e068d2a2fa21e944e.
-rw-r--r--main/build/MacOSX/.gitignore2
-rw-r--r--main/build/MacOSX/Makefile.am21
-rw-r--r--main/build/MacOSX/native-init.m89
3 files changed, 3 insertions, 109 deletions
diff --git a/main/build/MacOSX/.gitignore b/main/build/MacOSX/.gitignore
deleted file mode 100644
index 9eca6c88cf..0000000000
--- a/main/build/MacOSX/.gitignore
+++ /dev/null
@@ -1,2 +0,0 @@
-*.a
-*.o
diff --git a/main/build/MacOSX/Makefile.am b/main/build/MacOSX/Makefile.am
index 3a4bc94574..e0a97da23d 100644
--- a/main/build/MacOSX/Makefile.am
+++ b/main/build/MacOSX/Makefile.am
@@ -11,7 +11,6 @@ SDK_PATH=$(shell xcrun --sdk macosx10.8 --show-sdk-path)
PACKAGE_UPDATE_ID=$(shell $(MD_CONFIGURE) get-releaseid)
BUNDLE_VERSION=$(shell $(MD_CONFIGURE) get-version)
-XAMARIN_MAC=/Library/Frameworks/Xamarin.Mac.framework/Versions/Current/
CLEANFILES = render.exe
#DISTCLEANFILES =
@@ -25,20 +24,14 @@ render.exe: render.cs
dmg: render.exe app
./make-dmg-bundle.sh
-monostub: monostub.m
+monostub: monostub.m $(MONOSTUB_EXTRA_SOURCES)
gcc -Wall -mmacosx-version-min=10.6 -m32 -o $@ $^ -framework AppKit -isysroot $(SDK_PATH)
-native-init.o: native-init.m
- clang -Wall -c -mmacosx-version-min=10.6 -m32 -o $@ $^ -isysroot $(SDK_PATH) -I$(XAMARIN_MAC)/include
-
-native-init.a: native-init.o
- xcrun libtool -static -o $@ $^
-
clean-local:
rm -rf MonoDevelop.app
rm -f MonoDevelop*.dmg
-app: monostub native-init.a
+app: monostub
@echo ""
@echo "Creating directories in app bundle"
@echo ""
@@ -46,12 +39,6 @@ app: monostub native-init.a
mkdir -p $(MAC_APP_DIR)/Contents/MacOS/share
mkdir -p $(MAC_APP_LIB_DIR)
- @echo ""
- @echo "Building the native executable"
- @echo ""
-
- $(XAMARIN_MAC)/bin/mmp --output $(abspath $(MAC_APP_DIR)/../) --name $(APP_NAME) --no-root-assembly --profile=xammac --link_flags="-force_load native-init.a" --use-system-mono --arch i386
-
# @echo ""
# @echo "Copying install prefix into app bundle"
# @echo ""
@@ -90,6 +77,7 @@ app: monostub native-init.a
@echo ""
@echo "Copying launch scripts into app bundle"
@echo ""
+ cp monostub $(MACOS)/MonoDevelop
cp monostub $(MACOS)/mdtool
# Remove addins that don't work on OSX
@@ -113,9 +101,6 @@ app: monostub native-init.a
$(MAC_APP_LIB_DIR)/bin/addins-setup.config \
$(MAC_APP_LIB_DIR)/AddIns/MonoDevelop.TextTemplating/Mono.TextTemplating.Tests*
- @# Do not include libxammac.dylib since we're using mmp
- rm $(MAC_APP_DIR)/Contents/Resources/lib/monodevelop/bin/libxammac.dylib
-
# add extras known to work on Mac, if they exist
@echo ""
@echo "Copying supported extras into app bundle"
diff --git a/main/build/MacOSX/native-init.m b/main/build/MacOSX/native-init.m
deleted file mode 100644
index 79b7aca401..0000000000
--- a/main/build/MacOSX/native-init.m
+++ /dev/null
@@ -1,89 +0,0 @@
-#import <Cocoa/Cocoa.h>
-
-#include <xamarin/xamarin.h>
-#include <xamarin/launch.h>
-
-static int
-push_env (const char *variable, const char *value)
-{
- size_t len = strlen (value);
- const char *current;
- int rv;
-
- if ((current = getenv (variable)) && *current) {
- char *buf = malloc (len + strlen (current) + 2);
- memcpy (buf, value, len);
- buf[len] = ':';
- strcpy (buf + len + 1, current);
- rv = setenv (variable, buf, 1);
- free (buf);
- } else {
- rv = setenv (variable, value, 1);
- }
-
- return rv;
-}
-
-static bool
-env2bool (const char *env, bool defaultValue)
-{
- const char *value;
- bool nz = NO;
- int i;
-
- if (!(value = getenv (env)))
- return defaultValue;
-
- if (!strcasecmp (value, "true"))
- return YES;
-
- if (!strcasecmp (value, "yes"))
- return YES;
-
- /* check to see if the value is numeric. All numeric values evaluate to true *except* zero */
- for (i = 0; value[i]; i++) {
- if (!isdigit ((int) ((unsigned char) value[i])))
- return NO;
-
- if (value[i] != '0')
- nz = YES;
- }
-
- return nz;
-}
-
-void
-xamarin_app_initialize (xamarin_initialize_data *data)
-{
- if (data->size != sizeof (xamarin_initialize_data)) {
- fprintf (stderr, "Failed size initialization check.\n");
- data->exit_code = 1;
- data->exit = true;
- return;
- }
-
- if (!data->is_relaunch) {
- push_env ("DYLD_FALLBACK_LIBRARY_PATH", "/lib:/usr/lib:/Library/Developer/CommandLineTools/usr/lib:/usr/local/lib");
- /* CommandLineTools are needed for OSX 10.9+ */
- push_env ("DYLD_FALLBACK_LIBRARY_PATH", [[data->app_dir stringByAppendingPathComponent:@"Contents/MacOS/lib/monodevelop/bin/"] UTF8String]);
- data->requires_relaunch = true;
- return;
- }
-
- // Use SGen or Boehm?
- // can be overridden with either plist bool MonoUseSGen or MONODEVELOP_USE_SGEN env
- bool use_sgen = YES;
- NSDictionary *plist = [[NSBundle mainBundle] infoDictionary];
- if (plist) {
- NSNumber *sgen_obj = (NSNumber *) [plist objectForKey:@"MonoUseSGen"];
- if (sgen_obj)
- use_sgen = [sgen_obj boolValue];
- }
- // allow the MONODEVELOP_USE_SGEN environment variable to override the plist value
- use_sgen = env2bool ("MONODEVELOP_USE_SGEN", use_sgen);
-
- xamarin_set_use_sgen (use_sgen);
- xamarin_set_is_unified (true);
-
- xamarin_set_bundle_path ([[data->app_dir stringByAppendingPathComponent: @"Contents/Resources/lib/monodevelop/bin"] UTF8String]);
-}