Opened 13 years ago

Closed 13 years ago

Last modified 13 years ago

#31974 closed submission (fixed)

A new port: OIS v1.3 + Cocoa 64-bit patches

Reported by: marin.saric@… Owned by: ryandesign (Ryan Carsten Schmidt)
Priority: Normal Milestone:
Component: ports Version:
Keywords: Cc:
Port: ois

Description

Hello,

I converted OIS (the Object-Oriented Input System) to MacPorts. The vanilla version of OIS v1.3 in sourceforge is near useless in MacOS X -- it cannot compile on 64-bit. A major user of OIS is OGRE, a very big and very popular 3D graphics library. An OGRE developer submitted a patch to the OIS project enabling OIS to compile on MacOS X under 64-bit.

The patch has been distilled into per-file patches per MacPorts guidelines. I have verified that OIS operates correctly. The provided demo application does not work in 64-bit since it does not implement Cocoa calls, but the library itself works well in both 32-bit and 64-bit.

Attachments (19)

Portfile (2.2 KB) - added by marin.saric@… 13 years ago.
The main OIS Portfile
patch-demos_OISConsole.cpp.diff (520 bytes) - added by marin.saric@… 13 years ago.
patch-includes_mac_CocoaHelpers.h.diff (1.7 KB) - added by marin.saric@… 13 years ago.
patch-includes_mac_CocoaInputManager.h.diff (3.1 KB) - added by marin.saric@… 13 years ago.
patch-includes_mac_CocoaJoyStick.h.diff (2.2 KB) - added by marin.saric@… 13 years ago.
patch-includes_mac_CocoaKeyboard.h.diff (3.8 KB) - added by marin.saric@… 13 years ago.
patch-includes_mac_CocoaMouse.h.diff (2.1 KB) - added by marin.saric@… 13 years ago.
patch-includes_mac_MacHelpers.h.diff (1.0 KB) - added by marin.saric@… 13 years ago.
patch-Mac_XCode-2_2_OIS_xcodeproj_project.pbxproj.diff (19.8 KB) - added by marin.saric@… 13 years ago.
patch-src_mac_CocoaInputManager.mm.diff (5.4 KB) - added by marin.saric@… 13 years ago.
patch-src_mac_CocoaJoystick.mm.diff (10.6 KB) - added by marin.saric@… 13 years ago.
patch-src_mac_CocoaKeyboard.mm.diff (17.3 KB) - added by marin.saric@… 13 years ago.
patch-src_mac_CocoaMouse.mm.diff (11.3 KB) - added by marin.saric@… 13 years ago.
patch-src_mac_MacHelpers.cpp.diff (1.8 KB) - added by marin.saric@… 13 years ago.
patch-src_mac_MacHIDManager.cpp.diff (2.4 KB) - added by marin.saric@… 13 years ago.
patch-src_mac_MacInputManager.cpp.diff (2.0 KB) - added by marin.saric@… 13 years ago.
patch-src_mac_MacKeyboard.cpp.diff (3.7 KB) - added by marin.saric@… 13 years ago.
patch-src_mac_MacMouse.cpp.diff (1.4 KB) - added by marin.saric@… 13 years ago.
patch-src_OISInputManager.cpp.diff (944 bytes) - added by marin.saric@… 13 years ago.

Download all attachments as: .zip

Change History (24)

Changed 13 years ago by marin.saric@…

Attachment: Portfile added

The main OIS Portfile

Changed 13 years ago by marin.saric@…

Changed 13 years ago by marin.saric@…

Changed 13 years ago by marin.saric@…

Changed 13 years ago by marin.saric@…

Changed 13 years ago by marin.saric@…

Changed 13 years ago by marin.saric@…

Changed 13 years ago by marin.saric@…

Changed 13 years ago by marin.saric@…

Changed 13 years ago by marin.saric@…

Changed 13 years ago by marin.saric@…

Changed 13 years ago by marin.saric@…

Changed 13 years ago by marin.saric@…

Changed 13 years ago by marin.saric@…

Changed 13 years ago by marin.saric@…

Changed 13 years ago by marin.saric@…

Changed 13 years ago by marin.saric@…

Changed 13 years ago by marin.saric@…

Changed 13 years ago by marin.saric@…

comment:1 Changed 13 years ago by marin.saric@…

Cc: marin.saric@… added

Cc Me!

comment:2 Changed 13 years ago by mf2k (Frank Schima)

Cc: marin.saric@… removed
Keywords: haspatch removed
Version: 2.0.3

comment:3 Changed 13 years ago by ryandesign (Ryan Carsten Schmidt)

Owner: changed from macports-tickets@… to ryandesign@…
Status: newassigned

Thanks.

As you may know we already have ogre in MacPorts; I guess its use of ois is optional?

Have these patches already been accepted by the developers of ois for inclusion in the next version?

comment:4 Changed 13 years ago by ryandesign (Ryan Carsten Schmidt)

Resolution: fixed
Status: assignedclosed

Committed in r87081 with these changes:

  • expanded tabs to spaces and added modeline
  • removed unnecessary quoting in destroot
  • installed library with 0644 permissions instead of 0640

comment:5 Changed 13 years ago by marin.saric@…

Superthanks for the quick review :)

Here's the current hairy situation:

OIS is not referenced even once in the OgreMain or Plugins, the actual OGRE library code. However, it's used all over the place in the OGRE Sample code, which won't build at all if OIS is not present.

So the current OGRE port in MacPorts does not build the sample code. There's a ton of OGRE tutorials based on the sample code and/or OIS, so it is somewhat of a problem if it's not present in MacPorts.

The current pre-packaged pre-compiled OGRE v1.7.3 for MacOS X ships with a binary-only libOIS.a that apparently has the above-mentioned patches applied to it. The patches are currently under review for OIS. They are less than perfect, for example, they don't really work for fullscreen, but other than that the sample code runs clean and fast... Without the patches OIS can't run under x86_64, hence OGRE Samples can't run under x86_64..

I am fixing up the OGRE port, and getting OIS running was sort of a must-have to test OGRE out with the Sample code.

Note: See TracTickets for help on using tickets.