@echo off

REM Current DevProg Version. Match the pip package version (x.y.z)
SET currentversion=0.4.0

REM Installation paths. If copying this to a new product, you MUST edit the last parts of venvdir and shortcuts!
SET basedir=C:\GDNVirtualEnvs  // installation file directory
SET logdir=%basedir%\Logs   //debug information
SET venvdir=%basedir%\wifiheater 
SET scriptdir=%venvdir%\Scripts

SET shortcut=%userprofile%\Desktop\Program WifiHeater.lnk
SET shortcuttargetdir=%scriptdir%\program_wifiheater.exe

if not exist %basedir% (
mkdir %basedir%  // create file
)

if not exist %logdir% (
mkdir %logdir%
)

if not exist %venvdir% (
python -m venv %venvdir%
)

if not exist %scriptdir%\activate.bat (
echo The virtual environment in %venvdir% appears to be invalid.
echo Delete the folder and run this script again.
exit /b 1
)

call %scriptdir%\activate.bat
pip uninstall -y wifiheater esptool pyserial pyaes ecdsa six
pip install six-1.10.0-py2.py3-none-any.whl
pip install ecdsa-0.13-py2.py3-none-any.whl
pip install pyaes-1.6.1.tar.gz
pip install pyserial-3.4-py2.py3-none-any.whl
pip install esptool-2.3.1-py3-none-any.whl
pip install wifiheater-%currentversion%-py3-none-any.whl

powershell "$s=(New-Object -COM WScript.Shell).CreateShortcut('%shortcut%');$s.TargetPath='%shortcuttargetdir%';$s.Arguments='program --baud 921600';$s.WorkingDirectory='%logdir%';$s.Save()"

-----------

2018.8.10 programming bat based on python的更多相关文章

  1. Top 10 Programming Fonts

    Top 10 Programming Fonts Sunday, 17 May 2009 • Permalink Update: This post was written back in 2009, ...

  2. 2018 German Collegiate Programming Contest (GCPC 18)

    2018 German Collegiate Programming Contest (GCPC 18) Attack on Alpha-Zet 建树,求lca 代码: #include <al ...

  3. (寒假GYM开黑)2018 German Collegiate Programming Contest (GCPC 18)

    layout: post title: 2018 German Collegiate Programming Contest (GCPC 18) author: "luowentaoaa&q ...

  4. 2018 China Collegiate Programming Contest Final (CCPC-Final 2018)-K - Mr. Panda and Kakin-中国剩余定理+同余定理

    2018 China Collegiate Programming Contest Final (CCPC-Final 2018)-K - Mr. Panda and Kakin-中国剩余定理+同余定 ...

  5. 申请Office 365一年免费的开发者账号攻略(2018年10月份版本)

    要进行Office 365开发,当然需要有完整的Office 365环境才可以.为了便于广大开发人员快速地启动这项工作,微软官方给所有开发人员提供了免费的一年开发者账号   那么如何申请Office ...

  6. IntelliJ IDEA 最新激活码(截止到2018年10月14日)

    IntelliJ IDEA 注册码: EB101IWSWD-eyJsaWNlbnNlSWQiOiJFQjEwMUlXU1dEIiwibGljZW5zZWVOYW1lIjoibGFuIHl1IiwiYX ...

  7. 新手C#SQL Server使用记录2018.08.10

    主键(PrimaryKey):主键就是每个数据行(记录)的唯一标识,不会有重复值的列(字段)才能当做主键.一个表可以没有主键,但是这样会很难处理表,因此一般情况表都要设置主键. 主键有两张选用策略,分 ...

  8. 【python】10分钟教你用python打造贪吃蛇超详细教程

    10分钟教你用python打造贪吃蛇超详细教程 在家闲着没妹子约, 刚好最近又学了一下python,听说pygame挺好玩的.今天就在家研究一下, 弄了个贪吃蛇出来.希望大家喜欢. 先看程序效果: 0 ...

  9. 10分钟教你用Python打造天气机器人+关键字自动回复+定时发送

    01 前言 Hello,各位小伙伴.自上次我们介绍了Python实现天气预报的功能以后,那个小程序还有诸多不完善的地方,今天,我们再次来完善一下我们的小程序.比如我们想给机器人发“天气”等关键字,它就 ...

随机推荐

  1. LeetCode-day04

    35. Same Tree 判断两棵树相同 36. Invert Binary Tree 翻转树 37. Symmetric Tree 判断树是不是镜像对称的 38. Maximum Depth of ...

  2. MFC中修改程序图标

    在使用MFC时,我们经常需要修改我们得到的exe文件的图标.如:写一个随机画圆的小程序,我们就希望该程序的图标是个圆或者是和圆有关的图标.所以,在这里我就记录一下我修改图标的步骤. 顺便提一下,我使用 ...

  3. iOS应用生命周期

    作为应用程序的委托对象,AppDelegate类在应用生命周期的不同阶段会回调不同的方法.首先,让我们先了解一下iOS 应用的不同状态及它们彼此间的关系,见图1 . 图1 iOS应用状态图 下面简要介 ...

  4. loadrunder之脚本篇——接口传参为本地文件

    导言 前几天需要对公司一个专门很重要的接口进行压测,这个还不是重点,重点是传参为本地的图片!刚刚开始通过web_custom_request()函数来解决,可是脚本并不能通过!后面又百度不到答案,通过 ...

  5. ag-grid

    使用: import { AgGridVue } from "ag-grid-vue"; <ag-grid-vue style="width:100%;height ...

  6. 【转载】OpenWrt sysupgrade 命令行更新固件到最新版

    OpenWrt sysupgrade 命令行更新固件到最新版 下面我们要使用 sysupgrade 更新固件到trunk最新版. 要注意的是,trunk包含试验的功能,可能不稳定,刷机风险自己承担. ...

  7. Windos Server 2008 配置定时清理任务

    系统环境:Windos 2008 R2 x64 位 实施方案:自动清理超过两周的备份系统文件. 编写自动清理脚本..bat文件后缀. 打开计划任务

  8. java内置注解、元注解和自定义注解

    注解的作用: 1.生成文档 2.跟踪代码依赖性 3.编译时进行格式检查 ---------------------------------------------------------------- ...

  9. Kafka高可用环境搭建

    Apache Kafka是分布式发布-订阅消息系统,在 kafka官网上对 kafka 的定义:一个分布式发布-订阅消息传递系统. 它最初由LinkedIn公司开发,Linkedin于2010年贡献给 ...

  10. Linux学习笔记001——win下安装Linux虚拟机

    我研二之前算是一个纯粹的计算机小白,因为某些原因开始接触了计算机方面的知识. Linux系统也就是前几个月才听说,因某些需求需要在Linux环境下运行.纯的Linux系统不太现实, 所以在他人帮助和自 ...