Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Albert Gräf
Gem
Commits
3dd729f6
Commit
3dd729f6
authored
Dec 17, 2018
by
IOhannes m zmölnig
Browse files
Merge branch 'master' of xenakis.iemnet:src/GIT/Gem
parents
780deaef
cfa917b0
Changes
5
Hide whitespace changes
Inline
Side-by-side
devgem.sh.in
View file @
3dd729f6
...
...
@@ -2,8 +2,19 @@
## simple script to run Gem from the build
## PD binary can be overriden by setting the PD environment
PD
=
${
PD
:-
$(
which pd
)
}
## Pd binary can be overriden by setting the PD environment
if
[
"x
${
PD
}
"
=
"x"
]
;
then
PD
=
@PD_EXE@
if
[
"x
${
PD
#@
}
"
!=
"x
${
PD
}
"
]
;
then
PD
=
""
fi
fi
if
[
"x
${
PD
}
"
=
"x"
]
;
then
PD
=
pd
fi
## provide replacement for realpath
which
realpath
>
/dev/null 2>&1
||
realpath
()
{
[
"x
${
1
#/
}
"
!=
"x
$1
"
]
&&
echo
"
$1
"
||
echo
"
$PWD
/
${
1
#.
}
"
;
}
## search abstractions (both static ones and built ones)
srcdir
=
$(
realpath
@abs_top_srcdir@
)
...
...
m4/gem.m4
View file @
3dd729f6
...
...
@@ -526,10 +526,12 @@ AC_ARG_WITH([pd],
AS_IF([ test "x${with_pd}" = "x" ],[
AS_CASE([$host_os],
[*-darwin*], [
AS_IF([ test -d "/Applications/Pd.app/Contents/Resources" ], [ with_pd="/Applications/Pd.app/Contents/Resources" ])
# get the latest and greatest Pd installed in /Applications
with_pd_=$(ls -S /Applications/Pd*.app/Contents/Resources/bin/pd 2>/dev/null | sort | tail -1 | sed "s/\/bin\/pd$//")
AS_IF([ test -d "${with_pd_}" ], [ with_pd="${with_pd_}" ])
],
[*mingw* | *cygwin*], [
AS_IF([ test -d "${PROGRAMFILES}/pd" ], [ with_pd="${PROGRAMFILES}/pd" ])
dnl
AS_IF([ test -d "${PROGRAMFILES}/pd" ], [ with_pd="${PROGRAMFILES}/pd" ])
],)])
AS_IF([ test "x${with_pd}" = "x" || test "x${with_pd}" = "yes" ], [
...
...
@@ -542,6 +544,7 @@ AS_IF([ test "x${with_pd}" = "x" || test "x${with_pd}" = "yes" ], [
])
AS_IF([ test -d "$with_pd" ],[
with_pd=$(echo $with_pd | sed -e 's/\/*$//' -e 's/\/\/*/\//g')
AC_MSG_CHECKING([include paths for Pd])
if test -d "${with_pd}/src" ; then
AC_MSG_RESULT([${with_pd}/src])
...
...
@@ -597,6 +600,13 @@ AC_CHECK_HEADERS([m_imp.h], [], [],
#endif
])
WHICH=$(which which)
AC_MSG_CHECKING([Pd executable])
PD_EXE=$(PATH=${with_pd}/bin:${with_pd}/src:${with_pd} ${WHICH} pd.com pd 2>/dev/null | head -1)
AC_MSG_RESULT([${PD_EXE}])
AC_SUBST([PD_EXE])
### this should only be set if Pd has been found
# the extension
AC_ARG_WITH([extension],
...
...
src/Output/Makefile.am
View file @
3dd729f6
...
...
@@ -9,7 +9,6 @@ include ../check-sources.mk
pkglib_LTLIBRARIES
=
#if HAVE_COCOA
if
MACOSX
pkglib_LTLIBRARIES
+=
gemcocoawindow.la
pkglib_LTLIBRARIES
+=
gemmacoswindow.la
...
...
src/Output/gemmacoswindow.mm
View file @
3dd729f6
...
...
@@ -25,6 +25,61 @@
#include <AvailabilityMacros.h>
#ifndef GEM_NSEVENT_LEGACY
# if defined (MAC_OS_X_VERSION_10_12) && MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_12
# else
# define GEM_NSEVENT_LEGACY
# endif
#endif
#ifndef GEM_NSEVENT_LEGACY
# if defined __i386__
# define GEM_NSEVENT_LEGACY
# endif
#endif
#if defined GEM_NSEVENT_LEGACY
# define NSEventMaskAny NSAnyEventMask
# define NSEventTypeLeftMouseUp NSLeftMouseUp
# define NSEventTypeRightMouseUp NSRightMouseUp
# define NSEventTypeOtherMouseUp NSOtherMouseUp
# define NSEventTypeLeftMouseDown NSLeftMouseDown
# define NSEventTypeRightMouseDown NSRightMouseDown
# define NSEventTypeOtherMouseDown NSOtherMouseDown
# define NSEventTypeMouseMoved NSMouseMoved
# define NSEventTypeLeftMouseDragged NSLeftMouseDragged
# define NSEventTypeRightMouseDragged NSRightMouseDragged
# define NSEventTypeOtherMouseDragged NSOtherMouseDragged
# define NSEventTypeMouseEntered NSMouseEntered
# define NSEventTypeMouseExited NSMouseExited
# define NSEventTypeScrollWheel NSScrollWheel
# define NSEventTypeKeyDown NSKeyDown
# define NSEventTypeKeyUp NSKeyUp
# define NSEventTypeTabletPoint NSTabletPoint
# define NSEventTypeTabletProximity NSTabletProximity
# define NSEventTypeFlagsChanged NSFlagsChanged
# define NSEventModifierFlagCapsLock NSAlphaShiftKeyMask
# define NSEventModifierFlagOption NSAlternateKeyMask
# define NSEventModifierFlagCommand NSCommandKeyMask
# define NSEventModifierFlagControl NSControlKeyMask
# define NSEventModifierFlagFunction NSFunctionKeyMask
# define NSEventModifierFlagNumericPad NSNumericPadKeyMask
# define NSEventModifierFlagShift NSShiftKeyMask
# define NSEventModifierFlagHelp NSHelpKeyMask
# define NSWindowStyleMaskTitled NSTitledWindowMask
# define NSWindowStyleMaskClosable NSClosableWindowMask
# define NSWindowStyleMaskResizable NSResizableWindowMask
# define NSWindowStyleMaskUnifiedTitleAndToolbar NSUnifiedTitleAndToolbarWindowMask
# define NSWindowStyleMaskMiniaturizable NSMiniaturizableWindowMask
# define NSWindowStyleMaskBorderless NSBorderlessWindowMask
#endif
#if defined (MAC_OS_X_VERSION_10_10) && MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_10
#warning openGL context sharing
...
...
src/Output/gemmacwindow.cpp
View file @
3dd729f6
...
...
@@ -14,7 +14,20 @@
//
/////////////////////////////////////////////////////////
#if defined __APPLE__ && !defined __x86_64
#if !defined DISABLE_GEMMACWINDOW
# if !defined __x86_64
# define DISABLE_GEMMACWINDOW
# endif
#endif
#include <AvailabilityMacros.h>
#if !defined DISABLE_GEMMACWINDOW
# if defined (MAC_OS_X_VERSION_10_7) && MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_7
# define DISABLE_GEMMACWINDOW
# endif
#endif
#if !defined DISABLE_GEMMACWINDOW
#include "Gem/GemGL.h"
#include <Carbon/Carbon.h>
#include <QuickTime/QuickTime.h>
...
...
@@ -317,7 +330,7 @@ OSStatus BuildGLFromWindow (WindowPtr pWindow, AGLContext* paglContext,
reinterpret_cast
<
Ptr
>
(
aglChoosePixelFormat
))
{
// check for existence of OpenGL
verbose
(
2
,
"MAC: BuildGLonWindow: OpenGL not installed"
);
return
NULL
;
return
0
;
}
// we successfully passed the renderer check
...
...
@@ -335,7 +348,7 @@ OSStatus BuildGLFromWindow (WindowPtr pWindow, AGLContext* paglContext,
aglReportError
();
if
(
NULL
==
pcontextInfo
->
fmt
)
{
verbose
(
2
,
"MAC: BuildGLonWindow: Could not find valid pixel format"
);
return
NULL
;
return
0
;
}
*
paglContext
=
aglCreateContext
(
pcontextInfo
->
fmt
,
...
...
@@ -349,7 +362,7 @@ OSStatus BuildGLFromWindow (WindowPtr pWindow, AGLContext* paglContext,
aglReportError
();
if
(
NULL
==
*
paglContext
)
{
verbose
(
2
,
"MAC: BuildGLonWindow: Unable to create AGL context"
);
return
NULL
;
return
0
;
}
if
(
!
aglSetDrawable
(
*
paglContext
,
...
...
@@ -948,7 +961,7 @@ short FindGDHandleFromWindow (WindowPtr pWindow,
GDHandle
hgdNthDevice
;
if
(
!
pWindow
||
!
phgdOnThisDevice
)
{
return
NULL
;
return
0
;
}
*
phgdOnThisDevice
=
NULL
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment