Moved linux pipeline to cmake instead of qmake.
This commit is contained in:
parent
321ea729d4
commit
cb453fa194
57
fceux.pro
57
fceux.pro
|
@ -21,7 +21,10 @@ QT += widgets
|
|||
|
||||
CONFIG += object_parallel_to_source
|
||||
|
||||
INCLUDEPATH = src src/drivers
|
||||
INCLUDEPATH += src src/drivers
|
||||
|
||||
ENABLE_LUA = 0
|
||||
USE_INTERNAL_LUA = 0
|
||||
|
||||
unix {
|
||||
QT_CONFIG -= no-pkg-config
|
||||
|
@ -42,8 +45,13 @@ unix {
|
|||
|
||||
packagesExist(lua-5.1){
|
||||
PKGCONFIG += lua-5.1
|
||||
USE_INTERNAL_LUA = 0;
|
||||
QMAKE_CXXFLAGS += -D_S9XLUA_H
|
||||
} else {
|
||||
USE_INTERNAL_LUA = 1;
|
||||
QMAKE_CXXFLAGS += -D_S9XLUA_H
|
||||
}
|
||||
ENABLE_LUA = 1
|
||||
|
||||
QMAKE_CXXFLAGS -= -O2
|
||||
QMAKE_CXXFLAGS += -D__QT_DRIVER__ -O0 -g3 -Wall -Wno-write-strings -Wno-sign-compare -Wno-parentheses -Wno-unused-local-typedefs
|
||||
|
@ -81,11 +89,50 @@ SOURCES += src/vsuni.cpp
|
|||
SOURCES += src/wave.cpp
|
||||
SOURCES += src/x6502.cpp
|
||||
|
||||
unix {
|
||||
packagesExist(lua-5.1){
|
||||
SOURCES += src/lua-engine.cpp
|
||||
}
|
||||
isEqual( ENABLE_LUA, 1 ) {
|
||||
isEqual( USE_INTERNAL_LUA, 1 ) {
|
||||
message("Enabling Internal LUA")
|
||||
INCLUDEPATH += src/lua/src
|
||||
SOURCES += src/lua/src/lapi.c
|
||||
SOURCES += src/lua/src/lauxlib.c
|
||||
SOURCES += src/lua/src/lbaselib.c
|
||||
SOURCES += src/lua/src/lcode.c
|
||||
SOURCES += src/lua/src/ldblib.c
|
||||
SOURCES += src/lua/src/ldebug.c
|
||||
SOURCES += src/lua/src/ldo.c
|
||||
SOURCES += src/lua/src/ldump.c
|
||||
SOURCES += src/lua/src/lfunc.c
|
||||
SOURCES += src/lua/src/lgc.c
|
||||
SOURCES += src/lua/src/linit.c
|
||||
SOURCES += src/lua/src/liolib.c
|
||||
SOURCES += src/lua/src/llex.c
|
||||
SOURCES += src/lua/src/lmathlib.c
|
||||
SOURCES += src/lua/src/lmem.c
|
||||
SOURCES += src/lua/src/loadlib.c
|
||||
SOURCES += src/lua/src/lobject.c
|
||||
SOURCES += src/lua/src/lopcodes.c
|
||||
SOURCES += src/lua/src/loslib.c
|
||||
SOURCES += src/lua/src/lparser.c
|
||||
SOURCES += src/lua/src/lstate.c
|
||||
SOURCES += src/lua/src/lstring.c
|
||||
SOURCES += src/lua/src/lstrlib.c
|
||||
SOURCES += src/lua/src/ltable.c
|
||||
SOURCES += src/lua/src/ltablib.c
|
||||
SOURCES += src/lua/src/ltm.c
|
||||
SOURCES += src/lua/src/lundump.c
|
||||
SOURCES += src/lua/src/lvm.c
|
||||
SOURCES += src/lua/src/lzio.c
|
||||
SOURCES += src/lua/src/print.c
|
||||
SOURCES += src/lua-engine.cpp
|
||||
} else {
|
||||
message("Enabling System LUA")
|
||||
SOURCES += src/lua-engine.cpp
|
||||
}
|
||||
message("Enabling LUA")
|
||||
} else {
|
||||
message("Disabling LUA")
|
||||
}
|
||||
|
||||
SOURCES += src/boards/01-222.cpp
|
||||
SOURCES += src/boards/09-034a.cpp
|
||||
SOURCES += src/boards/103.cpp
|
||||
|
|
|
@ -92,30 +92,30 @@ mkdir -p $INSTALL_PREFIX/usr;
|
|||
#scons GTK3=1 SYSTEM_LUA=1 SYSTEM_MINIZIP=1 CREATE_AVI=1 install --prefix=$INSTALL_PREFIX/usr
|
||||
echo "Num CPU: `nproc`";
|
||||
mkdir build; cd build;
|
||||
qmake PREFIX=$INSTALL_PREFIX/usr ..
|
||||
#cmake \
|
||||
# -DCMAKE_BUILD_TYPE=Release \
|
||||
# -DCMAKE_INSTALL_PREFIX=$INSTALL_PREFIX/usr \
|
||||
# -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON \
|
||||
# ..
|
||||
#qmake PREFIX=$INSTALL_PREFIX/usr ..
|
||||
cmake \
|
||||
-DCMAKE_BUILD_TYPE=Release \
|
||||
-DCMAKE_INSTALL_PREFIX=$INSTALL_PREFIX/usr \
|
||||
-DCMAKE_VERBOSE_MAKEFILE:BOOL=ON \
|
||||
..
|
||||
make -j `nproc`
|
||||
#make install
|
||||
make install
|
||||
|
||||
# Install Files
|
||||
cd .. # cd out of build
|
||||
mkdir -p $INSTALL_PREFIX/usr/bin/.
|
||||
mkdir -p $INSTALL_PREFIX/usr/share/fceux
|
||||
mkdir -p $INSTALL_PREFIX/usr/share/pixmaps
|
||||
mkdir -p $INSTALL_PREFIX/usr/share/applications
|
||||
mkdir -p $INSTALL_PREFIX/usr/man/man6
|
||||
|
||||
cp -f ./build/fceux $INSTALL_PREFIX/usr/bin/.
|
||||
cp -a ./output/* $INSTALL_PREFIX/usr/share/fceux/.
|
||||
cp -a ./src/auxlib.lua $INSTALL_PREFIX/usr/share/fceux/.
|
||||
cp -a ./fceux.png $INSTALL_PREFIX/usr/share/pixmaps/.
|
||||
cp -a ./fceux.desktop $INSTALL_PREFIX/usr/share/applications/.
|
||||
cp -a ./documentation/fceux.6 $INSTALL_PREFIX/usr/man/man6/.
|
||||
cp -a ./documentation/fceux-net-server.6 $INSTALL_PREFIX/usr/man/man6/.
|
||||
#cd .. # cd out of build
|
||||
#mkdir -p $INSTALL_PREFIX/usr/bin/.
|
||||
#mkdir -p $INSTALL_PREFIX/usr/share/fceux
|
||||
#mkdir -p $INSTALL_PREFIX/usr/share/pixmaps
|
||||
#mkdir -p $INSTALL_PREFIX/usr/share/applications
|
||||
#mkdir -p $INSTALL_PREFIX/usr/man/man6
|
||||
#
|
||||
#cp -f ./build/fceux $INSTALL_PREFIX/usr/bin/.
|
||||
#cp -a ./output/* $INSTALL_PREFIX/usr/share/fceux/.
|
||||
#cp -a ./src/auxlib.lua $INSTALL_PREFIX/usr/share/fceux/.
|
||||
#cp -a ./fceux.png $INSTALL_PREFIX/usr/share/pixmaps/.
|
||||
#cp -a ./fceux.desktop $INSTALL_PREFIX/usr/share/applications/.
|
||||
#cp -a ./documentation/fceux.6 $INSTALL_PREFIX/usr/man/man6/.
|
||||
#cp -a ./documentation/fceux-net-server.6 $INSTALL_PREFIX/usr/man/man6/.
|
||||
|
||||
|
||||
# Debug via ssh if necessary
|
||||
|
|
|
@ -58,8 +58,49 @@ else(WIN32)
|
|||
pkg_check_modules( LUA lua-5.1)
|
||||
|
||||
if ( ${LUA_FOUND} )
|
||||
# Use System LUA
|
||||
add_definitions( -D_S9XLUA_H ${LUA_CFLAGS} )
|
||||
set( LUA_ENGINE_SOURCE lua-engine.cpp )
|
||||
|
||||
set( LUA_ENGINE_SOURCE ${CMAKE_CURRENT_SOURCE_DIR}/lua-engine.cpp )
|
||||
|
||||
else ()
|
||||
|
||||
# Use Internal LUA
|
||||
add_definitions( -D_S9XLUA_H -I${CMAKE_CURRENT_SOURCE_DIR}/lua/src )
|
||||
|
||||
set( LUA_ENGINE_SOURCE
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/lua/src/lapi.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/lua/src/lauxlib.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/lua/src/lbaselib.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/lua/src/lcode.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/lua/src/ldblib.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/lua/src/ldebug.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/lua/src/ldo.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/lua/src/ldump.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/lua/src/lfunc.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/lua/src/lgc.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/lua/src/linit.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/lua/src/liolib.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/lua/src/llex.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/lua/src/lmathlib.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/lua/src/lmem.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/lua/src/loadlib.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/lua/src/lobject.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/lua/src/lopcodes.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/lua/src/loslib.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/lua/src/lparser.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/lua/src/lstate.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/lua/src/lstring.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/lua/src/lstrlib.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/lua/src/ltable.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/lua/src/ltablib.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/lua/src/ltm.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/lua/src/lundump.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/lua/src/lvm.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/lua/src/lzio.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/lua/src/print.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/lua-engine.cpp
|
||||
)
|
||||
endif()
|
||||
|
||||
add_definitions( -DHAVE_ASPRINTF ) # What system wouldn't have this?
|
||||
|
@ -362,3 +403,10 @@ target_link_libraries( fceux
|
|||
|
||||
install( TARGETS fceux
|
||||
RUNTIME DESTINATION bin )
|
||||
|
||||
install( FILES ${CMAKE_CURRENT_SOURCE_DIR}/auxlib.lua DESTINATION share/fceux/luaScripts )
|
||||
install( DIRECTORY ${CMAKE_SOURCE_DIR}/output/. DESTINATION share/fceux )
|
||||
install( FILES ${CMAKE_SOURCE_DIR}/fceux.png DESTINATION share/pixmaps )
|
||||
install( FILES ${CMAKE_SOURCE_DIR}/fceux.desktop DESTINATION share/applications )
|
||||
install( FILES ${CMAKE_SOURCE_DIR}/documentation/fceux.6 DESTINATION share/man/man6 )
|
||||
install( FILES ${CMAKE_SOURCE_DIR}/documentation/fceux-net-server.6 DESTINATION share/man/man6 )
|
||||
|
|
|
@ -651,7 +651,7 @@ void consoleWin_t::loadLua(void)
|
|||
g_config->setOption ("SDL.LastLoadLua", filename.toStdString().c_str() );
|
||||
|
||||
fceuWrapperLock();
|
||||
if ( FCEU_LoadLuaCode( filename.toStdString().c_str() ) )
|
||||
if ( 0 == FCEU_LoadLuaCode( filename.toStdString().c_str() ) )
|
||||
{
|
||||
printf("Error: Could not open the selected lua script: '%s'\n", filename.toStdString().c_str() );
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue