From 896d6752485e3c9c9aa689c4a7fa63371c573fe1 Mon Sep 17 00:00:00 2001 From: Ivan Grokhotkov Date: Tue, 9 Jul 2019 13:00:16 +0200 Subject: [PATCH 1/4] idf_tools.py: add another platform string to handle Windows x86 --- tools/idf_tools.py | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/idf_tools.py b/tools/idf_tools.py index c005ecd6f..7cdd18236 100755 --- a/tools/idf_tools.py +++ b/tools/idf_tools.py @@ -96,6 +96,7 @@ PLATFORM_FROM_NAME = { # Windows PLATFORM_WIN32: PLATFORM_WIN32, 'Windows-i686': PLATFORM_WIN32, + 'Windows-x86': PLATFORM_WIN32, PLATFORM_WIN64: PLATFORM_WIN64, 'Windows-x86_64': PLATFORM_WIN64, 'Windows-AMD64': PLATFORM_WIN64, From 76dc87e9adb6ed9026c71ab2f32d0b4b25d9bb95 Mon Sep 17 00:00:00 2001 From: Ivan Grokhotkov Date: Tue, 9 Jul 2019 14:10:00 +0200 Subject: [PATCH 2/4] idf_exe: fix NULL pointer passed to WriteFile For an unknown reason, passing NULL pointer instead of &written worked on Windows 10 and on Windows 7 when stdout is not redirected. Closes https://github.com/espressif/esp-idf/issues/3740 --- tools/windows/idf_exe/idf_main.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tools/windows/idf_exe/idf_main.c b/tools/windows/idf_exe/idf_main.c index a8d1aec54..f17fc7f41 100644 --- a/tools/windows/idf_exe/idf_main.c +++ b/tools/windows/idf_exe/idf_main.c @@ -48,7 +48,8 @@ int main(int argc, LPTSTR argv[]) (StrCmp(argv[1], TEXT("--version")) == 0 || StrCmp(argv[1], TEXT("-v")) == 0)) { LPCSTR msg = VERSION "\n"; - WriteFile(GetStdHandle(STD_OUTPUT_HANDLE), msg, lstrlen(msg), NULL, NULL); + DWORD written; + WriteFile(GetStdHandle(STD_OUTPUT_HANDLE), msg, lstrlen(msg), &written, NULL); return 0; } From 15bcb79712c1c2b3607fa4ab82e5bc24ebabfed0 Mon Sep 17 00:00:00 2001 From: Ivan Grokhotkov Date: Tue, 9 Jul 2019 14:10:05 +0200 Subject: [PATCH 3/4] idf_exe: bump version to 1.0.1 --- tools/windows/idf_exe/CMakeLists.txt | 3 ++- tools/windows/idf_exe/idf_main.c | 1 - 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/windows/idf_exe/CMakeLists.txt b/tools/windows/idf_exe/CMakeLists.txt index ba7e940af..7693412e9 100644 --- a/tools/windows/idf_exe/CMakeLists.txt +++ b/tools/windows/idf_exe/CMakeLists.txt @@ -1,10 +1,11 @@ cmake_minimum_required(VERSION 3.5) project(idfexe) -set(VERSION 1.0) +set(VERSION 1.0.1) set(ARCHIVE_NAME idf-exe-v${VERSION}.zip) add_executable(idf idf_main.c) +target_compile_definitions(idf PRIVATE -DVERSION=\"${VERSION}\") set_target_properties(idf PROPERTIES C_STANDARD 99) target_link_libraries(idf "-lshlwapi") diff --git a/tools/windows/idf_exe/idf_main.c b/tools/windows/idf_exe/idf_main.c index f17fc7f41..3a8e6dcfb 100644 --- a/tools/windows/idf_exe/idf_main.c +++ b/tools/windows/idf_exe/idf_main.c @@ -18,7 +18,6 @@ #include #define LINESIZE 1024 -#define VERSION "1.0" static void fail(LPCSTR message, ...) __attribute__((noreturn)); From e6e17929463b4f154ba9fd4dcfef2fb9e36425ef Mon Sep 17 00:00:00 2001 From: Ivan Grokhotkov Date: Tue, 9 Jul 2019 13:11:53 +0200 Subject: [PATCH 4/4] tools: update idf_exe to 1.0.1 --- tools/tools.json | 14 +++++++------- tools/windows/tool_setup/tools_fallback.json | 14 +++++++------- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/tools/tools.json b/tools/tools.json index 54249d7dc..5bbed7e8b 100644 --- a/tools/tools.json +++ b/tools/tools.json @@ -334,17 +334,17 @@ "version_regex": "([0-9.]+)", "versions": [ { - "name": "1.0", + "name": "1.0.1", "status": "recommended", "win32": { - "sha256": "83a83ac7a246cbae93884db7c5f2ef9a7607d602340b1cf1e64ec2a925071748", - "size": 11289, - "url": "https://dl.espressif.com/dl/idf-exe-v1.0.zip" + "sha256": "53eb6aaaf034cc7ed1a97d5c577afa0f99815b7793905e9408e74012d357d04a", + "size": 11297, + "url": "https://dl.espressif.com/dl/idf-exe-v1.0.1.zip" }, "win64": { - "sha256": "83a83ac7a246cbae93884db7c5f2ef9a7607d602340b1cf1e64ec2a925071748", - "size": 11289, - "url": "https://dl.espressif.com/dl/idf-exe-v1.0.zip" + "sha256": "53eb6aaaf034cc7ed1a97d5c577afa0f99815b7793905e9408e74012d357d04a", + "size": 11297, + "url": "https://dl.espressif.com/dl/idf-exe-v1.0.1.zip" } } ] diff --git a/tools/windows/tool_setup/tools_fallback.json b/tools/windows/tool_setup/tools_fallback.json index 6b1585c8a..2422f2f4e 100644 --- a/tools/windows/tool_setup/tools_fallback.json +++ b/tools/windows/tool_setup/tools_fallback.json @@ -333,17 +333,17 @@ "version_regex": "([0-9.]+)", "versions": [ { - "name": "1.0", + "name": "1.0.1", "status": "recommended", "win32": { - "sha256": "83a83ac7a246cbae93884db7c5f2ef9a7607d602340b1cf1e64ec2a925071748", - "size": 11289, - "url": "https://dl.espressif.com/dl/idf-exe-v1.0.zip" + "sha256": "53eb6aaaf034cc7ed1a97d5c577afa0f99815b7793905e9408e74012d357d04a", + "size": 11297, + "url": "https://dl.espressif.com/dl/idf-exe-v1.0.1.zip" }, "win64": { - "sha256": "83a83ac7a246cbae93884db7c5f2ef9a7607d602340b1cf1e64ec2a925071748", - "size": 11289, - "url": "https://dl.espressif.com/dl/idf-exe-v1.0.zip" + "sha256": "53eb6aaaf034cc7ed1a97d5c577afa0f99815b7793905e9408e74012d357d04a", + "size": 11297, + "url": "https://dl.espressif.com/dl/idf-exe-v1.0.1.zip" } } ]