From 2bf63798e5f87203cc049789e0b0cd3e932d6c16 Mon Sep 17 00:00:00 2001 From: biver Date: Mon, 22 Aug 2022 15:21:44 +0300 Subject: [PATCH] =?UTF-8?q?=D0=94=D0=BE=D0=B1=D0=B0=D0=B2=D0=BB=D1=8F?= =?UTF-8?q?=D0=B5=D0=BC=20=D0=B2=D1=8B=D0=B2=D0=BE=D0=B4=20=D1=81=D0=BE?= =?UTF-8?q?=D0=BE=D0=B1=D1=89=D0=B5=D0=BD=D0=B8=D1=8F=20=D0=BE=20=D0=B7?= =?UTF-8?q?=D0=B0=D0=B2=D0=B5=D1=80=D1=88=D0=B5=D0=BD=D0=B8=D0=B8=20=D1=80?= =?UTF-8?q?=D0=B0=D0=B1=D0=BE=D1=82=D1=8B=20=D1=81=D0=B1=D0=BE=D1=80=D1=89?= =?UTF-8?q?=D0=B8=D0=BA=D0=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- PrepareProject.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/PrepareProject.py b/PrepareProject.py index c5d77da7..94798627 100644 --- a/PrepareProject.py +++ b/PrepareProject.py @@ -19,7 +19,6 @@ import configparser import os, json, sys, getopt from pathlib import Path - config = configparser.ConfigParser() # создаём объекта парсера INI def printHelp(): @@ -85,7 +84,7 @@ if Path(profile).is_file(): # sortedModules = {} # for sortedModulName in sortedList: - print(profJson) + # print(profJson) with open(profile, "w", encoding='utf-8') as write_file: json.dump(profJson, write_file, ensure_ascii=False, indent=4, sort_keys=False) @@ -183,6 +182,12 @@ config["platformio"]["default_envs"] = deviceName config["platformio"]["data_dir"] = profJson['projectProp']['platformio']['data_dir'] with open("platformio.ini", 'w') as configFile: config.write(configFile) + +import ctypes # An included library with Python install. +if update: + ctypes.windll.user32.MessageBoxW(0, "Модули профиля " + profile + " обновлены, а сам профиль применен, можно запускать компиляцию и прошивку.", "Операция завершена.", 0) +else: + ctypes.windll.user32.MessageBoxW(0, "Профиль " + profile + " применен, можно запускать компиляцию и прошивку.", "Операция завершена.", 0) \ No newline at end of file