Linux-only: Removed a few obsolete files. Copied in a build script to make rebuilding the project a bit easier.

git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5013 96395faa-99c1-11dd-bbfe-3dabce05a288
This commit is contained in:
arcum42 2011-12-24 11:15:42 +00:00
parent bc7a930409
commit 48afd2c274
4 changed files with 44 additions and 235 deletions

View File

@ -1,35 +0,0 @@
#!/bin/sh
# Usage: sh build.sh [option]
# option can be all (rebuilds everything), clean, or nothing (incremental build)
# Modify the individual build.sh for specific program options like debug symbols
#This is just for building the plugins; pcsx2 is build using codeblocks.
#ZeroGS Normal mode
export ZEROGSOPTIONS="--enable-sse2"
#ZeroGS Debug mode
#export ZEROGSOPTIONS="--enable-debug --enable-devbuild --enable-sse2"
#ZeroSPU2 Debug mode (Don't enable right now)
#export ZEROSPU2OPTIONS="--enable-debug --enable-devbuild"
#GSnull debug options.
#export GSnullOPTIONS="--enable-debug"
option=$@
export PCSX2PLUGINS="`pwd`/bin/plugins"
curdir=`pwd`
echo
echo "Building the Pcsx2 Plugins."
echo "Note: binaries generated are 32 bit, and require 32 bit versions of all dependencies."
cd ${curdir}/plugins
sh build.sh $option
if [ $? -ne 0 ]
then
echo Error with building plugins
exit 1
fi

174
build.rb
View File

@ -1,174 +0,0 @@
#!/usr/bin/env ruby
# Usage: ruby build.rb [option] [pcsx2, plugins, <plugin name>] [dev,debug,release] [all, install, clean]
# If you don't specify pcsx2, plugins, or a plugin name, it will assume you want to rebuild everything.
# If you don't specify dev or debug, it assumes a release build.
# If it isn't all, install, or clean, it assumes install.
# If you want other options, add them to $pcsx2_build_types. This is still a work in progress...
# --arcum42
require "fileutils.rb"
include FileUtils
$main_dir = Dir.pwd
$pcsx2_install_dir = "#{$main_dir}/bin"
$plugin_install_dir = "#{$main_dir}/bin/plugins"
$pcsx2_dir = "#{$main_dir}/pcsx2"
$plugins_dir = "#{$main_dir}/plugins"
$pcsx2_prefix = " --prefix #{$main_dir}"
$plugins_prefix = " --prefix #{$plugin_install_dir}"
$plugin_list=["CDVDnull", "dev9null", "FWnull", "USBnull", "SPU2null", "zerogs", "zzogl", "zeropad", "zerospu2", "PeopsSPU2", "CDVDiso", "CDVDisoEFP", "CDVDlinuz"]
$full_plugin_list=["CDVDnull", "dev9null", "FWnull", "USBnull", "SPU2null", "zerogs", "zzogl", "zeropad", "zerospu2", "PeopsSPU2", "CDVDiso", "CDVDisoEFP", "CDVDlinuz","GSnull","PadNull","onepad"]
$pcsx2_build_types = {
"dev" => " --enable-devbuild ",
"debug" => " --enable-debug ",
"release" => " "
}
$pcsx2_release_params=["dev","debug","release"]
$make_params=["all", "clean","install"]
$build_report =""
$build_counter = 0
def plugin_src_dir(plugin_name)
name = "#{$plugins_dir}/#{plugin_name}/"
case plugin_name
when "CDVDiso" then
name += "src"
when "CDVDisoEFP" then
name += "src/Linux"
when "CDVDlinuz"
name += "Src/Linux"
when "zerogs", "zzogl"
name += "opengl"
end
return name
end
def announce(my_program)
print "---------------\n"
print "Building #{my_program}\n"
print "---------------\n"
end
def make(options)
system("make #{options}")
($? == 0)
end
def rebuild(options)
system("aclocal")
system("automake")
system("autoconf")
system("chmod +x configure")
system("./configure #{options}")
make "clean"
end
def install(build_name)
ret = make "install"
case build_name
# If the package isn't inclined to obey simple instructions...
when "CDVDisoEFP" then
system("cp #{plugin_src_dir(build_name)}/cfgCDVDisoEFP #{$plugin_install_dir}")
system("cp #{plugin_src_dir(build_name)}/libCDVDisoEFP.so #{$plugin_install_dir}")
when "CDVDlinuz" then
system("cp #{plugin_src_dir(build_name)}/cfgCDVDlinuz #{$plugin_install_dir}")
system("cp #{plugin_src_dir(build_name)}/libCDVDlinuz.so #{$plugin_install_dir}")
when "PeopsSPU2" then
system("cp #{plugin_src_dir(build_name)}/libspu2Peops*.so* #{$plugin_install_dir}")
# Copy the shaders over. Shouldn't the makefile do this?
when "zzogl","zerogs" then
system("cp #{plugin_src_dir(build_name)}/Win32/ps2hw.dat #{$plugin_install_dir}")
#And while we have the opportunity...
when "pcsx2" then
svn_revision = `svn info | grep Revision:`
svn_revision = /[0-9]+/.match(svn_revision)
system("cp #{$pcsx2_install_dir}/pcsx2 #{$pcsx2_install_dir}/pcsx2-#{svn_revision}")
end
ret
end
def build(build_name, make_parameter)
completed = true
announce "#{build_name.capitalize}"
if build_name != "pcsx2" then
build_dir = plugin_src_dir(build_name)
else
build_dir = "#{$pcsx2_dir}"
end
Dir.chdir build_dir
case make_parameter
when "all" then
if build_name == "pcsx2"
rebuild($pcsx2_prefix)
else
rebuild($plugins_prefix)
end
completed = install(build_name)
when "clean" then
make "clean"
else
completed = install(build_name)
end
Dir.chdir $main_dir
if completed then
$build_report += "#{build_name} was built successfully.\n"
$build_counter += 1
else
$build_report += "#{build_name} was not built successfully.\n"
end
end
build_parameter = "all"
make_parameter = ""
build_items = Array.new([])
ARGV.each do |x|
make_parameter = x if $make_params.include?(x)
build_items.push(x) if $full_plugin_list.include?(x) or (x == "pcsx2")
$pcsx2_prefix = $pcsx2_build_types[x] + $pcsx2_prefix if $pcsx2_release_params.include?(x)
if (x == "plugins") then
x = $plugin_list
build_items.push(x)
end
end
if build_items.empty? then
build_items.push($plugin_list)
build_items.push("pcsx2")
end
build_items.flatten!
build_items.each do |x|
build(x,make_parameter)
end
print "\n--\n"
print "Build Summary:\n"
print $build_report
print "\n"
print "#{$build_counter}/#{build_items.count} Successful.\n"

