Skip to content

Commit

Permalink
Fixed bugs related to spaces in project path
Browse files Browse the repository at this point in the history
  • Loading branch information
lunOptics committed Nov 7, 2020
1 parent c35e7f9 commit 8f5cc06
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 21 deletions.
21 changes: 7 additions & 14 deletions VisualTeensy/Embedded/makefile_builder
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ UPL_CLICMD := $(UPL_CLICMD_B)/teensy_loader_cli -mmcu=$(MCU) -v $(TARGET_HEX)
.PHONY: all upload uploadTy uploadCLI clean

all:
$(BUILDER) $(FLAGS) -build-path=$(BUILD_PATH) -fqbn=$(FQBN) $(HARDWARE) $(TOOLS) $(LIBRARIES) $(SKETCH_NAME)
$(BUILDER) $(FLAGS) -build-path=$(BUILD_PATH) -build-cache=$(BUILD_CACHE) -fqbn=$(FQBN) $(HARDWARE) $(TOOLS) $(LIBRARIES) $(SKETCH_NAME)

upload: all
$(UPL_PJRC)
Expand All @@ -22,18 +22,11 @@ uploadTy: all
uploadCLI: all
@$(UPL_CLICMD)

clean:
clean:
@echo Cleaning user binaries...
@if exist $(BUILD_PATH)/core rd /s/q "$(BUILD_PATH)/core"
@if exist $(BUILD_PATH)/libraries rd /s/q "$(BUILD_PATH)/libraries"
@if exist $(BUILD_PATH)/pch rd /s/q "$(BUILD_PATH)/pch"
@if exist $(BUILD_PATH)/preproc rd /s/q "$(BUILD_PATH)/preproc"
@if exist $(BUILD_PATH)/sketch rd /s/q "$(BUILD_PATH)/sketch"

@if exist "$(BUILD_PATH)/*.eep" del $(subst /,\,$(BUILD_PATH)/*.eep)
@if exist "$(BUILD_PATH)/*.elf" del $(subst /,\,$(BUILD_PATH)/*.elf)
@if exist "$(BUILD_PATH)/*.lst" del $(subst /,\,$(BUILD_PATH)/*.lst)
@if exist "$(BUILD_PATH)/*.sym" del $(subst /,\,$(BUILD_PATH)/*.sym)
@if exist "$(BUILD_PATH)/*.json" del $(subst /,\,$(BUILD_PATH)/*.json)
@if exist "$(BUILD_PATH)/*.cache" del $(subst /,\,$(BUILD_PATH)/*.cache)
@if exist .vsteensy\build rd /s/q .vsteensy\build
@md .vsteensy\build

@if exist .vsteensy\cache rd /s/q .vsteensy\cache"
@md .vsteensy\cache
@echo done
2 changes: 1 addition & 1 deletion VisualTeensy/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("0.9.9.1")]
[assembly: AssemblyVersion("0.9.9.2")]
[assembly: AssemblyFileVersion("0.0.0.0")]
[assembly: NeutralResourcesLanguage("en")]

Original file line number Diff line number Diff line change
Expand Up @@ -35,14 +35,14 @@ static public string generate(IProject project, LibManager libManager, SetupData
mf.Append(makeEntry("BOARD_ID := ", "build.board", options) + "\n");
mf.Append(makeEntry("MCU := ", "build.mcu", options) + "\n\n");

mf.Append($"BUILDER_BASE := {setup.arduinoBase}\n");
mf.Append($"BUILDER_BASE := \"{setup.arduinoBase}\"\n");
mf.Append($"FLAGS := -verbose=1 -warnings=all\n");

mf.Append($"FQBN := {cfg.selectedBoard.fqbn}\n");
mf.Append($"BUILD_PATH := $(abspath .vsTeensy/build)\n");
mf.Append($"FQBN := {cfg.selectedBoard.fqbn}\n");
mf.Append($"BUILD_PATH := \"{Path.Combine(project.path,".vsteensy/build")}\"\n").Replace("/","\\");
mf.Append($"BUILD_CACHE := \"{Path.Combine(project.path,".vsteensy/cache")}\"\n").Replace("/", "\\");

mf.Append($"HARDWARE := -hardware=\"{setup.arduinoBase}/hardware\"\n");
// mf.Append($"TOOLS := \"{Helpers.getShortPath(setup.arduinoBase+"\\tools-builder")}\"\n\n");
mf.Append($"HARDWARE := -hardware=\"{setup.arduinoBase}/hardware\"\n");
mf.Append($"TOOLS := -tools=\"{(setup.arduinoBase + "\\tools-builder")}\"\n\n");

mf.Append($"LIBRARIES := -built-in-libraries=\"{setup.arduinoBase}/libraries\"\n");
Expand Down
2 changes: 1 addition & 1 deletion vtCore/Implementation/Project Generators/Starter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ static public void start_vsCode(string folder, string file)
{
var vsCode = new Process();
vsCode.StartInfo.FileName = "cmd";
vsCode.StartInfo.Arguments = $"/c code \"{folder}\" {file}";
vsCode.StartInfo.Arguments = $"/c code \"{folder}\" \"{file}\"";
vsCode.StartInfo.WorkingDirectory = folder;
vsCode.StartInfo.UseShellExecute = false;
vsCode.StartInfo.CreateNoWindow = true;
Expand Down

0 comments on commit 8f5cc06

Please sign in to comment.