Commit Graph

238 Commits

Author SHA1 Message Date
Soren Jorvang 2d3b9860f7 Produce usable global+destdir tarballs with pathnames relative to / .
This is a bit hacky as SCons' built-in tar handling basically makes
this impossible. I should just write a "relative path" tarball Builder.


git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5967 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-07-24 23:09:43 +00:00
Soren Jorvang f99a36ccfa Some refinements to (r5955+r5962+r5964):
Don't rely on trailing /'s in directory names.

Destdir only works for global builds.

Only tar up global builds if they are in a destdir to
avoid SCons eating all available memory indexing /usr.

Print current status of shared_foo in 'scons -h'.


git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5966 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-07-24 17:39:17 +00:00
Glenn Rice bd3f837ebf Fix scons stuff broken in revision 5962. The prefix must be conditional on whether the build is global or local. Help should be shown after tests are performed so that the actual values reported are not just an echo of the default values. The bundle is separate from the destdir option.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5964 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-07-24 14:21:05 +00:00
Soren Jorvang d906dcee27 More SConstruct cleanup.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5962 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-07-24 13:10:54 +00:00
Soren Jorvang 53f5bc682d Make Cg conditional on those platforms for which it is available.
Of course, this doesn't do much good without another shader compiler..

WIP of OS X application bundle building.


git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5961 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-07-24 10:24:16 +00:00
Soren Jorvang 949b873dc8 Further *BSD portability.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5958 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-07-23 23:51:34 +00:00
Soren Jorvang 4000df2c66 Simplify SConstruct.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5955 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-07-23 23:16:28 +00:00
snzgoo 919ccb469a Merging Externals/WiiUse/Src and Externals/WiiUseSrc as requested.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5952 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-07-23 18:19:38 +00:00
Soren Jorvang 83883cee45 Port to *BSD. It runs but isn't terribly useful without Cg.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5934 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-07-22 03:29:35 +00:00
Soren Jorvang 16c765dc9c Merge-o.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5925 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-07-20 04:57:04 +00:00
Soren Jorvang 4ffea2c8b9 Less confused about absolute/relative/symbolic pathnames now.
Fixes Linux global build.


git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5924 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-07-20 04:50:43 +00:00
Glenn Rice 8c7bdebf1e Fix the global build on linux.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5923 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-07-20 04:19:25 +00:00
Soren Jorvang 6813a75ab2 Some pathnames are used both by SCons and cpp which can be a bit tricky.
Should revisit and make the distinction more explicit.

Put the Data and Sys directories under Resources in the OS X app bundle.

Construct config.h (now lower-case to avoid confusion with other Config.h
instances in the tree) in the root. One tiny step towards a read-only
and cross-buildable source tree.

Some minor bits of non-Linux Unix portability.


git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5921 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-07-20 02:45:31 +00:00
Soren Jorvang a2b1f829cb Get rid of a number of unnecessary env.Clones.
Use SCons' convenient # shorthand for the root of our tree.
 
Also various minor cleanup of SConscripts.


git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5915 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-07-19 03:42:37 +00:00
Soren Jorvang faf586e8f1 Because we only ever call Pos_ReadDirect (and through that, DataRead<T>)
from JIT generated code, the compiler may not get the heads-up to properly
prepare for run-time instantiation of those template functions.

Explicitly instantiating Pos_ReadDirect gets around that issue.

Also force DataRead* inline as gcc didn't always do that itself when the
DataRead functions in turn were called from (other) template functions.

I am far from a C++ language lawyer, so I cannot speak learnedly about the
correctness of this solution, but it works.

Dolphin.app built on OS X 10.6 now actually works on 10.5 as well.


git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5901 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-07-18 05:31:51 +00:00
Soren Jorvang 3e383aa8eb Maintaining Leopard binary compatibility turns out be a a bit cumbersome.
For a typical OS X app, one only needs to specify the SDK version and the
target OS version range.

Because we use OpenCL which is new in 10.6, however, we must be somewhat
more verbose in order to make use of the forward compatibility facilities.

Unfortunately, the critical bit that is required to have binaries built
on 10.6 work on 10.5, namely disabling the new compact __LINKEDIT format,
causes stack alignment crashes at emulation time on 10.6, so for now
Leopard users still have to build Dolphin themselves.

Hopefully, this stack alignment problem will turn out to be coincident
with lingering alignment issues.

Include the OS X version of the Cg framework in Externals as with the
Windows one. The header files appear to be the same in the Windows and the
OS X builds of the February 2.2 Cg toolkit, although they are differently
munged by what appears to be some automatic process, so no new duplicates.

Any upgrades to the Cg libraries will of course need to be done in sync.

I do hope that Sonicadvance1's GLSL work will enable us to get rid of Cg.


git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5893 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-07-17 19:43:26 +00:00
Soren Jorvang 61bd545f80 A little iterator bug and a compiler warning in the OpenGL code.
Use -fvisibility-inlines-hidden on OS X as well.


git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5875 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-07-12 20:11:19 +00:00
Soren Jorvang addb89fecc Allow full-length Unix pathnames.
Move bits of HAVE_OPENCL/HAVE_WX for OS X from SConstruct to header files.

