… | |
… | |
17 | die if $@; |
17 | die if $@; |
18 | } |
18 | } |
19 | |
19 | |
20 | use common::sense; |
20 | use common::sense; |
21 | use Carp 'verbose'; |
21 | use Carp 'verbose'; |
|
|
22 | use Cwd (); |
22 | use EV; |
23 | use EV; |
23 | BEGIN { *time = \&EV::time } |
24 | BEGIN { *time = \&EV::time } |
24 | |
25 | |
25 | use List::Util qw(max min); |
26 | use List::Util qw(max min); |
26 | |
27 | |
… | |
… | |
40 | # nop at compiletime |
41 | # nop at compiletime |
41 | } |
42 | } |
42 | |
43 | |
43 | BEGIN { |
44 | BEGIN { |
44 | $SIG{__DIE__} = sub { |
45 | $SIG{__DIE__} = sub { |
45 | return if $^S; |
46 | return if $^S; # quick reject |
|
|
47 | |
|
|
48 | # return if there are any eval contexts in the csall stack |
|
|
49 | for my $i (0..999) { |
|
|
50 | my ($sub, $is_require) = (caller $i)[3, 7] |
|
|
51 | or last; |
|
|
52 | return if $sub eq "(eval)" && !$is_require; |
|
|
53 | } |
|
|
54 | |
46 | crash "CRASH/DIE: $_[0]" => 1; |
55 | crash "CRASH/DIE: $_[0]" => 1; |
47 | DC::fatal Carp::longmess "$_[0]"; |
56 | DC::fatal Carp::longmess "$_[0]"; |
48 | } |
57 | } |
49 | } |
58 | } |
50 | |
59 | |
… | |
… | |
1131 | text => $CFG->{audio_driver}, |
1140 | text => $CFG->{audio_driver}, |
1132 | template => "dsound1234", |
1141 | template => "dsound1234", |
1133 | tooltip => "You can override the audio driver to use here. Leaving it empty will result " |
1142 | tooltip => "You can override the audio driver to use here. Leaving it empty will result " |
1134 | . "in Deliantra picking one automatically. GNU/Linux users often prefer specific " |
1143 | . "in Deliantra picking one automatically. GNU/Linux users often prefer specific " |
1135 | . "drivers though, and can experiment with <b>alsa</b>, <b>dsp</b>, <b>esd</b>, <b>pulse</b>, <b>arts</b>, <b>nas</b> " |
1144 | . "drivers though, and can experiment with <b>alsa</b>, <b>dsp</b>, <b>esd</b>, <b>pulse</b>, <b>arts</b>, <b>nas</b> " |
1136 | . "or other system-specific drivers. Selecting the wrong driver here will simply result" |
1145 | . "or other system-specific drivers. Selecting the wrong driver here will simply result " |
1137 | . "in no sound.", |
1146 | . "in no sound.", |
1138 | on_changed => sub { my ($self, $value) = @_; $CFG->{audio_driver} = $value; 1 } |
1147 | on_changed => sub { my ($self, $value) = @_; $CFG->{audio_driver} = $value; 1 } |
1139 | ); |
1148 | ); |
1140 | |
1149 | |
1141 | $table->add_at (0, $row, new DC::UI::Label align => 1, text => "Sound Effects"); |
1150 | $table->add_at (0, $row, new DC::UI::Label align => 1, text => "Sound Effects"); |
… | |
… | |
1841 | |
1850 | |
1842 | $table->add_at (0, $row , new DC::UI::Label align => 1, text => "Data Directory"); |
1851 | $table->add_at (0, $row , new DC::UI::Label align => 1, text => "Data Directory"); |
1843 | $table->add_at (1, $row++, new DC::UI::Label align => 0, text => $Deliantra::VARDIR, tooltip => ""); |
1852 | $table->add_at (1, $row++, new DC::UI::Label align => 0, text => $Deliantra::VARDIR, tooltip => ""); |
1844 | $table->add_at (0, $row , new DC::UI::Label align => 1, text => "Database Directory"); |
1853 | $table->add_at (0, $row , new DC::UI::Label align => 1, text => "Database Directory"); |
1845 | $table->add_at (1, $row++, new DC::UI::Label align => 0, text => $DC::DB::DBDIR, tooltip => ""); |
1854 | $table->add_at (1, $row++, new DC::UI::Label align => 0, text => $DC::DB::DBDIR, tooltip => ""); |
|
|
1855 | $table->add_at (0, $row , new DC::UI::Label align => 1, text => "Urlader (Prebuilt)"); |
|
|
1856 | $table->add_at (1, $row++, new DC::UI::Label align => 0, text => $ENV{URLADER_VERSION}, tooltip => ""); |
1846 | $table->add_at (0, $row , new DC::UI::Label align => 1, text => "Branch (Prebuilt)"); |
1857 | $table->add_at (0, $row , new DC::UI::Label align => 1, text => "Branch (Prebuilt)"); |
1847 | $table->add_at (1, $row++, new DC::UI::Label align => 0, text => $::EXE_ID, tooltip => ""); |
1858 | $table->add_at (1, $row++, new DC::UI::Label align => 0, text => $ENV{URLADER_EXE_ID}, tooltip => ""); |
1848 | $table->add_at (0, $row , new DC::UI::Label align => 1, text => "Version (Prebuilt)"); |
1859 | $table->add_at (0, $row , new DC::UI::Label align => 1, text => "Version (Prebuilt)"); |
1849 | $table->add_at (1, $row++, new DC::UI::Label align => 0, text => $::EXE_VER, tooltip => ""); |
1860 | $table->add_at (1, $row++, new DC::UI::Label align => 0, text => $ENV{URLADER_EXE_VER}, tooltip => ""); |
1850 | $table->add_at (0, $row , new DC::UI::Label align => 1, text => "Update (Prebuilt)"); |
|
|
1851 | $table->add_at (1, $row++, new DC::UI::Label align => 0, text => $::UPDPAR, tooltip => ""); |
|
|
1852 | } |
1861 | } |
1853 | |
1862 | |
1854 | $vbox |
1863 | $vbox |
1855 | } |
1864 | } |
1856 | |
1865 | |
… | |
… | |
2838 | }; |
2847 | }; |
2839 | } |
2848 | } |
2840 | } |
2849 | } |
2841 | } |
2850 | } |
2842 | |
2851 | |
|
|
2852 | # fontconfig doesn't support relative paths anymore, so use abs_path and keep fingers crossed |
|
|
2853 | # these are ignored under windows, for some reason, and thus set in the loader |
2843 | $ENV{FONTCONFIG_FILE} = DC::find_rcfile "fonts/fonts.conf"; |
2854 | $ENV{FONTCONFIG_FILE} = "fonts.conf"; |
2844 | $ENV{FONTCONFIG_DIR} = DC::find_rcfile "fonts"; |
2855 | $ENV{FONTCONFIG_PATH} = Cwd::abs_path DC::find_rcfile "fonts"; |
|
|
2856 | $ENV{FONTCONFIG_DIR} = $ENV{FONTCONFIG_PATH}; # helps with older versions |
2845 | |
2857 | |
2846 | { |
2858 | { |
2847 | my @fonts = map DC::find_rcfile "fonts/$_", qw( |
2859 | my @fonts = map DC::find_rcfile "fonts/$_", qw( |
2848 | DejaVuSans.ttf |
2860 | DejaVuSans.ttf |
2849 | DejaVuSansMono.ttf |
2861 | DejaVuSansMono.ttf |