2018.8.10 programming bat based on python
@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的更多相关文章
- Top 10 Programming Fonts
Top 10 Programming Fonts Sunday, 17 May 2009 • Permalink Update: This post was written back in 2009, ...
- 2018 German Collegiate Programming Contest (GCPC 18)
2018 German Collegiate Programming Contest (GCPC 18) Attack on Alpha-Zet 建树,求lca 代码: #include <al ...
- (寒假GYM开黑)2018 German Collegiate Programming Contest (GCPC 18)
layout: post title: 2018 German Collegiate Programming Contest (GCPC 18) author: "luowentaoaa&q ...
- 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-中国剩余定理+同余定 ...
- 申请Office 365一年免费的开发者账号攻略(2018年10月份版本)
要进行Office 365开发,当然需要有完整的Office 365环境才可以.为了便于广大开发人员快速地启动这项工作,微软官方给所有开发人员提供了免费的一年开发者账号 那么如何申请Office ...
- IntelliJ IDEA 最新激活码(截止到2018年10月14日)
IntelliJ IDEA 注册码: EB101IWSWD-eyJsaWNlbnNlSWQiOiJFQjEwMUlXU1dEIiwibGljZW5zZWVOYW1lIjoibGFuIHl1IiwiYX ...
- 新手C#SQL Server使用记录2018.08.10
主键(PrimaryKey):主键就是每个数据行(记录)的唯一标识,不会有重复值的列(字段)才能当做主键.一个表可以没有主键,但是这样会很难处理表,因此一般情况表都要设置主键. 主键有两张选用策略,分 ...
- 【python】10分钟教你用python打造贪吃蛇超详细教程
10分钟教你用python打造贪吃蛇超详细教程 在家闲着没妹子约, 刚好最近又学了一下python,听说pygame挺好玩的.今天就在家研究一下, 弄了个贪吃蛇出来.希望大家喜欢. 先看程序效果: 0 ...
- 10分钟教你用Python打造天气机器人+关键字自动回复+定时发送
01 前言 Hello,各位小伙伴.自上次我们介绍了Python实现天气预报的功能以后,那个小程序还有诸多不完善的地方,今天,我们再次来完善一下我们的小程序.比如我们想给机器人发“天气”等关键字,它就 ...
随机推荐
- 爬虫,如何防止被ban之策略大集合
话说在尝试设置download_delay小于1,并且无任何其他防止被ban的策略之后,我终于成功的被ban了. 关于scrapy的使用可参见之前文章: http://blog.csdn.net/u0 ...
- C# 函数2
//读写INI public class GF_INI { [DllImport("kernel32")] private stat ...
- Learning Notes for HTML/CSS/JS
@1:内部样式表 & 外部样式表 内部样式表的定义,放在<style></style>中,<style>标签放在<head>中 <html ...
- yii 2 局部关闭 CSRF 拦截
最近在拿 yii 2.0 开发ajax提交,在 post 请求接口时,提示数据无法验证,于是查询 yii 错误日志,发现错误为 exception ‘yiiwebBadRequestHttpExcep ...
- CodeForces - 691E Xor-sequences 【矩阵快速幂】
题目链接 http://codeforces.com/problemset/problem/691/E 题意 给出一个长度为n的序列,从其中选择k个数 组成长度为k的序列,因为(k 有可能 > ...
- Python学习进程(12)模块
模块让你能够有逻辑地组织你的Python代码段. (1)python模块: 模块化的好处: 1.把相关的代码分配到一个模块里能让你的代码更好用,更易懂. 2.模块也是Python对象, ...
- public,protected,privat区别
关于从基类继承来的方法和属性的保护: --class Pig:public Animal {...} C++不仅允许你对在类里定义的方法和属性实施访问控制,还允许你控制子类可以访问基类里的哪些方法和属 ...
- 纯代码编写qt登录界面(转)
1. 新建Qt Widgets Application,项目名称为login1,在类信息页面保持类名和基类为MainWindow和QMainWindow不变,取消选择创建界面选项,如下图所示. ...
- 【leetcode刷题笔记】Single Number II
Given an array of integers, every element appears three times except for one. Find that single one. ...
- 【HackerRank】 Filling Jars
Animesh has N empty candy jars, numbered from 1 to N, with infinite capacity. He performs M operatio ...