Commit graph

691 commits

Author SHA1 Message Date
Tim Mayberry
dbcc1f1d39 Rename PBD::find_file_in_search_path to just PBD::find_file
saves a bit of typing and not necessary if you look at how it is used.

Conflicts:
	gtk2_ardour/about.cc
	gtk2_ardour/session_dialog.cc
	libs/pbd/system_exec.cc
2014-08-17 18:36:02 -04:00
Tim Mayberry
093fb77b88 Use PBD::find_files_matching_pattern instead of other variations 2014-08-17 18:12:40 -04:00
Tim Mayberry
1a4fdf0b22 Add a variation of PBD::find_files_matching_pattern for convenience 2014-08-17 18:12:34 -04:00
Tim Mayberry
a6c2609068 Add new function PBD::find_files_matching_pattern
This new function is intended to replace the three existing
PBD::find_matching_files_* functions.

The order of parameters matches find_files_matching_regex and
find_files_matching_filter
2014-08-17 18:12:26 -04:00
Tim Mayberry
c126e8cc45 Change PBD::find_files_matching_regex and PBD::find_files_matching_filter to take a Searchpath 2014-08-17 18:12:19 -04:00
Tim Mayberry
ce36eee9ab Reimplement PBD::find_files_matching_filter using SearchPath and get_directory_contents 2014-08-17 18:12:14 -04:00
Tim Mayberry
9597f5468d Remove limit parameter from PBD::find_files_matching_regex
This limit was not used or documented. The same functionality can be
performed when iterating through the results.
2014-08-17 18:12:09 -04:00
Tim Mayberry
ef6d6816aa Remove parameters from PBD::find_files_matching_regex
The only users of this API always used the same options so just remove
them.
2014-08-17 18:12:04 -04:00
Tim Mayberry
4ffa970135 Change PBD::get_files_in_directory to return full paths in result
get_files_in_directory uses get_directory_contents internally now
2014-08-17 18:11:59 -04:00
Tim Mayberry
1e442feb53 Add PBD::get_directory_contents to pbd/file_utils.h 2014-08-17 18:11:52 -04:00
John Emmas
f80271b0df Remove (no longer needed) sources from an MSVC project 2014-08-17 16:24:56 -04:00
John Emmas
8d0e77a4d8 Move the definition for 'strtok_r' (to avoid clashing with a different definition in pthread_win32) 2014-08-17 16:24:48 -04:00
Tim Mayberry
9b0308a6aa Remove PathScanner class from libpbd 2014-08-17 15:32:50 -04:00
Tim Mayberry
10a6fe553e Replace all use of PathScanner with equivalent functions from pbd/file_utils.h 2014-08-17 15:32:42 -04:00
Tim Mayberry
2339fdc1aa Add default arguments to match those in PathScanner::operator() 2014-08-17 15:32:29 -04:00
Tim Mayberry
e75f227fe3 Move member functions from PathScanner to functions in pbd/file_utils.h
This allows us to remove PathScanner source file and keep PathScanner class
as header only until it is removed
2014-08-17 15:32:25 -04:00
Tim Mayberry
2334880bc9 Move PathScanner::operator() into header 2014-08-17 15:32:20 -04:00
Tim Mayberry
7974046301 Remove unused methods in PathScanner
Now that these methods are only a few lines it doesn't make much sense
to keep them seeing as they are unused. There are also functions with
near identical functionality in pbd/file_utils.h
2014-08-17 15:32:16 -04:00
Tim Mayberry
b2eb0d80be Rename PathScanner::run_scan_internal to PathScanner::find_files_matching_filter 2014-08-17 15:32:13 -04:00
Tim Mayberry
51fbb8a352 Remove PathScanner::run_scan and use PathScanner::run_scan_internal directly 2014-08-17 15:32:08 -04:00
Tim Mayberry
e5d4a16594 Add PathScanner::find_files_matching_regex and move regexp usage to one place 2014-08-17 15:32:01 -04:00
Tim Mayberry
144da83bc8 Remove member filter argument from PathScanner methods and use normal filter for regex
Also use regfree to free memory of compiled patterns
2014-08-17 15:31:56 -04:00
Tim Mayberry
ae22d60a42 Change PBD::PathScanner API to return results by value to avoid inadvertent memory leaks
Conflicts:
	gtk2_ardour/session_dialog.cc
2014-08-17 15:31:49 -04:00
Robin Gareus
0c7c8fdad4 plug some leaks 2014-08-17 15:28:36 -04:00
Robin Gareus
632e23de2c fix pathscanner / stl_vector related memory leaks
Conflicts:
	gtk2_ardour/session_dialog.cc
2014-08-17 15:27:45 -04:00
Robin Gareus
7804841022 tracking down concurrency issus is fun. 2014-08-17 15:26:16 -04:00
Colin Fletcher
f22f2bbb55 Search $PATH for command when creating SystemExec from command line
When creating a SystemExec from a command-line, search $PATH for the
command to execute, so that post-export hooks don't need to specify a full
path.

