Add support for Dr.Mingw
This commit is contained in:
parent
d4d3d84d8c
commit
5ebb016544
@ -74,6 +74,10 @@
|
||||
#include <shellapi.h> // console
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_DRMINGW
|
||||
#include <exchndl.h>
|
||||
#endif
|
||||
|
||||
#ifdef WAF_BUILD
|
||||
#include "gtk2ardour-version.h"
|
||||
#endif
|
||||
@ -336,6 +340,23 @@ int main (int argc, char *argv[])
|
||||
<< endl;
|
||||
}
|
||||
|
||||
#ifdef HAVE_DRMINGW
|
||||
if (true) {
|
||||
Glib::DateTime tm (g_date_time_new_now_local ());
|
||||
string crash_dir = Glib::get_home_dir();
|
||||
if (crash_dir.empty ()) {
|
||||
crash_dir = Glib::get_user_data_dir ();
|
||||
}
|
||||
|
||||
string crash_file = string_compose ("%1-crash-%2.txt", PROGRAM_NAME, tm.format ("%s"));
|
||||
string crash_path = Glib::build_filename (crash_dir, crash_file);
|
||||
|
||||
ExcHndlInit ();
|
||||
ExcHndlSetLogFileNameA (crash_path.c_str());
|
||||
cout << "Crash Log: " << crash_path << endl;
|
||||
}
|
||||
#endif
|
||||
|
||||
if (!ARDOUR::init (ARDOUR_COMMAND_LINE::use_vst, ARDOUR_COMMAND_LINE::try_hw_optimization, localedir.c_str(), true)) {
|
||||
error << string_compose (_("could not initialize %1."), PROGRAM_NAME) << endmsg;
|
||||
Gtk::Main main (argc, argv);
|
||||
|
@ -663,6 +663,7 @@ def build(bld):
|
||||
elif bld.env['build_target'] == 'mingw':
|
||||
obj.source += [ 'bundle_env_mingw.cc' ]
|
||||
obj.source += [ 'windows_icon.rc' ]
|
||||
obj.uselib += ' DRMINGW '
|
||||
else:
|
||||
obj.source += [ 'bundle_env_linux.cc' ]
|
||||
|
||||
|
@ -154,8 +154,9 @@ cp `ls -t build/gtk2_ardour/ardour-*.exe | head -n1` $DESTDIR/bin/${PRODUCT_EXE}
|
||||
mkdir -p $DESTDIR/lib/gtk-2.0/engines
|
||||
cp build/libs/clearlooks-newer/clearlooks.dll $DESTDIR/lib/gtk-2.0/engines/libclearlooks.la
|
||||
|
||||
cp $PREFIX/bin/*dll $DESTDIR/bin/
|
||||
cp $PREFIX/lib/*dll $DESTDIR/bin/
|
||||
cp $PREFIX/bin/*.dll $DESTDIR/bin/
|
||||
cp $PREFIX/bin/*.yes $DESTDIR/bin/ || true
|
||||
cp $PREFIX/lib/*.dll $DESTDIR/bin/
|
||||
# special case libportaudio (wasapi), old stack has no wasapi and hence no .xp
|
||||
cp $PREFIX/bin/libportaudio-2.xp $DESTDIR/bin/ || cp $PREFIX/bin/libportaudio-2.dll $DESTDIR/bin/libportaudio-2.xp
|
||||
rm -rf $DESTDIR/bin/libjack*.dll
|
||||
|
7
wscript
7
wscript
@ -773,6 +773,9 @@ def options(opt):
|
||||
help='Directory/folder where dependency stack trees (gtk, a3) can be found (defaults to ~)')
|
||||
opt.add_option('--dist-target', type='string', default='auto', dest='dist_target',
|
||||
help='Specify the target for cross-compiling [auto,none,x86,i386,i686,x86_64,tiger,leopard,mingw,msvc]')
|
||||
opt.add_option('--dr-mingw', action='store_true', default=True, dest='drmingw',
|
||||
help='Write crashdumps using Dr.Mingw (Windows Only)')
|
||||
opt.add_option('--no-dr-mingw', action='store_true', dest='drmingw')
|
||||
opt.add_option('--fpu-optimization', action='store_true', default=True, dest='fpu_optimization',
|
||||
help='Build runtime checked assembler code (default)')
|
||||
opt.add_option('--no-fpu-optimization', action='store_false', dest='fpu_optimization')
|
||||
@ -1212,6 +1215,9 @@ int main () { return 0; }
|
||||
else:
|
||||
conf.define ('EXPORT_VISIBILITY_HIDDEN', False)
|
||||
|
||||
if Options.options.dist_target == 'mingw' and opts.drmingw:
|
||||
conf.check_cc (function_name='ExcHndlInit', define_name='HAVE_DRMINGW', header_name='exchndl.h', lib=['exchndl', 'mgwhelp'], mandatory=True, uselib_store='DRMINGW')
|
||||
|
||||
# Set up waf environment and C defines
|
||||
if opts.phone_home:
|
||||
conf.define('PHONE_HOME', 1)
|
||||
@ -1405,6 +1411,7 @@ const char* const ardour_config_info = "\\n\\
|
||||
write_config_text('Debug RT allocations', conf.is_defined('DEBUG_RT_ALLOC'))
|
||||
write_config_text('Debug Symbols', conf.is_defined('debug_symbols') or conf.env['DEBUG'])
|
||||
write_config_text('Denormal exceptions', conf.is_defined('DEBUG_DENORMAL_EXCEPTION'))
|
||||
write_config_text('Dr. Mingw', conf.is_defined('HAVE_DRMINGW'))
|
||||
write_config_text('FLAC', conf.is_defined('HAVE_FLAC'))
|
||||
write_config_text('FPU optimization', opts.fpu_optimization)
|
||||
write_config_text('Freedesktop files', opts.freedesktop)
|
||||
|
Loading…
Reference in New Issue
Block a user