got the sdl/sconstruct build working in cygwin
this required some changes to build scripts. please assume, if it requires fixing, that what I did was sane! many files included #ifdef WIN32 which I changed to #ifdef MSVC since we are only supporting windows-specific features in the msvc build.
This commit is contained in:
parent
529df3c6b5
commit
b8b6324ba3
|
@ -1,7 +1,6 @@
|
||||||
CCFLAGS= ''
|
#fetch environment
|
||||||
LINKFLAGS = ''
|
env = Environment()
|
||||||
|
|
||||||
env = Environment(CCFLAGS=CCFLAGS, LINKFLAGS=LINKFLAGS)
|
|
||||||
conf = Configure(env)
|
conf = Configure(env)
|
||||||
if not conf.CheckLib('SDL'):
|
if not conf.CheckLib('SDL'):
|
||||||
print 'Did not find libSDL.a or SDL.lib, exiting!'
|
print 'Did not find libSDL.a or SDL.lib, exiting!'
|
||||||
|
@ -9,6 +8,8 @@ if not conf.CheckLib('SDL'):
|
||||||
if not conf.CheckLib('z'):
|
if not conf.CheckLib('z'):
|
||||||
print 'Did not find libz.a or z.lib, exiting!'
|
print 'Did not find libz.a or z.lib, exiting!'
|
||||||
Exit(1)
|
Exit(1)
|
||||||
|
if not conf.CheckFunc('asprintf'):
|
||||||
|
env['CCFLAGS'] += " -DHAVE_ASPRINTF"
|
||||||
|
|
||||||
env = conf.Finish()
|
env = conf.Finish()
|
||||||
Export('env')
|
Export('env')
|
||||||
|
|
|
@ -1,5 +1,10 @@
|
||||||
Items to be completed before 2.0 release
|
Items to be completed before 2.0 release
|
||||||
|
|
||||||
|
FASTAPASS / FP_FASTAPASS / Are these archaic? They suck - ??
|
||||||
|
|
||||||
|
Doxygen integration - ??
|
||||||
|
* website integration
|
||||||
|
|
||||||
Linux build - soules
|
Linux build - soules
|
||||||
* clean-up scons files to manage SDL variables properly
|
* clean-up scons files to manage SDL variables properly
|
||||||
* go through #def variables and figure out which we need and which we don't
|
* go through #def variables and figure out which we need and which we don't
|
||||||
|
|
|
@ -65,12 +65,26 @@ sdl_libflags = sdl_libflags_pipe.read();
|
||||||
for flag in sdl_libflags.split(' '):
|
for flag in sdl_libflags.split(' '):
|
||||||
if flag.find("-L") == 0:
|
if flag.find("-L") == 0:
|
||||||
sdl_libpath.append(flag.strip("-L"));
|
sdl_libpath.append(flag.strip("-L"));
|
||||||
else:
|
elif flag.find("-l") == 0:
|
||||||
sdl_libs.append(flag.strip("-l"));
|
sdl_libs.append(flag.strip("-l"));
|
||||||
|
else:
|
||||||
|
env['LINKFLAGS'] += " " + flag;
|
||||||
sdl_libflags_pipe.close();
|
sdl_libflags_pipe.close();
|
||||||
|
|
||||||
# add zlib
|
# add zlib
|
||||||
libs = sdl_libs;
|
libs = sdl_libs;
|
||||||
libs.append('z');
|
libs.append('z');
|
||||||
|
|
||||||
env.Program('fceu', file_list, CCFLAGS=sdl_cflags, LIBS=libs, LIBPATH=sdl_libpath)
|
# include sdl cflags
|
||||||
|
env['CCFLAGS'] += sdl_cflags;
|
||||||
|
|
||||||
|
#special flags for cygwin
|
||||||
|
print "platform: " + env['PLATFORM']
|
||||||
|
if env['PLATFORM'] == 'cygwin':
|
||||||
|
env['CCFLAGS'] += " -mno-cygwin"
|
||||||
|
#env['LINKFLAGS'] += " -mno-cygwin"
|
||||||
|
libs.extend(['ddraw','dinput','dsound','gdi32','dxguid','winmm','shell32','wsock32','comdlg32','ole32']);
|
||||||
|
|
||||||
|
print env['CCFLAGS']
|
||||||
|
|
||||||
|
env.Program('fceu', file_list, LIBS=libs, LIBPATH=sdl_libpath)
|
||||||
|
|
|
@ -202,9 +202,9 @@ char *GetKeyboard(void)
|
||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
|
|
||||||
/* Stupid SDL */
|
/* Stupid SDL */
|
||||||
#ifdef main
|
//#ifdef main
|
||||||
#undef main
|
//#undef main
|
||||||
#endif
|
//#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef EXTGUI
|
#ifndef EXTGUI
|
||||||
|
|
|
@ -67,21 +67,20 @@ if(which < FCEUIOD__COUNT)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// XXX commented out for now... Linux has asprintf()
|
#ifndef HAVE_ASPRINTF
|
||||||
// #ifndef HAVE_ASPRINTF
|
static int asprintf(char **strp, const char *fmt, ...)
|
||||||
// static int asprintf(char **strp, const char *fmt, ...)
|
{
|
||||||
// {
|
va_list ap;
|
||||||
// va_list ap;
|
int ret;
|
||||||
// int ret;
|
|
||||||
|
|
||||||
// va_start(ap,fmt);
|
va_start(ap,fmt);
|
||||||
// if(!(*strp=(char*)malloc(2048))) //mbg merge 7/17/06 cast to char*
|
if(!(*strp=(char*)malloc(2048))) //mbg merge 7/17/06 cast to char*
|
||||||
// return(0);
|
return(0);
|
||||||
// ret=vsnprintf(*strp,2048,fmt,ap);
|
ret=vsnprintf(*strp,2048,fmt,ap);
|
||||||
// va_end(ap);
|
va_end(ap);
|
||||||
// return(ret);
|
return(ret);
|
||||||
// }
|
}
|
||||||
// #endif
|
#endif
|
||||||
|
|
||||||
char* FCEU_GetPath(int type)
|
char* FCEU_GetPath(int type)
|
||||||
{
|
{
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
//#include <unistd.h> //mbgm erge 7/17/06 removed
|
//#include <unistd.h> //mbgm erge 7/17/06 removed
|
||||||
#ifdef WIN32
|
#ifdef MSVC
|
||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -235,7 +235,7 @@ void FCEUI_StopMovie(void)
|
||||||
if(current > 0) StopRecording();
|
if(current > 0) StopRecording();
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef WIN32
|
#ifdef MSVC
|
||||||
#include "process.h"
|
#include "process.h"
|
||||||
void executeCommand(const char* cmd)
|
void executeCommand(const char* cmd)
|
||||||
{
|
{
|
||||||
|
@ -255,7 +255,7 @@ void executeCommand(const char* cmd)
|
||||||
int justAutoConverted=0;
|
int justAutoConverted=0;
|
||||||
static const char* convertToFCM(const char *fname, char *buffer)
|
static const char* convertToFCM(const char *fname, char *buffer)
|
||||||
{
|
{
|
||||||
#ifdef WIN32
|
#ifdef MSVC
|
||||||
justAutoConverted=0;
|
justAutoConverted=0;
|
||||||
|
|
||||||
// convert to fcm if not already
|
// convert to fcm if not already
|
||||||
|
@ -350,7 +350,7 @@ void ParseGIInput(FCEUGI *GI); //mbg merge 7/17/06 - had to add. gross.
|
||||||
void InitOtherInput(void); //mbg merge 7/17/06 - had to add. gross.
|
void InitOtherInput(void); //mbg merge 7/17/06 - had to add. gross.
|
||||||
static void ResetInputTypes()
|
static void ResetInputTypes()
|
||||||
{
|
{
|
||||||
#ifdef WIN32
|
#ifdef MSVC
|
||||||
extern int UsrInputType[3];
|
extern int UsrInputType[3];
|
||||||
UsrInputType[0] = SI_GAMEPAD;
|
UsrInputType[0] = SI_GAMEPAD;
|
||||||
UsrInputType[1] = SI_GAMEPAD;
|
UsrInputType[1] = SI_GAMEPAD;
|
||||||
|
@ -867,7 +867,7 @@ void FCEU_DrawMovies(uint8 *XBuf)
|
||||||
{
|
{
|
||||||
int frameDisplayOn = current != 0 && frame_display;
|
int frameDisplayOn = current != 0 && frame_display;
|
||||||
extern int howlong;
|
extern int howlong;
|
||||||
#if WIN32
|
#if MSVC
|
||||||
extern int32 fps_scale;
|
extern int32 fps_scale;
|
||||||
#else
|
#else
|
||||||
int32 fps_scale=256;
|
int32 fps_scale=256;
|
||||||
|
|
|
@ -259,7 +259,7 @@ static int ReadStateChunks(FILE *st, int32 totalsize)
|
||||||
extern uint8 *XBackBuf;
|
extern uint8 *XBackBuf;
|
||||||
if(size != fread(XBackBuf,1,size,st))
|
if(size != fread(XBackBuf,1,size,st))
|
||||||
ret = 0;
|
ret = 0;
|
||||||
#ifdef WIN32
|
#ifdef MSVC
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
FCEUD_BlitScreen(XBuf);
|
FCEUD_BlitScreen(XBuf);
|
||||||
|
|
|
@ -23,7 +23,7 @@ void FCEU_WriteWaveData(int32 *Buffer, int Count)
|
||||||
int16 *dest;
|
int16 *dest;
|
||||||
int x;
|
int x;
|
||||||
|
|
||||||
#ifndef WIN32
|
#ifndef MSVC
|
||||||
if(!soundlog) return;
|
if(!soundlog) return;
|
||||||
#else
|
#else
|
||||||
if(!soundlog && !FCEUI_AviIsRecording()) return;
|
if(!soundlog && !FCEUI_AviIsRecording()) return;
|
||||||
|
@ -45,7 +45,7 @@ void FCEU_WriteWaveData(int32 *Buffer, int Count)
|
||||||
if(soundlog)
|
if(soundlog)
|
||||||
wsize+=fwrite(temp,1,Count*sizeof(int16),soundlog);
|
wsize+=fwrite(temp,1,Count*sizeof(int16),soundlog);
|
||||||
|
|
||||||
#ifdef WIN32
|
#ifdef MSVC
|
||||||
if(FCEUI_AviIsRecording())
|
if(FCEUI_AviIsRecording())
|
||||||
{
|
{
|
||||||
extern int bittage;
|
extern int bittage;
|
||||||
|
|
Loading…
Reference in New Issue