Conflicts:
	libs/pbd/system_exec.cc
2014-08-17 15:11:27 -04:00
Robin Gareus
d7a8c58aaa close dir opened with opendir() - fixes accumulated fd for plugin state saves 2014-08-17 15:00:34 -04:00
Paul Davis
c934033e23 manually jump forward state of system_exec files to avoid various cherry-picking-related problems during merge with ardour 2014-08-16 17:53:33 -04:00
Colin Fletcher
cba23cac6e remove debug output from system_exec
remove the debug output from pbd/system_exec: it's of no further use, and
also breaks optimised builds.
2014-08-16 16:59:56 -04:00
Colin Fletcher
c35659c2ad SystemExec: copy last argument from command line to argv[]
Make sure to copy any part of the command line after the last delimiter
to argv[] when creating a SystemExec with an escaped command line.

Conflicts:
	libs/pbd/system_exec.cc
2014-08-16 16:51:15 -04:00
Tim Mayberry
7debf24b8a Use COMPILER_MINGW define rather than __MINGW64__
This is necessary to build with win32 target using mingw-w64 version
on Fedora 19
2014-08-16 16:37:38 -04:00
Tim Mayberry
94759885e8 Reinstate code removed that allows building with mingw and the pthreads-win32 library
Newer versions of mingw-w64 can be built with an included pthread implementation
called winpthreads which uses an integer type for pthread_t but pthreads-win32 does
not.
2014-08-16 16:37:31 -04:00
Tim Mayberry
1b8703aa45 Always link to ole32 when building with mingw for get_win_special_folder
needed for CoTaskMemFree in get_win_special_folder
2014-08-16 16:37:20 -04:00
John Emmas
6dd4d411b3 Add a couple of pthread helper macros
(to accommodate the fact that in ptw-win32, 'pthread_t' is subtlely different from its non-Windows counterparts)

Conflicts:
	libs/pbd/MSVCpbd/pbd.vcproj
2014-08-16 16:34:17 -04:00
Paul Davis
937c0764be finish unfinished work at basing all install paths on the program name
Conflicts:
	libs/backends/jack/wscript
	libs/backends/wavesaudio/wscript
	libs/canvas/wscript
	wscript
2014-08-16 16:10:15 -04:00
Robin Gareus
12292f8055 close stdin as first attempt to terminate process cleanly. 2014-08-16 15:59:49 -04:00
Robin Gareus
4566975a5d fix SystemExec for windows 2014-08-16 15:59:31 -04:00
Colin Fletcher
f74ab3f21f Move system_exec from gtk2_ardour/ to libs/pbd/
Conflicts:
	gtk2_ardour/ardour_ui.cc
	gtk2_ardour/transcode_ffmpeg.h
	gtk2_ardour/video_monitor.h
	libs/pbd/system_exec.cc
2014-08-16 15:11:42 -04:00
Greg Zharun
108da32585 Added files to lib PBD Visual Studio project 2014-06-16 17:08:21 +03:00
Greg Zharun
d4f9416414 Added Visual Studio project for lib PBD 2014-06-16 17:03:49 +03:00
Grygorii Zharun
ce2a519afa [Summary] Merging from GIT
[Details] Starting point:
Mar 24 2014, 11:47 PM
Commit: 87184ab80d

Target point:
Commit: 59e6694405
Apr 16 2014, 4:01 PM

[git-p4: depot-paths = "//Abdaw/dev_main/tracks/": change = 453690]
2014-04-18 04:21:54 -05:00
Valeriy Kamyshniy
af1689c061 adding X attrib
[git-p4: depot-paths = "//Abdaw/dev_main/tracks/": change = 446420]
2014-03-26 10:03:30 -05:00
Valeriy Kamyshniy
5f335614a9 fixing minor problems
[git-p4: depot-paths = "//Abdaw/dev_main/tracks/": change = 446419]
2014-03-26 09:59:23 -05:00
Grygorii Zharun
f300eaba93 [Summary] Fixed MAC build
[Details] Added fixes to make the code cross platform compilable
[Reviewed by] N/A

[git-p4: depot-paths = "//Abdaw/dev_main/tracks/": change = 446294]
2014-03-26 06:31:34 -05:00
Paul Davis
22a692ba47 update images and Plist files from p4 446170 2014-05-28 07:47:36 -04:00
Paul Davis
f565e47e71 remove silly old MacOS directories 2014-05-28 07:47:14 -04:00
Valeriy Kamyshniy
f096bcdd5a [P4/git history rebuild] remove linkage requirement with ole32 (cost not documented by code change) 2014-05-27 23:01:28 -04:00
Valeriy Kamyshniy
7c82486a12 [P4/git history rebuild] fix taken from a later Ardour commit. Read comment for details. 2014-05-27 23:00:43 -04:00
Robin Gareus
543099afba rework SystemExec - use vfork wrapper (and lots of related stuff) 2014-03-13 16:58:07 +01:00