diff --git a/README-SDL b/README-SDL index b16c3ec4..e627abce 100644 --- a/README-SDL +++ b/README-SDL @@ -25,11 +25,13 @@ Table of Contents scons After a sucessful compilation, the fceux binary will be generated to - ./src/fceux . You can install it to your path with: + ./src/fceux . You can install fceux to your system with the following command: - sudo install -m 755 src/fceux /usr/local/bin/fceux + scons install - or by running the install.sh script which executes the same function. + You can optionally define a prefix: + + scons --prefix=/usr/local install You can choose to install the lua scripts (located in output/luaScripts) to a directory of your choosing: diff --git a/SConstruct b/SConstruct index f74a60cd..ecc60ad6 100644 --- a/SConstruct +++ b/SConstruct @@ -16,11 +16,10 @@ opts.AddVariables( BoolVariable('GTK3', 'Enable GTK3 GUI (SDL only)', 0), ) -#TODO -#AddOption('--prefix', dest='prefix', type='string', nargs=1, action='store', metavar='DIR', help='installation prefix') +AddOption('--prefix', dest='prefix', type='string', nargs=1, action='store', metavar='DIR', help='installation prefix') -#prefix = GetOption('prefix') -env = Environment(options = opts) #, prefix = prefix) +prefix = GetOption('prefix') +env = Environment(options = opts, prefix = prefix) #### Uncomment this for a public release ### # env.Append(CPPDEFINES=["PUBLIC_RELEASE"]) @@ -147,6 +146,8 @@ env.Command(fceux_dst, fceux_src, [Copy(fceux_dst, fceux_src)]) env.Command(auxlib_dst, auxlib_src, [Copy(auxlib_dst, auxlib_src)]) # TODO: Fix this build script to gracefully install auxlib and the man page +if prefix == None: + prefix = "/usr/local" -env.Install("/usr/local/bin/", fceux) -env.Alias('install', ['/usr/local/bin']) +env.Install(prefix + "/bin/", fceux) +env.Alias('install', [prefix + "/bin/"]) diff --git a/changelog.txt b/changelog.txt index ab33655c..a5797663 100644 --- a/changelog.txt +++ b/changelog.txt @@ -1,3 +1,4 @@ +19-octo-2011 - prg318 - scons: added --prefix option to build system and improved "install" target 18-octo-2011 - prg318 - sdl: new hotkeys added - statestatenext savestateprev - useful for scrolling through savestates on a gamepad. mapped to pgup and pgdown by default 18-octo-2011 - prg318 - gtk: new video option for double buffering and ClipSides 18-octo-2011 - prg318 - sdl: GTK3 support is now functional. Set GTK3 to 1 in the SConstruct to try it out.