tools: idf_exe: quote idf.py path

This commit is contained in:
Ivan Grokhotkov 2020-10-09 18:39:21 +02:00
parent eb86d39136
commit b8d6985dca
3 changed files with 9 additions and 18 deletions

View File

@ -4193,4 +4193,3 @@ tools/unit-test-app/tools/CreateSectionTable.py
tools/unit-test-app/tools/UnitTestParser.py tools/unit-test-app/tools/UnitTestParser.py
tools/unit-test-app/unit_test.py tools/unit-test-app/unit_test.py
tools/windows/eclipse_make.py tools/windows/eclipse_make.py
tools/windows/idf_exe/idf_main.c

View File

@ -1,7 +1,7 @@
cmake_minimum_required(VERSION 3.5) cmake_minimum_required(VERSION 3.5)
project(idfexe) project(idfexe)
set(VERSION 1.0.1) set(VERSION 1.0.2)
set(ARCHIVE_NAME idf-exe-v${VERSION}.zip) set(ARCHIVE_NAME idf-exe-v${VERSION}.zip)
add_executable(idf idf_main.c) add_executable(idf idf_main.c)

View File

@ -1,16 +1,8 @@
// Copyright 2019 Espressif Systems (Shanghai) PTE LTD /*
// * SPDX-FileCopyrightText: 2019-2021 Espressif Systems (Shanghai) CO LTD
// Licensed under the Apache License, Version 2.0 (the "License"); *
// you may not use this file except in compliance with the License. * SPDX-License-Identifier: Apache-2.0
// You may obtain a copy of the License at", */
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License
#include <windows.h> #include <windows.h>
#include <shlwapi.h> #include <shlwapi.h>
@ -76,13 +68,13 @@ int main(int argc, LPTSTR argv[])
} }
} }
/* Prepare the command line: python.exe %IDF_PATH%\\tools\idf.py <rest of the args> */ /* Prepare the command line: python.exe "%IDF_PATH%\\tools\idf.py" <rest of the args> */
TCHAR cmdline[LINESIZE] = {}; TCHAR cmdline[LINESIZE] = {};
StringCchCat(cmdline, sizeof(cmdline), TEXT("python.exe ")); StringCchCat(cmdline, sizeof(cmdline), TEXT("python.exe \""));
StringCchCat(cmdline, sizeof(cmdline), idf_path); StringCchCat(cmdline, sizeof(cmdline), idf_path);
StringCchCat(cmdline, sizeof(cmdline), TEXT("\\tools\\")); StringCchCat(cmdline, sizeof(cmdline), TEXT("\\tools\\"));
StringCchCat(cmdline, sizeof(cmdline), idfpy_script_name); StringCchCat(cmdline, sizeof(cmdline), idfpy_script_name);
StringCchCat(cmdline, sizeof(cmdline), TEXT(" ")); StringCchCat(cmdline, sizeof(cmdline), TEXT("\" "));
for (int i = 1; i < argc; ++i) { for (int i = 1; i < argc; ++i) {
StringCchCat(cmdline, sizeof(cmdline), argv[i]); StringCchCat(cmdline, sizeof(cmdline), argv[i]);
StringCchCat(cmdline, sizeof(cmdline), TEXT(" ")); StringCchCat(cmdline, sizeof(cmdline), TEXT(" "));