Skip to content

Commit a8010b9

Browse files
committed
updated warpbuf to build on my windows machine & package for chump
1 parent 2284f96 commit a8010b9

File tree

2 files changed

+75
-4
lines changed

2 files changed

+75
-4
lines changed

WarpBuf/build-pkg-windows.ck

Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
@import "Chumpinate"
2+
3+
// Our package version
4+
"0.0.1" => string version;
5+
6+
<<< "Generating Chumpinate package version " >>>;
7+
8+
// instantiate a Chumpinate package
9+
Package pkg("WarpBuf");
10+
11+
// Add our metadata...
12+
"David Braun" => pkg.authors;
13+
14+
"https://github.com/ccrma/chugins" => pkg.homepage;
15+
"https://github.com/ccrma/chugins" => pkg.repository;
16+
17+
"MIT" => pkg.license;
18+
"A UGen for high-quality time-stretching and pitch-shifting of audio files; also supports Ableton .asd files" => pkg.description;
19+
20+
[ "util", "audio processing", "time-stretching", "pitch-shifting"] => pkg.keywords;
21+
22+
// generate a package-definition.json
23+
// This will be stored in "Chumpinate/package.json"
24+
"./" => pkg.generatePackageDefinition;
25+
26+
<<< "Defining version " + version >>>;;
27+
28+
// Now we need to define a specific PackageVersion for test-pkg
29+
PackageVersion ver("WarpBuf", version);
30+
31+
"10.2" => ver.apiVersion;
32+
33+
"1.5.4.0" => ver.languageVersionMin;
34+
35+
"windows" => ver.os;
36+
"x86_64" => ver.arch;
37+
38+
// The chugin file
39+
ver.addFile("build/Release/WarpBuf.chug");
40+
41+
// Our deps
42+
ver.addDepsFile("thirdparty/libsndfile-1.2.0-win64/bin/sndfile.dll");
43+
44+
// These build files are examples as well
45+
ver.addExampleFile("tests/warpbuf_no_warp_file.ck");
46+
ver.addExampleFile("tests/warpbuf_basic.ck");
47+
ver.addExampleFile("tests/warpbuf_silent.ck");
48+
ver.addExampleFile("tests/warpbuf_advanced.ck");
49+
ver.addExampleFile("tests/assets/381353__waveplaysfx__drumloop-120-bpm-edm-drum-loop-022_no_asd.wav", "assets");
50+
ver.addExampleFile("tests/assets/1375__sleep__90-bpm-nylon2.wav.asd", "assets");
51+
ver.addExampleFile("tests/assets/1375__sleep__90-bpm-nylon2.wav", "assets");
52+
ver.addExampleFile("tests/assets/381353__waveplaysfx__drumloop-120-bpm-edm-drum-loop-022.wav.asd", "assets");
53+
ver.addExampleFile("tests/assets/381353__waveplaysfx__drumloop-120-bpm-edm-drum-loop-022.wav", "assets");
54+
55+
// The version path
56+
"chugins/WarpBuf/" + ver.version() + "/" + ver.os() + "/WarpBuf.zip" => string path;
57+
58+
<<< path >>>;
59+
60+
// wrap up all our files into a zip file, and tell Chumpinate what URL
61+
// this zip file will be located at.
62+
ver.generateVersion("./", "WarpBuf_win", "https://ccrma.stanford.edu/~nshaheed/" + path);
63+
64+
chout <= "Use the following commands to upload the package to CCRMA's servers:" <= IO.newline();
65+
chout <= "ssh [email protected] \"mkdir -p ~/Library/Web/chugins/WarpBuf/"
66+
<= ver.version() <= "/" <= ver.os() <= "\"" <= IO.newline();
67+
chout <= "scp WarpBuf_win.zip [email protected]:~/Library/Web/" <= path <= IO.newline();
68+
69+
// Generate a version definition json file, stores this in "chumpinate/<VerNo>/Chumpinate_win.json"
70+
ver.generateVersionDefinition("WarpBuf_win", "./" );

WarpBuf/build_windows.bat

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,13 @@ if not exist "thirdparty/libsndfile-1.2.0-win64/" (
33
echo "Downloading libsndfile..."
44
cd thirdparty
55
curl -OL https://github.com/libsndfile/libsndfile/releases/download/1.2.0/libsndfile-1.2.0-win64.zip
6-
7z x libsndfile-1.2.0-win64.zip -y
7-
rm libsndfile-1.2.0-win64.zip
6+
rem 7z x libsndfile-1.2.0-win64.zip -y
7+
tar -xf libsndfile-1.2.0-win64.zip
8+
del /Q libsndfile-1.2.0-win64.zip
89
echo "Downloaded libsndfile."
910
cd ..
1011
)
1112

12-
cmake -Bbuild . -DCMAKE_VERBOSE_MAKEFILE=ON
13+
cmake -Bbuild . -DCMAKE_VERBOSE_MAKEFILE=ON -G "Visual Studio 17 2022" -A "x64"
1314
cmake --build build --config Release
14-
cmake --build build --config Release --target install
15+
rem cmake --build build --config Release --target install

0 commit comments

Comments
 (0)