Skip to content
Merged
Show file tree
Hide file tree
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
6 changes: 4 additions & 2 deletions Source/Heavy/ExporterBase.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ struct ExporterBase : public Component

bool validPatchSelected = false;
bool canvasDirty = false;
bool isTempFile = false;

File patchFile;
File openedPatchFile;
Expand Down Expand Up @@ -95,6 +96,7 @@ struct ExporterBase : public Component
realPatchFile = patchFile;
patchFile = openedPatchFile;
canvasDirty = false;
isTempFile = true;
}
else {
canvasDirty = cnv->patch.isDirty();
Expand All @@ -121,14 +123,14 @@ struct ExporterBase : public Component
},
"", "HeavyExport", nullptr, true);
};

unsavedLabel.setColour(Label::textColourId, Colours::orange);
addChildComponent(unsavedLabel);
}

~ExporterBase() override
{
if (openedPatchFile.existsAsFile()) {
if (openedPatchFile.existsAsFile() && isTempFile) {
openedPatchFile.deleteFile();
}

Expand Down
11 changes: 9 additions & 2 deletions Source/Heavy/OWLExporter.h
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,9 @@ class OWLExporter : public ExporterBase {
ValueTree getState() override
{
ValueTree stateTree("OWL");
stateTree.setProperty("inputPatchValue", getValue<String>(inputPatchValue), nullptr);
stateTree.setProperty("projectNameValue", getValue<String>(projectNameValue), nullptr);
stateTree.setProperty("projectCopyrightValue", getValue<String>(projectCopyrightValue), nullptr);
stateTree.setProperty("targetBoardValue", getValue<int>(targetBoardValue), nullptr);
stateTree.setProperty("exportTypeValue", getValue<int>(exportTypeValue), nullptr);
stateTree.setProperty("storeSlotValue", getValue<int>(storeSlotValue), nullptr);
Expand All @@ -61,6 +64,9 @@ class OWLExporter : public ExporterBase {
void setState(ValueTree& stateTree) override
{
auto tree = stateTree.getChildWithName("OWL");
inputPatchValue = tree.getProperty("inputPatchValue");
projectNameValue = tree.getProperty("projectNameValue");
projectCopyrightValue = tree.getProperty("projectCopyrightValue");
targetBoardValue = tree.getProperty("targetBoardValue");
exportTypeValue = tree.getProperty("exportTypeValue");
storeSlotValue = tree.getProperty("storeSlotValue");
Expand Down Expand Up @@ -116,8 +122,9 @@ class OWLExporter : public ExporterBase {
args.add(path);
}

exportingView->logToConsole("Command: " + args.joinIntoString(" ") + "\n");
start(args);
auto const command = args.joinIntoString(" ");
exportingView->logToConsole("Command: " + command + "\n");
Toolchain::startShellScript(command, this);

waitForProcessToFinish(-1);
exportingView->flushConsole();
Expand Down