Add support for Dr.Mingw
This commit is contained in:
parent
d4d3d84d8c
commit
5ebb016544
@ -74,6 +74,10 @@
|
|||||||
#include <shellapi.h> // console
|
#include <shellapi.h> // console
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef HAVE_DRMINGW
|
||||||
|
#include <exchndl.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef WAF_BUILD
|
#ifdef WAF_BUILD
|
||||||
#include "gtk2ardour-version.h"
|
#include "gtk2ardour-version.h"
|
||||||
#endif
|
#endif
|
||||||
@ -336,6 +340,23 @@ int main (int argc, char *argv[])
|
|||||||
<< endl;
|
<< 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)) {
|
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;
|
error << string_compose (_("could not initialize %1."), PROGRAM_NAME) << endmsg;
|
||||||
Gtk::Main main (argc, argv);
|
Gtk::Main main (argc, argv);
|
||||||
|
@ -663,6 +663,7 @@ def build(bld):
|
|||||||
elif bld.env['build_target'] == 'mingw':
|
elif bld.env['build_target'] == 'mingw':
|
||||||
obj.source += [ 'bundle_env_mingw.cc' ]
|
obj.source += [ 'bundle_env_mingw.cc' ]
|
||||||
obj.source += [ 'windows_icon.rc' ]
|
obj.source += [ 'windows_icon.rc' ]
|
||||||
|
obj.uselib += ' DRMINGW '
|
||||||
else:
|
else:
|
||||||
obj.source += [ 'bundle_env_linux.cc' ]
|
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
|
mkdir -p $DESTDIR/lib/gtk-2.0/engines
|
||||||
cp build/libs/clearlooks-newer/clearlooks.dll $DESTDIR/lib/gtk-2.0/engines/libclearlooks.la
|
cp build/libs/clearlooks-newer/clearlooks.dll $DESTDIR/lib/gtk-2.0/engines/libclearlooks.la
|
||||||
|
|
||||||
cp $PREFIX/bin/*dll $DESTDIR/bin/
|
cp $PREFIX/bin/*.dll $DESTDIR/bin/
|
||||||
cp $PREFIX/lib/*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
|
# 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
|
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
|
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 ~)')
|
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',
|
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]')
|
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',
|
opt.add_option('--fpu-optimization', action='store_true', default=True, dest='fpu_optimization',
|
||||||
help='Build runtime checked assembler code (default)')
|
help='Build runtime checked assembler code (default)')
|
||||||
opt.add_option('--no-fpu-optimization', action='store_false', dest='fpu_optimization')
|
opt.add_option('--no-fpu-optimization', action='store_false', dest='fpu_optimization')
|
||||||
@ -1212,6 +1215,9 @@ int main () { return 0; }
|
|||||||
else:
|
else:
|
||||||
conf.define ('EXPORT_VISIBILITY_HIDDEN', False)
|
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
|
# Set up waf environment and C defines
|
||||||
if opts.phone_home:
|
if opts.phone_home:
|
||||||
conf.define('PHONE_HOME', 1)
|
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 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('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('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('FLAC', conf.is_defined('HAVE_FLAC'))
|
||||||
write_config_text('FPU optimization', opts.fpu_optimization)
|
write_config_text('FPU optimization', opts.fpu_optimization)
|
||||||
write_config_text('Freedesktop files', opts.freedesktop)
|
write_config_text('Freedesktop files', opts.freedesktop)
|
||||||
|
Loading…
Reference in New Issue
Block a user