Description: Port from obsolete fceu to fceux
Author: Steve Langasek <steve.langasek@ubuntu.com>

Index: gfceu-0.6.1/gfceu
===================================================================
--- gfceu-0.6.1.orig/gfceu
+++ gfceu-0.6.1/gfceu
@@ -225,26 +225,26 @@
 
   
 def launch(passed, local=False):
-  global xml, options, fceu_server_binary, fceu_binary, aoss_binary
+  global xml, options, fceu_server_binary, fceu_binary
   set_options()
   
   if options.sound_check:
-    sound = '-sound 1 '
+    sound = '--sound 1 '
   else:
-    sound = '-sound 0 '
+    sound = '--sound 0 '
     
   if options.fullscreen_check:
-    fullscreen = '-fs 1 '
+    fullscreen = '--fullscreen 1 '
   else:
-    fullscreen = '-fs 0 '
+    fullscreen = '--fullscreen 0 '
     
   if options.join_radio:
     if options.join_pass == '':
       netpass = ''
     else:
-      netpass = '-netpassword ' + '"' + options.join_pass + '" '
-    network = '-connect "' + options.join_add + '"'\
-    ' -netport '+ str(options.join_port) + ' ' + netpass
+      netpass = '--pass ' + '"' + options.join_pass + '" '
+    network = '--net "' + options.join_add + '"'\
+    ' --port '+ str(options.join_port) + ' ' + netpass
   else:
     network = ''
   
@@ -252,8 +252,8 @@
     if options.host_pass == '':
       netpass = ' '
     else:
-      netpass = ' -netpassword ' + '"' + options.host_pass + '" '
-    network = '-connect localhost -netport '+\
+      netpass = ' --pass ' + '"' + options.host_pass + '" '
+    network = '--net localhost --port '+\
     str(options.host_port) + netpass + ' '
       
     
@@ -261,11 +261,11 @@
     network = ''
   
   if options.opengl_check:
-    opengl = '-opengl 1 '
+    opengl = '--opengl 1 '
   else:
-    opengl = '-opengl 0 '
+    opengl = '--opengl 0 '
   
-  command =  aoss_binary + ' ' + fceu_binary +' '+ sound + fullscreen +\
+  command =  fceu_binary +' '+ sound + fullscreen +\
   network + opengl + options.extra_entry + ' '+ passed
   gfceu_message('Command: ' + command)
 
@@ -421,7 +421,7 @@
          'gp2_button' : '2',
          'gp3_button' : '3',
          'gp4_button' : '4'}
-    command = '-inputcfg gamepad' + d[widget.name] + ' /dev/null'
+    command = '--inputcfg gamepad' + d[widget.name] + ' /dev/null'
     launch(command, True)
 
   def config_help_button_clicked(arg1):
@@ -446,14 +446,14 @@
   def host_radio_clicked(arg1):
     global fceu_server_binary
     if widgets['host_radio'].get_active():
-      fceu_server_binary = find_binary('fceu-server')
+      fceu_server_binary = find_binary('fceux-net-server')
       if fceu_server_binary == None:
         if os.name == 'nt':
-          gfceu_error("The fceu server software cannot be found. \n\
+          gfceu_error("The fceux server software cannot be found. \n\
           Ensure that it is installed in the same directory as \n\
           GFCE Ultra.", 102, True, False)
         else:
-          gfceu_error("The fceu server software cannot be found on \n\
+          gfceu_error("The fceux server software cannot be found on \n\
           this system.  Ensure that it is installed and in your path.",
           101, True, False)
         widgets['no_network_radio'].set_active(True)
@@ -487,7 +487,6 @@
 old_optionsfile = os.getenv('HOME')+'/.gfceu_options'
 optionsfile = appconfigdir + 'gfceu_options.dat'
 fceu_binary = None
-aoss_binary = None
 fceu_server_binary = None
 #version is defined earlier in the code
 #have_vfs is defined earlier in the code
@@ -521,20 +520,14 @@
   parser = OptionParser(version='%prog '+ version)
   parser.parse_args()
   
-  fceu_binary = find_binary('fceu')
+  fceu_binary = find_binary('fceux')
   if fceu_binary == None:
-    gfceu_error('Could not find the fceu binary.\n\
+    gfceu_error('Could not find the fceux binary.\n\
     Ensure that FCE Ultra is installed and in the $PATH.\n\
     On Debian based systems (like Ubuntu), try the following command:\n\
-    sudo apt-get install fceu', 4, True)
+    sudo apt-get install fceux', 4, True)
   else:
     gfceu_message('Using: '+fceu_binary)
-  aoss_binary = find_binary('aoss')
-  if aoss_binary == None:
-    gfceu_error('Could not find the the ALSA OSS wrapper.\n\
-    GFCEU will not be able to share the sound device with other applications.\n\
-    On Debian based systems (like Ubuntu), try the following command:\n\
-    sudo apt-get install alsa-oss', 76, True, False)
 
   widgets = WidgetsWrapper()
   widgets['main_window'].show_all()
