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 » Need help with the structure of flags etc. and running u++ cocoa on Windows 7 GNUSTEP
Need help with the structure of flags etc. and running u++ cocoa on Windows 7 GNUSTEP [message #35681] Mon, 12 March 2012 18:18 Go to next message
fudadmin is currently offline  fudadmin
Messages: 1321
Registered: November 2005
Location: Kaunas, Lithuania
Ultimate Contributor
Administrator
index.php?t=getfile&id=3670&private=0

Sorry for the screenshot.

Maybe those should be separate topics? But for now...
In order to attract more people into upp-cocoa who doesn't have macs I have been developing upp-cocoa also on MS Windows.

I constantly struggling which flags should I change and how to name them because, I can only guess the whole future picture of the u++ flag system.
Can someone outline structure of the u++ compiling flags?
Or is there one?
Something like:
1 Kernel or OS (like in google chrome end other places):
1.1 OS_WINDOWS
1.2 OS_LINUX
1.3 OS_BSB
(I am still using PLATFORM_COCOA but it is not correct. see below)

2 peripherals middleware?
Keyboard? for cocoa I need
WINDOWS_KEYBOARD
APPLE_KEYBOARD
LINUX_BSD_KEYBOARD

.... something in between for draw?

then GUI_BACKENDS
dont forget GUI_XCB!

eg cygwin - OS_WINDOWS - WINDOWS_KEYBOARD - GUI_X11
cocoa OS_WINDOWS - WINDOWS_KEYBOARD - GUI_COCOA

but some cocoa is used if GUI_OPENGL? so it would be logical to
have MIDDLE_COCOA ?
then inside I am using GNU_STEP
or simply __APPLE__

or what?


So, what better prefix would be instead of MIDDLE_..
The prefixes OS_.. GUI_.. are clear. Imagine a table? or is there one for u++?

help... Smile

But, I am sorry, IMO, PLATFORM_POSIX meaning is too wide and confusing..

Other ideas?

P.S I want to harmonize and clean at least those 2 sets of uppsrc on my mac and windows to be ready to post or commit somewhere ...

Re: Need help with the structure of flags etc. and running u++ cocoa on Windows 7 GNUSTEP [message #35689 is a reply to message #35681] Tue, 13 March 2012 08:11 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
fudadmin wrote on Mon, 12 March 2012 13:18


But, I am sorry, IMO, PLATFORM_POSIX meaning is too wide and confusing..



Why confusing? The sole purpose is to identify API for conditional compilation. POSIX represents a pretty wide but guaranteed set of API calls, which is different from Win32 API.

Surely, PLATFORM_LINUX or PLATFORM_BSD are narrower subsets, but it is definitely worth to have superset, as most things are the same.

Mirek
Re: Need help with the structure of flags etc. and running u++ cocoa on Windows 7 GNUSTEP [message #35690 is a reply to message #35681] Tue, 13 March 2012 10:29 Go to previous messageGo to next message
Tom1
Messages: 1212
Registered: March 2007
Senior Contributor
Hi Aris,

Thanks for bringing to my knowledge the alternative test platform - GNUstep. I just downloaded+installed the parts (MSYS system, core and devel) for windows. I may be a bit ahead of schedule with this, but: Once you get your work uploaded, could you please post a (hopefully short Smile step-by-step guide how to get it up and running on GNUstep.

--

I don't know the big picture, so don't take me too seriously, but I think OpenGL is always used in companion with something else, like GDI, X11 or Cocoa in this case. So, maybe GUI_OPENGL should not exist as an alternative to GUI_X11, etc. but instead as a kind of add-on to them.

Best regards,

Tom
Re: Need help with the structure of flags etc. and running u++ cocoa on Windows 7 GNUSTEP [message #35693 is a reply to message #35690] Tue, 13 March 2012 18:43 Go to previous messageGo to next message
fudadmin is currently offline  fudadmin
Messages: 1321
Registered: November 2005
Location: Kaunas, Lithuania
Ultimate Contributor
Administrator
Tom1 wrote on Tue, 13 March 2012 09:29



Thanks for bringing to my knowledge the alternative test platform - GNUstep. I just downloaded+installed the parts (MSYS system, core and devel) for windows. I may be a bit ahead of schedule with this, but: Once you get your work uploaded, could you please post a (hopefully short Smile step-by-step guide how to get it up and running on GNUstep.




Great! Thanks Tom for your interest! You are not much ahead of schedule.. Maybe only one day Smile At the moment for upp-cocoa I use 2 packages: UNS and SkeletonCoc.
So the first rough steps:
1. install gnustep. - You did it (hopefully correctly Wink )
2. I should have UNS for testing on gnustep and mac to be ready in a few hours zipped somewhere here.
3. I will post a version if of theide for windows gnustep.
4. You will try to compile some tests and if any errors I will tell you what to change in Core.

Re: Need help with the structure of flags etc. and running u++ cocoa on Windows 7 GNUSTEP [message #35694 is a reply to message #35689] Tue, 13 March 2012 18:56 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 Tue, 13 March 2012 07:11

fudadmin wrote on Mon, 12 March 2012 13:18


But, I am sorry, IMO, PLATFORM_POSIX meaning is too wide and confusing..



Why confusing? The sole purpose is to identify API for conditional compilation. POSIX represents a pretty wide but guaranteed set of API calls, which is different from Win32 API.

Surely, PLATFORM_LINUX or PLATFORM_BSD are narrower subsets, but it is definitely worth to have superset, as most things are the same.

Mirek



ok, thanks. I will try to adjust them as little as possible to be fit for purpose. And then you adjust... Smile
Re: Need help with the structure of flags etc. and running u++ cocoa on Windows 7 GNUSTEP [message #35704 is a reply to message #35693] Wed, 14 March 2012 03:06 Go to previous messageGo to next message
fudadmin is currently offline  fudadmin
Messages: 1321
Registered: November 2005
Location: Kaunas, Lithuania
Ultimate Contributor
Administrator
fudadmin wrote on Tue, 13 March 2012 17:43


2. I should have UNS for testing on gnustep and mac to be ready in a few hours zipped somewhere here.



Tom, I have posted the new UNS. Check another topic. (what the hell happened to forum settings? Where the nice addresses disappeared?)

Try to build with the existing windows theide but you might need to copy ide.exe somewhere inside gnustep dir and also create uppsrc nests inside gnustep and run ide and/or (in order to) run built products from there. sorrry, I can't remember environment variables etc and I dont have windows pc tonight.

You will need to have active LIBRARIES (in project settings) depending on flags
 objc  gnustep-base  gnustep-gui  ffi m   libstdc++

(but they are in UNS)
Re: Need help with the structure of flags etc. and running u++ cocoa on Windows 7 GNUSTEP [message #35716 is a reply to message #35704] Wed, 14 March 2012 13:49 Go to previous messageGo to next message
fudadmin is currently offline  fudadmin
Messages: 1321
Registered: November 2005
Location: Kaunas, Lithuania
Ultimate Contributor
Administrator
check MINGW.bm

BUILDER = "GCC";
COMPILER = "g++";
DEBUG_INFO = "2";
DEBUG_BLITZ = "1";
DEBUG_LINKMODE = "1";
DEBUG_OPTIONS = "-O0 -gstabs -pipe -fvisibility=hidden -Wno-trigraphs";
DEBUG_FLAGS = "";
DEBUG_LINK = "";
RELEASE_BLITZ = "1";
RELEASE_LINKMODE = "1";
RELEASE_OPTIONS = "-O3 -ffunction-sections";
RELEASE_SIZE_OPTIONS = "-Os -finline-limit=20 -ffunction-sections";
RELEASE_FLAGS = "";
RELEASE_LINK = "";
DEBUGGER = "gdb";
PATH = "C:\\MinGW\\bin";
INCLUDE = "C:\\MinGW\\include;C:\\GNUstep\\GNUstep\\System\\Library\\Headers";
LIB = "C:\\MinGW\\lib;C:\\GNUstep\\GNUstep\\System\\Library\\Libraries";
REMOTE_HOST = "";
REMOTE_OS = "";
REMOTE_TRANSFER = "";
REMOTE_MAP = "";
LINKMODE_LOCK = "0";


Edit: for some reasons forum doesn't allow to upload ide.zip
but try to put your mingw.bm and your version somewhere:
C:\GNUstep\msys\1.0\home\arilect\upp

[Updated on: Wed, 14 March 2012 14:07]

Report message to a moderator

Re: Need help with the structure of flags etc. and running u++ cocoa on Windows 7 GNUSTEP [message #35717 is a reply to message #35716] Wed, 14 March 2012 14:13 Go to previous messageGo to next message
fudadmin is currently offline  fudadmin
Messages: 1321
Registered: November 2005
Location: Kaunas, Lithuania
Ultimate Contributor
Administrator
try to compile your own ide with this file
Edit: Atttention! the changes in this file might not help linking gnustep stuff with MINGW ... I will post updates later.

[Updated on: Thu, 15 March 2012 01:59]

Report message to a moderator

Re: Need help with the structure of flags etc. and running u++ cocoa on Windows 7 GNUSTEP [message #35718 is a reply to message #35717] Wed, 14 March 2012 14:18 Go to previous messageGo to next message
fudadmin is currently offline  fudadmin
Messages: 1321
Registered: November 2005
Location: Kaunas, Lithuania
Ultimate Contributor
Administrator
try to change part of Core/config.h
	#define COMPILER_GCC 1
	

	#if __WIN32
		#define COMPILER_MINGW
		#define OS_WINDOWS
		#define PLATFORM_WIN32	
	#endif

	#ifdef __OBJC__
	#include <objc/objc.h>
	#endif

		#if flagCOCOA
			#define PLATFORM_COCOA
			#define GUI_COCOA 1
		#endif
		#if flagX11
			#define GUI_X11 1  //aris002 for cygwin?	
		#endif

#if flagGUI_WIN
	#define GUI_WIN
#endif

	#if __unix || __unix__ || __APPLE__
		#define PLATFORM_POSIX 1
	


Edit: actually I changed everything in Core from PLATFORM_WIN32 to OS_WINDOWS and then have been trying to adjust other parts but at the start you don't need.

Please post your errors.

[Updated on: Wed, 14 March 2012 14:27]

Report message to a moderator

Re: Need help with the structure of flags etc. and running u++ cocoa on Windows 7 GNUSTEP [message #35720 is a reply to message #35718] Wed, 14 March 2012 14:49 Go to previous messageGo to next message
Tom1
Messages: 1212
Registered: March 2007
Senior Contributor
Hi Aris,

Your feeding instructions at a rate well beyond my internal clock, but I'm catching up eventually. So, I have applied changes to MINGW.bm, config.h and now finally merged your GccBuilder.icpp. However, this last change caused inability to build theide:

----- ide/Builders ( GUI SVO_VALUE GCC WIN32 ) (5 / 35)
GccBuilder.icpp
...
There were errors. (0:01.27)


How to proceed?

Best regards,

Tom

Edit by fudadmin: deleted the log to keep the forums cleaner Smile.

[Updated on: Thu, 15 March 2012 06:14] by Moderator

Report message to a moderator

Re: Need help with the structure of flags etc. and running u++ cocoa on Windows 7 GNUSTEP [message #35721 is a reply to message #35720] Wed, 14 March 2012 14:58 Go to previous messageGo to next message
fudadmin is currently offline  fudadmin
Messages: 1321
Registered: November 2005
Location: Kaunas, Lithuania
Ultimate Contributor
Administrator
my uppsrc version is not merged with the latest updates. try to compare gccbuilder.icpp and apply my changes intelligently... Smile
Re: Need help with the structure of flags etc. and running u++ cocoa on Windows 7 GNUSTEP [message #35722 is a reply to message #35721] Wed, 14 March 2012 15:21 Go to previous messageGo to next message
Tom1
Messages: 1212
Registered: March 2007
Senior Contributor
OK, now you may determine how 'intelligent' I was... (The revised file is attached.) This one compiled into a supposedly working ide.exe.

However, the same compilation errors seem to still exist when compiling UNS package.

You were referring to flags in one of your posts. You mean Main package configuration flags / or not? I have nothing there yet. Should I?

// Tom
Re: Need help with the structure of flags etc. and running u++ cocoa on Windows 7 GNUSTEP [message #35723 is a reply to message #35722] Wed, 14 March 2012 15:26 Go to previous messageGo to next message
fudadmin is currently offline  fudadmin
Messages: 1321
Registered: November 2005
Location: Kaunas, Lithuania
Ultimate Contributor
Administrator
Tom1 wrote on Wed, 14 March 2012 14:21

OK, now you may determine how 'intelligent' I was... (The revised file is attached.) This one compiled into a supposedly working ide.exe.

However, the same compilation errors seem to still exist when compiling UNS package.

You were referring to flags in one of your posts. You mean Main package configuration flags / or not? I have nothing there yet. Should I?

// Tom


Have you applied the changes to the Core/config.h?

What flags have you got in test package?
Re: Need help with the structure of flags etc. and running u++ cocoa on Windows 7 GNUSTEP [message #35724 is a reply to message #35723] Wed, 14 March 2012 15:30 Go to previous messageGo to next message
Tom1
Messages: 1212
Registered: March 2007
Senior Contributor
config.h was already applied earlier.

Currently no flags. I tried with GUI and GUI SKELETON COCOA without effect.

// Tom
Re: Need help with the structure of flags etc. and running u++ cocoa on Windows 7 GNUSTEP [message #35725 is a reply to message #35723] Wed, 14 March 2012 15:34 Go to previous messageGo to next message
fudadmin is currently offline  fudadmin
Messages: 1321
Registered: November 2005
Location: Kaunas, Lithuania
Ultimate Contributor
Administrator

but flags in your testing should be something like
GUI USEMALLOC COCOA .NOGTK TEST_UNS

.NOGTK - may not needed Smile (I switched to mac...)
Re: Need help with the structure of flags etc. and running u++ cocoa on Windows 7 GNUSTEP [message #35726 is a reply to message #35725] Wed, 14 March 2012 15:38 Go to previous messageGo to next message
fudadmin is currently offline  fudadmin
Messages: 1321
Registered: November 2005
Location: Kaunas, Lithuania
Ultimate Contributor
Administrator
After applying flags from above please post the first few errors.
Re: Need help with the structure of flags etc. and running u++ cocoa on Windows 7 GNUSTEP [message #35727 is a reply to message #35726] Wed, 14 March 2012 15:43 Go to previous messageGo to next message
Tom1
Messages: 1212
Registered: March 2007
Senior Contributor
Tried with and without .NOGTK -- no apparent difference. Then tried to add SVO_VALUE, but that did not have effect either.

Here are the first lines of plenty more...

----- UNS ( GUI USEMALLOC COCOA TEST_UNS SVO_VALUE GCC SHARED WIN32 ) (1 / 7)
UNSUtils.mm
UNSApplication.mm
UNSApplicationDelegate.mm
UNSImage.mm
UNSView.mm
In file included from C:\GNUstep\msys\1.0\home\tom\upp\uppsrc/Core/Core.h:251:0,
                 from C:\GNUstep\msys\1.0\home\tom\upp\uppsrc/Draw/Draw.h:6,
                 from C:\GNUstep\msys\1.0\home\tom\upp\uppsrc/RichText/RichText.h:4,
                 from C:\GNUstep\msys\1.0\home\tom\upp\uppsrc\UNS\/UNS.h:11,
                 from C:\GNUstep\msys\1.0\home\tom\upp\uppsrc\UNS\UNSApplication.mm:2:
C:\GNUstep\msys\1.0\home\tom\upp\uppsrc/Core/ValueUtil.h: In constructor 'Upp::Id::Id(const Upp::String&)':
C:\GNUstep\msys\1.0\home\tom\upp\uppsrc/Core/ValueUtil.h:80:52: error: expected unqualified-id before '=' token
C:\GNUstep\msys\1.0\home\tom\upp\uppsrc/Core/ValueUtil.h: In constructor 'Upp::Id::Id(const char*)':
C:\GNUstep\msys\1.0\home\tom\upp\uppsrc/Core/ValueUtil.h:81:52: error: expected unqualified-id before '=' token
In file included from C:\GNUstep\GNUstep\System\Library\Headers/Foundation/NSObject.h:30:0,
                 from C:\GNUstep\GNUstep\System\Library\Headers/Foundation/FoundationErrors.h:29,
                 from C:\GNUstep\GNUstep\System\Library\Headers/Foundation/Foundation.h:33,
                 from C:\GNUstep\GNUstep\System\Library\Headers/Cocoa/Cocoa.h:33,
                 from C:\GNUstep\msys\1.0\home\tom\upp\uppsrc\UNS\/UNS.h:29,
                 from C:\GNUstep\msys\1.0\home\tom\upp\uppsrc\UNS\UNSApplication.mm:2:
C:\GNUstep\GNUstep\System\Library\Headers/Foundation/NSObjCRuntime.h: At global scope:
C:\GNUstep\GNUstep\System\Library\Headers/Foundation/NSObjCRuntime.h:147:20: error: 'INTPTR_MAX' was not declared in this scope
In file included from C:\GNUstep\GNUstep\System\Library\Headers/Foundation/Foundation.h:68:0,
                 from C:\GNUstep\GNUstep\System\Library\Headers/Cocoa/Cocoa.h:33,
                 from C:\GNUstep\msys\1.0\home\tom\upp\uppsrc\UNS\/UNS.h:29,
                 from C:\GNUstep\msys\1.0\home\tom\upp\uppsrc\UNS\UNSApplication.mm:2:
C:\GNUstep\GNUstep\System\Library\Headers/Foundation/NSFileManager.h:190:8: warning:
 'NSDirectoryEnumerator' has a field 'NSDirectoryEnumerator::_flags' whose type uses the anonymous namespace [enabled by defaul
	t]
In file included from C:\GNUstep\GNUstep\System\Library\Headers/AppKit/AppKit.h:93:0,
                 from C:\GNUstep\GNUstep\System\Library\Headers/Cocoa/Cocoa.h:34,
                 from C:\GNUstep\msys\1.0\home\tom\upp\uppsrc\UNS\/UNS.h:29,
                 from C:\GNUstep\msys\1.0\home\tom\upp\uppsrc\UNS\UNSApplication.mm:2:
C:\GNUstep\GNUstep\System\Library\Headers/AppKit/NSDataLink.h:150:25: error:
 previous declaration of 'NSString* NSDataLinkPboardType' with 'C++' linkage
C:\GNUstep\GNUstep\System\Library\Headers/AppKit/NSPasteboard.h:109:25: error: 
conflicts with new declaration with 'C' linkage
In file included from C:\GNUstep\GNUstep\System\Library\Headers/AppKit/AppKit.h:159:0,


// Tom

[Updated on: Thu, 15 March 2012 06:16] by Moderator

Report message to a moderator

Re: Need help with the structure of flags etc. and running u++ cocoa on Windows 7 GNUSTEP [message #35728 is a reply to message #35727] Wed, 14 March 2012 16:07 Go to previous messageGo to next message
fudadmin is currently offline  fudadmin
Messages: 1321
Registered: November 2005
Location: Kaunas, Lithuania
Ultimate Contributor
Administrator
My uppsrc is something 6 months old. Damn, it looks like I do not have Core/ValueUtil.h and I will need to merge. It might take some time. Id, I think, might be used in Cocoa Foundation, to... But, for now, try without SVO_VALUE and post errors.
Re: Need help with the structure of flags etc. and running u++ cocoa on Windows 7 GNUSTEP [message #35729 is a reply to message #35728] Wed, 14 March 2012 16:18 Go to previous messageGo to next message
Tom1
Messages: 1212
Registered: March 2007
Senior Contributor
Hi,

Please find attached the compiler errors...

I'll leave the office now. Will return to morrow.

// Tom
Re: Need help with the structure of flags etc. and running u++ cocoa on Windows 7 GNUSTEP [message #35730 is a reply to message #35729] Wed, 14 March 2012 16:21 Go to previous messageGo to previous message
fudadmin is currently offline  fudadmin
Messages: 1321
Registered: November 2005
Location: Kaunas, Lithuania
Ultimate Contributor
Administrator
you can try my Core and help to merge... Smile. Leaving? Ok. see you later. thanks for trying.

Edit: Core.zip removed. see posts below.

[Updated on: Thu, 15 March 2012 06:10]

Report message to a moderator

Previous Topic: upp-cocoa CtrlCore skeleton package to play
Next Topic: some cocoa with OpenGL in upp sandbox! (UNS, UNSCtrl , UNStest)
Goto Forum:
  


Current Time: Thu Mar 28 09:42:38 CET 2024

Total time taken to generate the page: 0.01613 seconds