Use /usr/lib/libz on OS X now that we no longer have -L/opt/local/lib in
the library path. It is still possible that we could pick up a libz in
/usr/local/lib that would make the application non-redistributable, but
the danger is much less than previously.

Also bits of minor portability cleanup.


git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5868 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-07-10 21:17:08 +00:00
Soren Jorvang 2bcdf4f5a4 Remove NSAutoreleasePools that are no longer necessary now that pools
are properly declared at thread entry/exit. I am leaving the ones in
Wiiuse while there's still a small hope that it may be used outside of
Dolphin, though.

Move the fixed MAP_32BIT definition for OS X to Common.h.

UDPNunchuk.cpp was deleted, so update the scons build.


git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5864 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-07-09 22:31:04 +00:00
Soren Jorvang 0284a7a1df Some more attempts at cleaning up the scons build and more clearly
identifying which options and parameters go with which platforms etc.

OS X, like Windows, now no longer uses Config.h. Configure() is still
used for the wx-config parameters, but that is a temporary measure.

Globals.cpp has never been used.


git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5860 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-07-09 01:26:53 +00:00
Soren Jorvang 543bb3ae4c Glenn's iconv code seems to work fine on OS X.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5858 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-07-08 17:59:56 +00:00
Soren Jorvang d18085c3ad Don't bother using autoconfiguration to find the OpenCL and Cg
frameworks on OS X.

Try to be a little clearer about which configuration options apply    
to which platform(s). Should pave the way slightly for win32 scons. 
 
We have accidentally been using LUA_USE_LINUX on OS X all along.
Turns out that LUA_USE_MACOSX is for an ancient version of OS X and
LUA_USE_LINUX is a reasonable set of defaults for modern Unices, so
just keep using that.


git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5804 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-06-26 19:17:43 +00:00
Glenn Rice 79992ca7e0 Make OpenCL builds "not" the default for linux and OSX. If OSX wants OpenCL to be part of the default build you can change this specifically for your platform. At this point there is no standard OpenCL library for linux.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5800 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-06-26 14:16:19 +00:00
Soren Jorvang 958e9bd1e0 Oops.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5798 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-06-26 13:56:29 +00:00
Soren Jorvang 10b76db391 Link the OpenCL framework weakly on OS X, so that a binary built on 10.6
with OpenCL will also run on 10.5 without OpenCL.

Build with OpenCL by default now, but keep the opencl build option around
until Linux also links OpenCL weakly, at which point it can go away.

Start to merge in the actions required to make the OS X application bundle
redistributable into the main build and let bundle=true be concerned only
with the optional step of creating a dmg.

Some people are building binary snapshots for OS X without applying the
install_name_tool fixups and besides, osx_make_dmg.sh doesn't fully handle
the internal dependencies between the wx libraries, so we need to be rid
of any external dependencies by the time "scons bundle=false ." finishes.

