Skip to content

Commit

Permalink
[pd] fix generate pd help on windows
Browse files Browse the repository at this point in the history
  • Loading branch information
jcelerier committed Feb 25, 2024
1 parent b1f9c9a commit 64c3c77
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions examples/Demos/GeneratePdHelp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -594,10 +594,17 @@ void dump_message()

#include <fstream>
#include <iostream>
int main()
int main(int argc, char** argv)
{
if(argc < 2)
{
outfile = fopen("/tmp/build-debugmode-debugsyms-mold-shlib/pd/help.pd", "w");
fprintf(stderr, "Usage: generate_pd_help path/to/out_file.pd");
return 1;
}
auto path = argv[1];

{
outfile = fopen(path, "w");

//using type = examples::Lowpass;
using type = examples::helpers::Messages<halp::basic_logger>;
Expand All @@ -611,10 +618,6 @@ int main()

fclose(outfile);
}
::sync();

system("cat /tmp/build-debugmode-debugsyms-mold-shlib/pd/help.pd");
system("pd /tmp/build-debugmode-debugsyms-mold-shlib/pd/help.pd");
}
#else
int main() { }
Expand Down

0 comments on commit 64c3c77

Please sign in to comment.