44
build.sh Executable file
View File

@ -0,0 +1,44 @@
#!/bin/bash
flags=""
args="$@"
clean_build=false
for f in $args; do
if [ "$f" = "gsdx" ] ; then
flags="$flags -DFORCE_INTERNAL_SDL=TRUE"
fi
if [ "$f" = "dev" ] ; then
flags="$flags -DCMAKE_BUILD_TYPE=Devel"
fi
if [ "$f" = "debug" ] ; then
flags="$flags -DCMAKE_BUILD_TYPE=Debug"
fi
if [ "$f" = "release" ] ; then
flags="$flags -DCMAKE_BUILD_TYPE=Release"
fi
if [ "$f" = "clean" ] ; then
clean=true
fi
done
rm install_log.txt
if [ $flags ]; then
echo "Building pcsx2 with $flags"
echo "Building pcsx2 with $flags" > install_log.txt
fi
if [ ! -d "build" ]; then
mkdir build
fi
cd build
cmake $flags .. 2>&1 | tee -a ../install_log.txt
if [ $clean ]; then
make clean 2>&1 | tee -a ../install_log.txt
fi
make 2>&1 | tee -a ../install_log.txt
make install 2>&1 | tee -a ../install_log.txt
cd ..

View File

@ -1,26 +0,0 @@
#!/bin/sh
curdir=`pwd`
buildplugin() {
if [ -d ${curdir}/$1 ]
then
cd ${curdir}/$1
sh build.sh $2
if [ $? -ne 0 ]
then
exit 1
fi
fi
}
buildplugin zerogs $@
buildplugin zzogl $@
buildplugin zzogl-pg $@
buildplugin zeropad $@
buildplugin PeopsSPU2 $@
buildplugin CDVDisoEFP $@
buildplugin CDVDlinuz $@