Ideally we should just use static builds of the wx libraries, but the flat
namespace used by Objective-C for anything other than normally linked
dylibs (sadly not dlopen'ed dylibs) makes that difficult because both the
main binary and the plugins have wx linked in without any symbol ordering.

TBD: Either do automatic install_name_tool fixups for both the main binary
and the wx dylibs or find a workaround for the flat namespace problem.


git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5797 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-06-26 13:29:44 +00:00
Glenn Rice 49674400e0 On linux make the build default to autodetection of glew, sdl, zlib, lzo, sfml-network, and soil, with an option to override the autodetection to force a static build.
MaxOSX will always use a static builds of those libraries as per soren's wishes.


git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5729 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-06-17 01:18:22 +00:00
Soren Jorvang b63e15e412 Don't try to link with dynamic versions of the LZO/SFML/SOIL libraries
on Linux when building a release image to make it more general.

OpenCL is new in OS X 10.6, so we can't restrict ourselves to the 10.5
compatibility SDK when OpenCL is enabled.

OpenCL really should be a runtime option (and weakly linked on OS X).


git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5727 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-06-16 16:35:19 +00:00
Soren Jorvang ce3eb2a13b Automatically detect and use shared library packages for
LZO/SFML/SOIL as already done for GLEW/SDL/zlib.


git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5723 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-06-16 12:42:49 +00:00
Soren Jorvang d24e5a37a6 Build with shared libraries whenever possible on Linux;
on OS X, always build with static libraries from Externals.

XXX LZO/SFML/SOIL are currently static only on Linux as well,
as they have been all along, because of a conflict between
CheckPKG('FOO') and the SHARED_FOO conditionals - on the second
build run with static version of these libraries, CheckPKG picks
them up, negating SHARED_FOO and making the code try to include
the canonical locations for these packages. The easiest fix is
probably to adjust the relative pathnames for those header files
in Externals, so that the same ones are included in the shared
and static cases.


git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5722 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-06-16 11:39:23 +00:00
Soren Jorvang 391312641c Build GLEW, SDL and zlib as static libraries from Externals as with
LZO/SFML/SOIL and subject to the same shared_foo exception options.

This makes building a self-contained distribution package much easier.

TBD: Cg and wxWidgets 2.9.


git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5712 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-06-16 00:07:52 +00:00
Soren Jorvang b560d2456e Integrate the standalone memcard manager into the main build.
Use 10.5 SDK header files in an attempt to keep us honest and
10.5 compatible. I'd do the same with system libraries, but
the linker gives strange errors when I try that. We also link
against third party libraries from Macports that haven't had
any magic 10.5 compat dust sprinkled over them, so maybe it
isn't very important anyway.

Move the OS X variable section in SConstruct upwards a bit to
have the settings apply to more of the config tests. SCons'
ParseConfig causes problems for the -arch tuples, though, so
the SDL check still isn't quite as comprehensive as it should
be.

Put the XCode project out of its misery.


git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5693 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-06-14 18:07:29 +00:00
hrydgard 8cae2fee56 Merge the pad plugin into Dolphin. Since there's only one plugin left under active development, and it's awesome, we no longer have a need for a pad plugin mechanism.
In the future if we merge wiimote too, this will bring the advantage that the two will be able to cooperate, to no longer fight over control of input devices which can sometimes cause problems.

Thanks shuffle2 for the patience.

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5670 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-06-13 09:14:40 +00:00
Glenn Rice 1936772725 Linux build fix
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5667 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-06-12 20:33:29 +00:00
hrydgard 1cd25e2406 (cleanup) InputPluginCommon is dead. Long live InputCommon and InputUICommon.
I hope I didn't break the mac+linux builds - if i did, fixing it should be a simple matter of adjusting the sconscripts.

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5661 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-06-12 17:39:33 +00:00
hrydgard ebbe2d905c Delete the old GCPad plugin. GCPadNew should now be better in pretty much every way, so it's time.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5656 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-06-12 13:50:24 +00:00
Soren Jorvang e7f7eff2b6 Remove a few unused HAVE_FOO's and make the SDL check global.
ulong is not a standard type.


git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5649 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-06-11 08:51:46 +00:00
Soren Jorvang 404c625622 Simplify the SCons build:
On OS X, build all code as Objective-C(++).

Centralize framework handling.

Cleanup.


git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5645 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-06-10 14:18:21 +00:00
Soren Jorvang 9016c90d47 Test linking with libsdl as part of its configure test to verify that
the library is of the correct binary format and such.


git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5641 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-06-09 19:41:17 +00:00
Soren Jorvang f78332a259 The openal and noao parameters are no longer necessary.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5631 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-06-06 21:14:56 +00:00
Glenn Rice 9c3c7c5443 Implement pulseaudio output. It is rather crude but seems to work.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5626 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-06-06 04:02:16 +00:00
Glenn Rice 53f9858b94 Don't open a tty to display progress. It is unnecessary and may not be available on some systems. This breaks builds in clean root environments which do not have /dev/tty.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5620 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-06-05 16:42:04 +00:00
Soren Jorvang 9ed6d98e2c wx 2.9 pasto and a few nits.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5617 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-06-05 03:03:01 +00:00
Soren Jorvang 63dbcf4f97 Check that the libraries claimed by wx-config can actually be linked
with. This avoids having wx problems show up as a problem with a 
subsequent dependency, namely Cg.

See issue #2175.
 
Also add explicit depdendency on zlib.


git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5607 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-06-04 21:00:39 +00:00
nakeee 1435c2527a After party
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5601 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-06-04 05:21:46 +00:00
Soren Jorvang 84c55c3e4e Deprecate nowx on OS X (but keep it building for sanity checking).
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5598 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-06-04 02:58:35 +00:00
Soren Jorvang 4a18908c57 Reapply r5586 and r5587:
Have lint mean -Werror at least until the issue with
-Warray-bounds and -Wunused-result can be resolved.

Avoid producing empty object files:

CoreRecording.cpp is not configured through the build system,
so just give it a dummy symbol when it's not compiled in.
ChunkFile.cpp and DSPBreakpoints.cpp are no longer used.
ExtendedTrace.cpp is Windows-only.


git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5592 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-06-03 18:49:35 +00:00
hrydgard c6cba79eb0 Reapply 5580 : trying to fix issue 2670
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5591 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-06-03 18:46:19 +00:00
hrydgard a3c96ac42c Warp back to 5578. Sorry for the lost changes, please re-apply. Reason: 5579 is a complete disaster.
Not only does it change tons of files to switch to a new and non-working (it doesn't parse my ini files, at least) ini parser, it also reshuffles a lot of code and removes a plugin. The latter part is fine, but doing these two major switches in one revision, one of which is broken, is completely unacceptable. I said to merge tiny changes, not massive reworkings.

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5589 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-06-03 18:05:08 +00:00
Soren Jorvang a281430b6b Have lint mean -Werror at least until the issue with
-Warray-bounds and -Wunused-result can be resolved.


git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5586 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-06-03 07:49:30 +00:00
nakeee a34ad40517 An almost linux/osx compile fix beside some undefined references
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5581 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-06-03 05:59:58 +00:00