Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » Developing U++ » Mac OS » after rev3936 - Minimum things to compile and/or run ide/uppsrc under OSX11
after rev3936 - Minimum things to compile and/or run ide/uppsrc under OSX11 [message #33959] Fri, 30 September 2011 23:17 Go to next message
fudadmin is currently offline  fudadmin
Messages: 1321
Registered: November 2005
Location: Kaunas, Lithuania
Ultimate Contributor
Administrator
1. Patches (attached). I don't know if these are the best solutions, but
1.1 In order to compile uppsrc on Mac OS X, Core/Defs.h needs isnan problem solution. I used std::isnan. Sadly, the opened the topic didn't produce the required result to the sources... and I don't have access to the Core.

1.2 As well, to compile ide and plugin/ndisasm snsprintf snsprintf problem needed solution. I used #define _FORTIFY_SOURCE 0 in compiler.h. But maybe the problem "how unsafe are "safe" printf family and vice versa?" should be discussed first? Ideas?
1.3 In the zip I also included a patch which enables opening ide output directory (can't remember should work for all cases using ide/Common?) with Finder. Use of X11/xdg File manager would need optional settings added, but I don't think someone urgently needs/wants xdg on Mac.

2 For users - Minimum requirements for ide and other upp progs to WORK under OSX11:
2.1 Don't use apple-wm for now. You will not see menus. Use openbox or awesome wm (tested).
2.2 if you can't start/compile/link some upp progs, use separate let's say GCC_i386_xxx.bm and GCC_x86_64_xxx.bm and put architecture flags inside them.
2.3 to not overwrite your compiled out dirs, when you compile for different architecture, use ide flags, too. such as "GUI X64 .NOGTK"

----
3 For developers- Considerations and todo:
3.1 ide editor, find, add file to package etc. to recognise *.mm (soon…, ok I am preparing the patches. cos ...)
3.2 i386 x86_64 and out dirs problem. On Mac you can compile for both architectures. I am using different i386 x86_64 upp builders (.bm files) and combining them with flags, because to choose a flag is not enough and to choose a builder is not enough. That's annoying. Should add different .bm to the distribution (easier?) and then CPU architecture flags should be set automatically from builder? or builder flags from building flags? Other ideas?
3.3 more ide settings for min, max, ios etc. SDK version? or again, using separate bm files? 2 x arch x n, estimating above?
3.4 I am quite sure that in the current uppsrc, flag __APPLE__ should replace many of PLATFORM_OSX11, except where X11 is used, Generally, __APPLE__ = (PLATFORM_OSX11 or PLATFORM_COCOA) ? also not forgetting OBJC and maybe NEXT_STEP/GNUSTEP...

P.S. Sorry, Mirek, I have tried to commit ndisasm many times, but... Can you check the problem, please?

Edit: topic name grammar...

[Updated on: Fri, 30 September 2011 23:42]

Report message to a moderator

Re: after rev3936 - Minimum things to compile and/or run ide/uppsrc under OSX11 [message #33961 is a reply to message #33959] Sat, 01 October 2011 04:03 Go to previous messageGo to next message
fudadmin is currently offline  fudadmin
Messages: 1321
Registered: November 2005
Location: Kaunas, Lithuania
Ultimate Contributor
Administrator
for time being, some more fixes for the ide usage of *.mm and *.m files. Who can design icon/icons for objc and/or objc++ files? Smile
Re: after rev3936 - Minimum things to compile and/or run ide/uppsrc under OSX11 [message #33962 is a reply to message #33961] Sat, 01 October 2011 04:27 Go to previous messageGo to next message
fudadmin is currently offline  fudadmin
Messages: 1321
Registered: November 2005
Location: Kaunas, Lithuania
Ultimate Contributor
Administrator
also, in ide/FindInFiles.cpp line 380 should be changed to something like:
	static const char *defs = "*.cpp *.h *.hpp *.c *.m *.C *.M *.cxx *.cc *.mm *.MM *.icpp *.sch *.lay *.rc";
Re: after rev3936 - Minimum things to compile and/or run ide/uppsrc under OSX11 [message #33963 is a reply to message #33962] Sat, 01 October 2011 04:44 Go to previous messageGo to next message
fudadmin is currently offline  fudadmin
Messages: 1321
Registered: November 2005
Location: Kaunas, Lithuania
Ultimate Contributor
Administrator
btw, I have just noticed when FindInFiles is used in the ide, find process is still alive afterwards and eating high cpu power until ide is closed but can't reproduce. Can it happen like this?

[Updated on: Sat, 01 October 2011 12:25]

Report message to a moderator

Re: after rev3936 - Minimum things to compile and/or run ide/uppsrc under OSX11 [message #33971 is a reply to message #33963] Mon, 03 October 2011 15:00 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
fudadmin wrote on Fri, 30 September 2011 22:44

btw, I have just noticed when FindInFiles is used in the ide, find process is still alive afterwards and eating high cpu power until ide is closed but can't reproduce. Can it happen like this?


No, there is no find process. TheIDE is single threaded app and does not invoke any other processes. Basically, when the progress indicator closes, find in files ends..

Mirek
Re: after rev3936 - Minimum things to compile and/or run ide/uppsrc under OSX11 [message #33973 is a reply to message #33971] Mon, 03 October 2011 20:47 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
All pathes have been applied, thank you!

Mirek
Re: after rev3936 - Minimum things to compile and/or run ide/uppsrc under OSX11 [message #33976 is a reply to message #33973] Wed, 05 October 2011 02:15 Go to previous messageGo to next message
fudadmin is currently offline  fudadmin
Messages: 1321
Registered: November 2005
Location: Kaunas, Lithuania
Ultimate Contributor
Administrator
mirek wrote on Mon, 03 October 2011 19:47

All pathes have been applied, thank you!

Mirek


You welcome. But... Rolling Eyes one patch (problem 1.1 at the top of the topic) from the 1st zip:

Index: Defs.h
===================================================================
--- Defs.h	(revision 3933)
+++ Defs.h	(working copy)
@@ -249,6 +249,8 @@
 
 #ifdef PLATFORM_WIN32
 inline bool IsNaN(double d)        { return _isnan(d); }
+#elif __APPLE__
+inline bool IsNaN(double d)        { return std::isnan(d); }
 #else
 inline bool IsNaN(double d)        { return isnan(d); }
 #endif


was left out? Without it one can't compile and use upp on Mac OSX.
Re: after rev3936 - Minimum things to compile and/or run ide/uppsrc under OSX11 [message #34088 is a reply to message #33976] Mon, 17 October 2011 06:06 Go to previous messageGo to next message
fudadmin is currently offline  fudadmin
Messages: 1321
Registered: November 2005
Location: Kaunas, Lithuania
Ultimate Contributor
Administrator
It looks like nobody wants to use u++ on mac os except me and one of my friends... because nobody else is complaining about missing things.

1. Is it possible to fix that "IsNaN" thing mentioned before?
2. If you want to compile AND link dependent upp OBJC packages with theide, line 354 in file ide/Builders/GccBuilder.icpp needs changing to
	if(ToLower(GetFileExt(linkfile[i])) == ".o" || ToLower(GetFileExt(linkfile[i])) == ".a")

3. Why in Upp sources PLATFORM_POSIX includes X11 stuff?
e.g
#ifdef PLATFORM_WIN32
#define GUIPLATFORM_INCLUDE "Win32Gui.h"
#endif

#ifdef PLATFORM_POSIX
#define GUIPLATFORM_INCLUDE "X11Gui.h"
#endif


I am very sure they are completely different things. Even MS Windows "conform in large part to the standards by implementing POSIX support via some sort of compatibility feature, usually translation libraries, or a layer atop the kernel" (from wikipedia).
If you want other technologies from mac world to come into upp, please think wider. Smile think (cocoa...)
index.php?t=getfile&id=3475&private=0
This is an u++ framework icon for XCode...
Re: after rev3936 - Minimum things to compile and/or run ide/uppsrc under OSX11 [message #34122 is a reply to message #34088] Fri, 21 October 2011 09:10 Go to previous messageGo to next message
nixnixnix is currently offline  nixnixnix
Messages: 415
Registered: February 2007
Location: Kelowna, British Columbia
Senior Member
due to popular requests and long overdue:
upp CtrlCore for Cocoa. Don't become too excited because its not much in there but just a lot of my time (It should be call blooddy cocoa, if you can guess what I mean). but i would have been over the moon if I had it one year ago.
from my notes inside the package:

Quote:


install this
Re: after rev3936 - Minimum things to compile and/or run ide/uppsrc under OSX11 [message #34130 is a reply to message #34122] Fri, 21 October 2011 14:55 Go to previous messageGo to next message
fudadmin is currently offline  fudadmin
Messages: 1321
Registered: November 2005
Location: Kaunas, Lithuania
Ultimate Contributor
Administrator
can't imagine - maybe now the most difficult for me
1 month for it? If i can grasp the ideas from the current upp?
Got it working with pure cocoa but to connect it with upp
needs rethinking of the structure of ImageDraw and SystemDraw.
At the moment, I am trying
based on win32 and comparing to X11 but maybe this is a wrong approach.
Also, flipping is a headache...
7.1 test SetSurface and maybe implement those ideas for image? I think it was working correctly
but I messed up and lost test packages after one of my mac crashes.
Maybe to get rid of CG and use only NSImage?
8 draw functions - more to implement eg ellipse poly etc - not very difficult
9 keyboard events -I think I was able to catch them but need to integrate with the whole event loop
and fix some codes (at the moment commented?). OTOH, Using mirek's scan tables maybe we could try
our own keyboard events translation for apple and cocoa (Insert keycode and other missing keycodes
problem on mac?)?
10 mouse events - similar model should apply as for keyboard? not explored
11 drawing/painting events - I think I am able to catch them from NSView correctly?
12 application delegate - used to start cocoa menus - find a way to set it directly to upp Ctrl methods?
13 menus - were more or less working but giving headaches by crashing. I guess, due to native threading
and/or pool management. I removed them for now - should be not difficult.
14 *.app creation from ide - easy but I don't need it until 4.3 is resolved
15 text - I have no idea how difficult
16 timer - I have no idea how difficult



Would be nice to hear from someone

[Updated on: Fri, 21 October 2011 14:55]

Report message to a moderator

Re: after rev3936 - Minimum things to compile and/or run ide/uppsrc under OSX11 [message #34165 is a reply to message #34130] Wed, 26 October 2011 04:59 Go to previous messageGo to next message
nixnixnix is currently offline  nixnixnix
Messages: 415
Registered: February 2007
Location: Kelowna, British Columbia
Senior Member
Hey Aris/fudadmin,

I am taking great interest. I still need to do work that Koldo gave me to bring openWind up to latest UPP (am still using 3211) but I am watching this thread with great interest but my expertise are not good for helping you.

Once you say that there is a version that I can download and use I will buy a refurbushed iMac and be using it within the week.

I suspect you were looking for more helpful feedback than this but I'd just like to continue to cheer you on Smile

Nick

p.s. the previous message from me is not from me - maybe from you or Mirek?



Re: after rev3936 - Minimum things to compile and/or run ide/uppsrc under OSX11 [message #34333 is a reply to message #34088] Mon, 14 November 2011 13:36 Go to previous message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
fudadmin wrote on Mon, 17 October 2011 00:06


1. Is it possible to fix that "IsNaN" thing mentioned before?



Applied.

Quote:


2. If you want to compile AND link dependent upp OBJC packages with theide, line 354 in file ide/Builders/GccBuilder.icpp needs changing to
	if(ToLower(GetFileExt(linkfile[i])) == ".o" || ToLower(GetFileExt(linkfile[i])) == ".a")




Applied.

Quote:


3. Why in Upp sources PLATFORM_POSIX includes X11 stuff?
e.g
#ifdef PLATFORM_WIN32
#define GUIPLATFORM_INCLUDE "Win32Gui.h"
#endif

#ifdef PLATFORM_POSIX
#define GUIPLATFORM_INCLUDE "X11Gui.h"
#endif




Well, hopefully it is not "e.g." anymore, it is the only place. And you have to see it in context, there is #ifndef GUIPLATFORM_INCLUDE around it -> these are just defining default GUI for given platform. Which for POSIX so far is X11...
Previous Topic: Solution howto enable upp Multithreading with TLS on MacOSX.
Next Topic: U++ TheIde compiles and runs on pure Cocoa (video) 85% of U++ port done. 2months+-1 left, ifs...
Goto Forum:
  


Current Time: Thu Mar 28 10:39:39 CET 2024

Total time taken to generate the page: 0.01520 seconds