gfceu is now compatible with fceux
This commit is contained in:
parent
d30dd3de0a
commit
32f5774cb8
46
gfceu
46
gfceu
|
@ -225,26 +225,26 @@ def set_options():
|
||||||
|
|
||||||
|
|
||||||
def launch(passed, local=False):
|
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()
|
set_options()
|
||||||
|
|
||||||
if options.sound_check:
|
if options.sound_check:
|
||||||
sound = '-sound 1 '
|
sound = '--sound 1 '
|
||||||
else:
|
else:
|
||||||
sound = '-sound 0 '
|
sound = '--sound 0 '
|
||||||
|
|
||||||
if options.fullscreen_check:
|
if options.fullscreen_check:
|
||||||
fullscreen = '-fs 1 '
|
fullscreen = '--fullscreen 1 '
|
||||||
else:
|
else:
|
||||||
fullscreen = '-fs 0 '
|
fullscreen = '--fullscreen 0 '
|
||||||
|
|
||||||
if options.join_radio:
|
if options.join_radio:
|
||||||
if options.join_pass == '':
|
if options.join_pass == '':
|
||||||
netpass = ''
|
netpass = ''
|
||||||
else:
|
else:
|
||||||
netpass = '-netpassword ' + '"' + options.join_pass + '" '
|
netpass = '--pass ' + '"' + options.join_pass + '" '
|
||||||
network = '-connect "' + options.join_add + '"'\
|
network = '-net "' + options.join_add + '"'\
|
||||||
' -netport '+ str(options.join_port) + ' ' + netpass
|
' --port '+ str(options.join_port) + ' ' + netpass
|
||||||
else:
|
else:
|
||||||
network = ''
|
network = ''
|
||||||
|
|
||||||
|
@ -252,8 +252,8 @@ def launch(passed, local=False):
|
||||||
if options.host_pass == '':
|
if options.host_pass == '':
|
||||||
netpass = ' '
|
netpass = ' '
|
||||||
else:
|
else:
|
||||||
netpass = ' -netpassword ' + '"' + options.host_pass + '" '
|
netpass = ' --pass ' + '"' + options.host_pass + '" '
|
||||||
network = '-connect localhost -netport '+\
|
network = '--net localhost --port '+\
|
||||||
str(options.host_port) + netpass + ' '
|
str(options.host_port) + netpass + ' '
|
||||||
|
|
||||||
|
|
||||||
|
@ -261,11 +261,11 @@ def launch(passed, local=False):
|
||||||
network = ''
|
network = ''
|
||||||
|
|
||||||
if options.opengl_check:
|
if options.opengl_check:
|
||||||
opengl = '-opengl 1 '
|
opengl = '--opengl 1 '
|
||||||
else:
|
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
|
network + opengl + options.extra_entry + ' '+ passed
|
||||||
gfceu_message('Command: ' + command)
|
gfceu_message('Command: ' + command)
|
||||||
|
|
||||||
|
@ -297,7 +297,8 @@ def launch(passed, local=False):
|
||||||
os.kill(pid, 9)
|
os.kill(pid, 9)
|
||||||
widgets['main_window'].show()
|
widgets['main_window'].show()
|
||||||
|
|
||||||
def find_binary(this_binary):
|
def find_binary(file):
|
||||||
|
|
||||||
path = os.getenv('PATH')
|
path = os.getenv('PATH')
|
||||||
directories= []
|
directories= []
|
||||||
directory = ''
|
directory = ''
|
||||||
|
@ -310,11 +311,11 @@ def find_binary(this_binary):
|
||||||
directory = ''
|
directory = ''
|
||||||
|
|
||||||
for x in directories:
|
for x in directories:
|
||||||
if os.path.isfile(os.path.join(x, this_binary)):
|
if os.path.isfile(os.path.join(x, file)):
|
||||||
return os.path.join(x,this_binary)
|
return os.path.join(x,file)
|
||||||
|
|
||||||
if os.path.isfile(os.path.join(os.curdir,this_binary)):
|
if os.path.isfile(os.path.join(os.curdir,file)):
|
||||||
return os.path.join(os.curdir, this_binary)
|
return os.path.join(os.curdir, file)
|
||||||
|
|
||||||
return None
|
return None
|
||||||
|
|
||||||
|
@ -487,7 +488,6 @@ appconfigdir = os.getenv('HOME') + '/.gfceu'
|
||||||
old_optionsfile = os.getenv('HOME')+'/.gfceu_options'
|
old_optionsfile = os.getenv('HOME')+'/.gfceu_options'
|
||||||
optionsfile = appconfigdir + 'gfceu_options.dat'
|
optionsfile = appconfigdir + 'gfceu_options.dat'
|
||||||
fceu_binary = None
|
fceu_binary = None
|
||||||
aoss_binary = None
|
|
||||||
fceu_server_binary = None
|
fceu_server_binary = None
|
||||||
#version is defined earlier in the code
|
#version is defined earlier in the code
|
||||||
#have_vfs is defined earlier in the code
|
#have_vfs is defined earlier in the code
|
||||||
|
@ -521,7 +521,7 @@ if __name__ == '__main__':
|
||||||
parser = OptionParser(version='%prog '+ version)
|
parser = OptionParser(version='%prog '+ version)
|
||||||
parser.parse_args()
|
parser.parse_args()
|
||||||
|
|
||||||
fceu_binary = find_binary('fceu')
|
fceu_binary = find_binary('fceux')
|
||||||
if fceu_binary == None:
|
if fceu_binary == None:
|
||||||
gfceu_error('Could not find the fceu binary.\n\
|
gfceu_error('Could not find the fceu binary.\n\
|
||||||
Ensure that FCE Ultra is installed and in the $PATH.\n\
|
Ensure that FCE Ultra is installed and in the $PATH.\n\
|
||||||
|
@ -529,12 +529,6 @@ if __name__ == '__main__':
|
||||||
sudo apt-get install fceu', 4, True)
|
sudo apt-get install fceu', 4, True)
|
||||||
else:
|
else:
|
||||||
gfceu_message('Using: '+fceu_binary)
|
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 = WidgetsWrapper()
|
||||||
widgets['main_window'].show_all()
|
widgets['main_window'].show_all()
|
||||||
|
|
214
gfceu.glade
214
gfceu.glade
|
@ -68,20 +68,7 @@
|
||||||
</packing>
|
</packing>
|
||||||
</child>
|
</child>
|
||||||
<child>
|
<child>
|
||||||
<widget class="GtkCheckButton" id="sound_check">
|
<placeholder/>
|
||||||
<property name="visible">True</property>
|
|
||||||
<property name="can_focus">True</property>
|
|
||||||
<property name="label" translatable="yes">Enable _Sound</property>
|
|
||||||
<property name="use_underline">True</property>
|
|
||||||
<property name="response_id">0</property>
|
|
||||||
<property name="active">True</property>
|
|
||||||
<property name="draw_indicator">True</property>
|
|
||||||
</widget>
|
|
||||||
<packing>
|
|
||||||
<property name="expand">False</property>
|
|
||||||
<property name="fill">False</property>
|
|
||||||
<property name="position">1</property>
|
|
||||||
</packing>
|
|
||||||
</child>
|
</child>
|
||||||
</widget>
|
</widget>
|
||||||
</child>
|
</child>
|
||||||
|
@ -140,17 +127,30 @@
|
||||||
<property name="column_spacing">5</property>
|
<property name="column_spacing">5</property>
|
||||||
<property name="row_spacing">5</property>
|
<property name="row_spacing">5</property>
|
||||||
<child>
|
<child>
|
||||||
<widget class="GtkButton" id="gp3_button">
|
<widget class="GtkButton" id="gp1_button">
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
<property name="can_focus">True</property>
|
<property name="can_focus">True</property>
|
||||||
<property name="label" translatable="yes">Gamepad _3</property>
|
<property name="label" translatable="yes">Gamepad _1</property>
|
||||||
<property name="use_underline">True</property>
|
<property name="use_underline">True</property>
|
||||||
<property name="response_id">0</property>
|
<property name="response_id">0</property>
|
||||||
<signal name="clicked" handler="gamepad_clicked" after="yes"/>
|
<signal name="clicked" handler="gamepad_clicked" after="yes"/>
|
||||||
</widget>
|
</widget>
|
||||||
<packing>
|
<packing>
|
||||||
<property name="top_attach">1</property>
|
<property name="y_options"></property>
|
||||||
<property name="bottom_attach">2</property>
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<widget class="GtkButton" id="gp2_button">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can_focus">True</property>
|
||||||
|
<property name="label" translatable="yes">Gamepad _2</property>
|
||||||
|
<property name="use_underline">True</property>
|
||||||
|
<property name="response_id">0</property>
|
||||||
|
<signal name="clicked" handler="gamepad_clicked" after="yes"/>
|
||||||
|
</widget>
|
||||||
|
<packing>
|
||||||
|
<property name="left_attach">1</property>
|
||||||
|
<property name="right_attach">2</property>
|
||||||
<property name="y_options"></property>
|
<property name="y_options"></property>
|
||||||
</packing>
|
</packing>
|
||||||
</child>
|
</child>
|
||||||
|
@ -172,30 +172,17 @@
|
||||||
</packing>
|
</packing>
|
||||||
</child>
|
</child>
|
||||||
<child>
|
<child>
|
||||||
<widget class="GtkButton" id="gp2_button">
|
<widget class="GtkButton" id="gp3_button">
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
<property name="can_focus">True</property>
|
<property name="can_focus">True</property>
|
||||||
<property name="label" translatable="yes">Gamepad _2</property>
|
<property name="label" translatable="yes">Gamepad _3</property>
|
||||||
<property name="use_underline">True</property>
|
|
||||||
<property name="response_id">0</property>
|
|
||||||
<signal name="clicked" handler="gamepad_clicked" after="yes"/>
|
|
||||||
</widget>
|
|
||||||
<packing>
|
|
||||||
<property name="left_attach">1</property>
|
|
||||||
<property name="right_attach">2</property>
|
|
||||||
<property name="y_options"></property>
|
|
||||||
</packing>
|
|
||||||
</child>
|
|
||||||
<child>
|
|
||||||
<widget class="GtkButton" id="gp1_button">
|
|
||||||
<property name="visible">True</property>
|
|
||||||
<property name="can_focus">True</property>
|
|
||||||
<property name="label" translatable="yes">Gamepad _1</property>
|
|
||||||
<property name="use_underline">True</property>
|
<property name="use_underline">True</property>
|
||||||
<property name="response_id">0</property>
|
<property name="response_id">0</property>
|
||||||
<signal name="clicked" handler="gamepad_clicked" after="yes"/>
|
<signal name="clicked" handler="gamepad_clicked" after="yes"/>
|
||||||
</widget>
|
</widget>
|
||||||
<packing>
|
<packing>
|
||||||
|
<property name="top_attach">1</property>
|
||||||
|
<property name="bottom_attach">2</property>
|
||||||
<property name="y_options"></property>
|
<property name="y_options"></property>
|
||||||
</packing>
|
</packing>
|
||||||
</child>
|
</child>
|
||||||
|
@ -424,28 +411,13 @@ Invalid options may cause GFCE Ultra to perform incorrectly.
|
||||||
<property name="column_spacing">5</property>
|
<property name="column_spacing">5</property>
|
||||||
<property name="row_spacing">5</property>
|
<property name="row_spacing">5</property>
|
||||||
<child>
|
<child>
|
||||||
<widget class="GtkEntry" id="host_pass">
|
<widget class="GtkLabel" id="label19">
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
<property name="can_focus">True</property>
|
<property name="xalign">0</property>
|
||||||
|
<property name="label" translatable="yes">Port:</property>
|
||||||
</widget>
|
</widget>
|
||||||
<packing>
|
<packing>
|
||||||
<property name="left_attach">1</property>
|
<property name="x_options">GTK_FILL</property>
|
||||||
<property name="right_attach">2</property>
|
|
||||||
<property name="top_attach">1</property>
|
|
||||||
<property name="bottom_attach">2</property>
|
|
||||||
<property name="y_options"></property>
|
|
||||||
</packing>
|
|
||||||
</child>
|
|
||||||
<child>
|
|
||||||
<widget class="GtkSpinButton" id="host_port">
|
|
||||||
<property name="visible">True</property>
|
|
||||||
<property name="can_focus">True</property>
|
|
||||||
<property name="adjustment">4046 1 65536 1 10 10</property>
|
|
||||||
<property name="climb_rate">1</property>
|
|
||||||
</widget>
|
|
||||||
<packing>
|
|
||||||
<property name="left_attach">1</property>
|
|
||||||
<property name="right_attach">2</property>
|
|
||||||
<property name="y_options"></property>
|
<property name="y_options"></property>
|
||||||
</packing>
|
</packing>
|
||||||
</child>
|
</child>
|
||||||
|
@ -463,13 +435,28 @@ Invalid options may cause GFCE Ultra to perform incorrectly.
|
||||||
</packing>
|
</packing>
|
||||||
</child>
|
</child>
|
||||||
<child>
|
<child>
|
||||||
<widget class="GtkLabel" id="label19">
|
<widget class="GtkSpinButton" id="host_port">
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
<property name="xalign">0</property>
|
<property name="can_focus">True</property>
|
||||||
<property name="label" translatable="yes">Port:</property>
|
<property name="adjustment">4046 1 65536 1 10 10</property>
|
||||||
|
<property name="climb_rate">1</property>
|
||||||
</widget>
|
</widget>
|
||||||
<packing>
|
<packing>
|
||||||
<property name="x_options">GTK_FILL</property>
|
<property name="left_attach">1</property>
|
||||||
|
<property name="right_attach">2</property>
|
||||||
|
<property name="y_options"></property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<widget class="GtkEntry" id="host_pass">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can_focus">True</property>
|
||||||
|
</widget>
|
||||||
|
<packing>
|
||||||
|
<property name="left_attach">1</property>
|
||||||
|
<property name="right_attach">2</property>
|
||||||
|
<property name="top_attach">1</property>
|
||||||
|
<property name="bottom_attach">2</property>
|
||||||
<property name="y_options"></property>
|
<property name="y_options"></property>
|
||||||
</packing>
|
</packing>
|
||||||
</child>
|
</child>
|
||||||
|
@ -521,54 +508,13 @@ Invalid options may cause GFCE Ultra to perform incorrectly.
|
||||||
<property name="column_spacing">3</property>
|
<property name="column_spacing">3</property>
|
||||||
<property name="row_spacing">5</property>
|
<property name="row_spacing">5</property>
|
||||||
<child>
|
<child>
|
||||||
<widget class="GtkSpinButton" id="join_port">
|
<widget class="GtkEntry" id="join_add">
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
<property name="can_focus">True</property>
|
<property name="can_focus">True</property>
|
||||||
<property name="adjustment">4046 1 65536 1 10 10</property>
|
|
||||||
<property name="climb_rate">1</property>
|
|
||||||
</widget>
|
</widget>
|
||||||
<packing>
|
<packing>
|
||||||
<property name="left_attach">1</property>
|
<property name="left_attach">1</property>
|
||||||
<property name="right_attach">2</property>
|
<property name="right_attach">2</property>
|
||||||
<property name="top_attach">1</property>
|
|
||||||
<property name="bottom_attach">2</property>
|
|
||||||
<property name="y_options"></property>
|
|
||||||
</packing>
|
|
||||||
</child>
|
|
||||||
<child>
|
|
||||||
<widget class="GtkLabel" id="label17">
|
|
||||||
<property name="visible">True</property>
|
|
||||||
<property name="xalign">0</property>
|
|
||||||
<property name="label" translatable="yes">Password:</property>
|
|
||||||
</widget>
|
|
||||||
<packing>
|
|
||||||
<property name="top_attach">2</property>
|
|
||||||
<property name="bottom_attach">3</property>
|
|
||||||
<property name="x_options">GTK_FILL</property>
|
|
||||||
<property name="y_options"></property>
|
|
||||||
</packing>
|
|
||||||
</child>
|
|
||||||
<child>
|
|
||||||
<widget class="GtkLabel" id="label16">
|
|
||||||
<property name="visible">True</property>
|
|
||||||
<property name="xalign">0</property>
|
|
||||||
<property name="label" translatable="yes">Server Port:</property>
|
|
||||||
</widget>
|
|
||||||
<packing>
|
|
||||||
<property name="top_attach">1</property>
|
|
||||||
<property name="bottom_attach">2</property>
|
|
||||||
<property name="x_options">GTK_FILL</property>
|
|
||||||
<property name="y_options"></property>
|
|
||||||
</packing>
|
|
||||||
</child>
|
|
||||||
<child>
|
|
||||||
<widget class="GtkLabel" id="label15">
|
|
||||||
<property name="visible">True</property>
|
|
||||||
<property name="xalign">0</property>
|
|
||||||
<property name="label" translatable="yes">Server Address:</property>
|
|
||||||
</widget>
|
|
||||||
<packing>
|
|
||||||
<property name="x_options">GTK_FILL</property>
|
|
||||||
<property name="y_options"></property>
|
<property name="y_options"></property>
|
||||||
</packing>
|
</packing>
|
||||||
</child>
|
</child>
|
||||||
|
@ -588,13 +534,54 @@ Invalid options may cause GFCE Ultra to perform incorrectly.
|
||||||
</packing>
|
</packing>
|
||||||
</child>
|
</child>
|
||||||
<child>
|
<child>
|
||||||
<widget class="GtkEntry" id="join_add">
|
<widget class="GtkLabel" id="label15">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="xalign">0</property>
|
||||||
|
<property name="label" translatable="yes">Server Address:</property>
|
||||||
|
</widget>
|
||||||
|
<packing>
|
||||||
|
<property name="x_options">GTK_FILL</property>
|
||||||
|
<property name="y_options"></property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<widget class="GtkLabel" id="label16">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="xalign">0</property>
|
||||||
|
<property name="label" translatable="yes">Server Port:</property>
|
||||||
|
</widget>
|
||||||
|
<packing>
|
||||||
|
<property name="top_attach">1</property>
|
||||||
|
<property name="bottom_attach">2</property>
|
||||||
|
<property name="x_options">GTK_FILL</property>
|
||||||
|
<property name="y_options"></property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<widget class="GtkLabel" id="label17">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="xalign">0</property>
|
||||||
|
<property name="label" translatable="yes">Password:</property>
|
||||||
|
</widget>
|
||||||
|
<packing>
|
||||||
|
<property name="top_attach">2</property>
|
||||||
|
<property name="bottom_attach">3</property>
|
||||||
|
<property name="x_options">GTK_FILL</property>
|
||||||
|
<property name="y_options"></property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<widget class="GtkSpinButton" id="join_port">
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
<property name="can_focus">True</property>
|
<property name="can_focus">True</property>
|
||||||
|
<property name="adjustment">4046 1 65536 1 10 10</property>
|
||||||
|
<property name="climb_rate">1</property>
|
||||||
</widget>
|
</widget>
|
||||||
<packing>
|
<packing>
|
||||||
<property name="left_attach">1</property>
|
<property name="left_attach">1</property>
|
||||||
<property name="right_attach">2</property>
|
<property name="right_attach">2</property>
|
||||||
|
<property name="top_attach">1</property>
|
||||||
|
<property name="bottom_attach">2</property>
|
||||||
<property name="y_options"></property>
|
<property name="y_options"></property>
|
||||||
</packing>
|
</packing>
|
||||||
</child>
|
</child>
|
||||||
|
@ -643,6 +630,31 @@ Invalid options may cause GFCE Ultra to perform incorrectly.
|
||||||
<property name="tab_fill">False</property>
|
<property name="tab_fill">False</property>
|
||||||
</packing>
|
</packing>
|
||||||
</child>
|
</child>
|
||||||
|
<child>
|
||||||
|
<widget class="GtkCheckButton" id="sound_check">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can_focus">True</property>
|
||||||
|
<property name="label" translatable="yes">Enable _Sound</property>
|
||||||
|
<property name="use_underline">True</property>
|
||||||
|
<property name="response_id">0</property>
|
||||||
|
<property name="active">True</property>
|
||||||
|
<property name="draw_indicator">True</property>
|
||||||
|
</widget>
|
||||||
|
<packing>
|
||||||
|
<property name="position">5</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<widget class="GtkLabel" id="label1">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="label" translatable="yes">Sound</property>
|
||||||
|
</widget>
|
||||||
|
<packing>
|
||||||
|
<property name="type">tab</property>
|
||||||
|
<property name="position">5</property>
|
||||||
|
<property name="tab_fill">False</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
</widget>
|
</widget>
|
||||||
<packing>
|
<packing>
|
||||||
<property name="padding">10</property>
|
<property name="padding">10</property>
|
||||||
|
|
Loading…
Reference in New Issue