@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. 201703 ABAP面试题002

    转自: ABAP 面试问题及答案(一):数据库更新及更改 SAP Standard (转) 问题一:锁对象(Lock Object)和 FM(Function Module)激活锁定对象时,产生的 F ...

  2. SAN,NAS区别的联系

    在网络存储中,有着各种网络存储解决方案,例如:SAN,NAS,DAS存储网络,它们各自有着各自的特点,其运用场景也有所不同.下面就说说各自的特点. 一.SAN SAN(Storage Area Net ...

  3. 简单理解List、set、Map接口之间的联系和区别

    联系:Collection与Map属于同等关系,但Map依赖与Collection.Coolection接口的子类包含List(ArrayList.LinkedList等).Set(HashSet.T ...

  4. rails generator

    generate 查找顺序 rails/generators/initializer/initializer_generator.rb generators/initializer/initializ ...

  5. 教你在Yii2.0框架中如何创建自定义小部件

    本教程将帮助您创建自己的自定义小部件在 yii framework 2.0.部件是可重用的模块和用于视图. 创建一个小部件,需要继承 yii\base\Widget,覆盖重写 yii\base\Wid ...

  6. 计算机网络概述 传输层 TCP可靠传输的实现

    TCP可靠传输的实现 TCP的可靠性表现在:它向应用层提供的数据是 无差错的.有序的.无丢失的,简单的说就是:TCP最终递交给应用层的数据和发送者发送的数据是一模一样的. TCP采用了流量控制.拥塞控 ...

  7. Django ORM --- 建表、查询、删除基础

    1.什么是ORM ORM的全称是Object Relational Mapping,即对象关系映射.它的实现思想就是将关系数据库中表的数据映射成为对象,以对象的形式展现,这样开发人员就可以把对数据库的 ...

  8. memcpy与memmove

    函数原型: void* memcpy(void *dst,void const *src,size_t count) void* memmove(void *dst,void const *src,s ...

  9. python爬虫之html解析Beautifulsoup和Xpath

    Beautiifulsoup Beautiful Soup 是一个HTML/XML的解析器,主要的功能也是如何解析和提取 HTML/XML 数据.BeautifulSoup 用来解析 HTML 比较简 ...

  10. Android 下的usb框架及功能点【转】

    本文转载自:https://blog.csdn.net/tianruxishui/article/details/37902959 有关USB android框架的链接 http://blog.sin ...