Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix emsdkPath on Windows #2064

Open
wants to merge 5 commits into
base: develop
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions Source/Heavy/WASMExporter.h
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,11 @@ class WASMExporter : public ExporterBase {
{
exportingView->showState(ExportingProgressView::Exporting);

#if JUCE_WINDOWS
StringArray args = { heavyExecutable.getFullPathName().replaceCharacter('\\', '/'), pdPatch.replaceCharacter('\\', '/'), "-o" + outdir.replaceCharacter('\\', '/') };
#else
StringArray args = { heavyExecutable.getFullPathName(), pdPatch, "-o" + outdir };
#endif

name = name.replaceCharacter('-', '_');
args.add("-n" + name);
Expand All @@ -79,15 +83,23 @@ class WASMExporter : public ExporterBase {

String paths = "-p";
for (auto& path : searchPaths) {
#if JUCE_WINDOWS
paths += " " + path.replaceCharacter('\\', '/');
#else
paths += " " + path;
#endif
}

args.add(paths);

if (shouldQuit)
return true;

#if JUCE_WINDOWS
auto buildScript = "source " + emsdkPath.replaceCharacter('\\', '/') + "/emsdk_env.sh; " + args.joinIntoString(" ");
#else
auto buildScript = "source " + emsdkPath + "/emsdk_env.sh; " + args.joinIntoString(" ");
#endif

Toolchain::startShellScript(buildScript, this);

Expand Down