Skip to content

Commit 8d73129

Browse files
committed
Updated readme file and ruby script
1 parent 32f9817 commit 8d73129

File tree

2 files changed

+24
-17
lines changed

2 files changed

+24
-17
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ Additional utility externals were written to provide functionality available as
2222
- [**windowvec~**](windowvec~) multiplies the incoming signal with a Hann window (raised cosine wave).
2323

2424
# Clone
25-
To clone this repository, run the following commands in the terminal:
25+
You can run the following commands in the terminal to clone this repository and to checkout the version of the Max and Pd SDKs that were used to build all the projects:
2626
```
2727
git clone https://github.com/juandagilc/DAO-MaxMSP-Pd.git
2828
cd DAO-MaxMSP-Pd/
@@ -34,7 +34,7 @@ The table below shows details about the tools that have been used to build and t
3434

3535
| Operating Systems | Built with | Tested on |
3636
|:--------------------------------------------------------------------:|:----------------------------:|:------------------------------------------------------:|
37-
| macOS Sierra 10.12.6 | Xcode 9.0 | Max 7.3.4 (32/64-bit<sup>2</sup>) & Pd-0.48-0 (32-bit) |
37+
| macOS Sierra 10.12.6 | Xcode 9.1 | Max 7.3.4 (32/64-bit<sup>2</sup>) & Pd-0.48-0 (32-bit) |
3838
| Windows 10 | Visual Studio Community 2015 | Max 7.3.4 (32/64-bit<sup>2</sup>) & Pd-0.48-0 (32-bit) |
3939
| Linux (Ubuntu MATE 16.04 LTS 32-bit) | GNU Make 4.1<sup>3</sup> | Pd-0.48-0 (32-bit) |
4040
| Linux (Debian GNU/Linux 7.4 (wheezy) on the BeagleBone Black + Bela) | GNU Make 3.81<sup>3</sup> | libpd 0.8.3 (armv7l) BeagleBone Black + Bela Cape |

build.rb

Lines changed: 22 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
$mac = (Object::RUBY_PLATFORM =~ /darwin/) ? true : false
66
$windows = (Object::RUBY_PLATFORM =~ /mingw/) ? true : false
77
$linux = (Object::RUBY_PLATFORM =~ /linux/) ? true : false
8+
$noargs = (ARGV.length == 0)
89

910
puts " "
1011

@@ -21,8 +22,8 @@ def build_externals(projects_folder)
2122

2223
result =
2324
`cd "#{projects_folder}";
24-
xcodebuild -scheme Max 2>&1;
25-
xcodebuild -scheme Pd ARCHS=i386 ONLY_ACTIVE_ARCH=NO 2>&1`
25+
xcodebuild -scheme Max -configuration Release 2>&1;
26+
xcodebuild -scheme Pd ARCHS=i386 ONLY_ACTIVE_ARCH=NO -configuration Release 2>&1`
2627

2728
if result.match(/\*\* BUILD SUCCEEDED \*\*/)
2829
puts "(success)"
@@ -73,40 +74,44 @@ def copy_files(projects_folder, externals_folder)
7374

7475
def copy_external(origin, destination)
7576
origin = Dir[origin]
76-
FileUtils.mkdir_p destination
7777
origin.each do |filename|
7878

79-
base = Pathname.new(filename).basename
80-
dest = "./" + destination + "/#{base}"
79+
file = Pathname.new(filename).basename
80+
project = Pathname.new(File.expand_path("../..", filename)).basename
81+
dest = "./" + destination + "/" + "#{project}"
8182

8283
if (File.exists? filename) &&
8384
(filename != dest) &&
8485
!filename.match(/.git/) &&
8586
!filename.match(/_COMMON_/) &&
86-
!filename.match(/_SDK_/)
87+
!filename.match(/_SDK_/) &&
88+
(Pathname.new(File.expand_path("..", filename)).basename.to_s == "Products")
8789

88-
puts "copying " + filename
89-
FileUtils.copy_file(filename, dest, remove_destination = true)
90+
FileUtils.mkdir_p dest
91+
puts "copying " + filename + " to " + dest + "/#{file}"
92+
FileUtils.copy_file(filename, dest + "/#{file}", remove_destination = true)
9093
end
9194
end
9295
end
9396

9497
def move_external(origin, destination)
9598
origin = Dir[origin]
96-
FileUtils.mkdir_p destination
9799
origin.each do |filename|
98100

99-
base = Pathname.new(filename).basename
100-
dest = "./" + destination + "/#{base}"
101+
file = Pathname.new(filename).basename
102+
project = Pathname.new(File.expand_path("../..", filename)).basename
103+
dest = "./" + destination + "/" + "#{project}"
101104

102105
if (File.exists? filename) &&
103106
(filename != dest) &&
104107
!filename.match(/.git/) &&
105108
!filename.match(/_COMMON_/) &&
106-
!filename.match(/_SDK_/)
109+
!filename.match(/_SDK_/) &&
110+
(Pathname.new(File.expand_path("..", filename)).basename.to_s == "Products")
107111

112+
FileUtils.mkdir_p dest
108113
puts "moving " + filename
109-
FileUtils.move(filename, dest)
114+
FileUtils.move(filename, dest + "/#{file}")
110115
end
111116
end
112117
end
@@ -131,8 +136,10 @@ def move_external(origin, destination)
131136
move_external("#{projects_folder}/**/*.pd_linux", "#{externals_folder}/Pd")
132137
move_external("#{projects_folder}/**/*.dll", "#{externals_folder}/Pd")
133138

134-
# remove pd patch for bela
135-
FileUtils.rm("#{externals_folder}/Pd/_main.pd")
139+
# remove pd patch for bela if not built for it
140+
if $noargs
141+
FileUtils.rm Dir.glob("#{externals_folder}/Pd/**/_main.pd")
142+
end
136143
end
137144

138145
def cleanup(projects_folder)

0 commit comments

Comments
 (0)