Skip to content

Commit 7776c90

Browse files
committed
phpstudy
1 parent 4fc7ef0 commit 7776c90

File tree

6 files changed

+54
-6
lines changed

6 files changed

+54
-6
lines changed

.gitignore

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,4 +19,7 @@ python-3.7.3-embed-win32/Tools/Everything/*
1919
python-3.7.3-embed-win32/Tools/Shadowsocks/*
2020
!/python-3.7.3-embed-win32/Tools/Shadowsocks/Shadowsocks.exe
2121
python-3.7.3-embed-win32/Tools/Win32DiskImager/*
22-
!/python-3.7.3-embed-win32/Tools/Win32DiskImager/Win32DiskImager.7z
22+
!/python-3.7.3-embed-win32/Tools/Win32DiskImager/Win32DiskImager.7z
23+
24+
python-3.7.3-embed-win32/Tools/phpStudy20161103/*
25+
!/python-3.7.3-embed-win32/Tools/phpStudy20161103/phpStudy.7z

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,8 @@ toolSets=\
6060
# 更新日志
6161

6262
```
63+
2019/6/15 phpStudy 2016版 集成最新的Apache+Nginx+LightTPD+PHP+MySQL+phpMyAdmin+Zend Optimizer+Zend Loader 官网 http://phpstudy.php.cn/wenda/407.html
64+
6365
2019/6/3 Win32DiskImager 写入ISO系统到U盘 树莓派安装系统 ,关键词 ['win32diskimager','iso','shumeipai','raspberrypi','raspberry pi']
6466
6567
2019/6/3 Archive7z 7z lzma压缩 ,关键词 ['7z','zip','rar','lzma','yasuo']

python-3.7.3-embed-win32/GameDevTools.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@
4646
from Tools import Ex7z
4747
from Tools import Archive7z
4848
from Tools import Win32DiskImager
49+
from Tools import PhpStudy
4950

5051

5152
os.system("mode con cols=121 lines=35")
@@ -173,13 +174,17 @@
173174

174175
# Win32DiskImager IOS 写入ISO系统到U盘 树莓派安装系统
175176
Win32DiskImager:[['win32diskimager','iso','shumeipai','raspberrypi','raspberry pi'],u'写入ISO系统到U盘 树莓派安装系统'],
177+
178+
# phpStudy 2016版 集成最新的Apache+Nginx+LightTPD+PHP+MySQL+phpMyAdmin+Zend Optimizer+Zend Loader 官网 http://phpstudy.php.cn/wenda/407.html
179+
PhpStudy:[['phpstudy','Apache+Nginx+LightTPD+PHP+MySQL+phpMyAdmin+Zend Optimizer+Zend Loader'],u'phpStudy 2016版 集成最新的Apache+Nginx+LightTPD+PHP+MySQL+phpMyAdmin+Zend Optimizer+Zend Loader'],
176180
}
177181

178182
toolSets_old=toolSets
179183
toolSets={}
180184
# 反转
181185
for tmpTool,tmpToolInfo in toolSets_old.items():
182186
for tmpOneKeyword in tmpToolInfo[0]:
187+
tmpOneKeyword=tmpOneKeyword.lower()#使用小写字母作为关键词检索
183188
if (tmpOneKeyword in toolSets)==False:
184189
toolSets[tmpOneKeyword]=[]
185190
toolSets[tmpOneKeyword].append(tmpTool)
@@ -193,6 +198,8 @@
193198
_Show_Choose_Tips=True
194199

195200
def searchKeyword(varKeyword):
201+
varKeyword=varKeyword.lower()#使用小写字母作为关键词检索
202+
196203
# 先提取所有Keyword
197204
tmpAllKeyword=toolSets.keys()
198205
# 然后提取包含 搜索字的 关键词

python-3.7.3-embed-win32/Tools/ImageScale.py

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,14 @@
1010
Helper.InstallModule('Pillow')
1111
from PIL import Image
1212

13+
def Resize(varPath,varScale):
14+
tmpImage=Image.open(varPath)
15+
print("Image Size:"+str(tmpImage.width)+","+str(tmpImage.height))
16+
17+
tmpWidth=tmpImage.width*varScale
18+
tmpHeight=tmpImage.height*varScale
19+
tmpImage.resize((int(tmpWidth),int(tmpHeight)),Image.ANTIALIAS).save(varPath)
20+
1321
def run():
1422
# print("to_JPG")
1523

@@ -21,12 +29,15 @@ def run():
2129
tmpScaleStr=Helper.Remove_r_n(tmpScaleStr)
2230
tmpScale=float(tmpScaleStr)
2331

24-
tmpImage=Image.open(tmpFilePath)
25-
print("Image Size:"+str(tmpImage.width)+","+str(tmpImage.height))
32+
if os.path.isdir(tmpFilePath):
33+
tmpFilePathList=Helper.list_all_files(tmpFilePath)
34+
for tmpOneFilePath in tmpFilePathList:
35+
Resize(tmpOneFilePath,tmpScale)
36+
37+
elif os.path.isfile(tmpFilePath):
38+
Resize(tmpFilePath,tmpScale)
2639

27-
tmpWidth=tmpImage.width*tmpScale
28-
tmpHeight=tmpImage.height*tmpScale
29-
tmpImage.resize((int(tmpWidth),int(tmpHeight)),Image.ANTIALIAS).save(tmpFilePath)
40+
3041

3142

3243

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
#!/usr/bin/python
2+
# -*- coding: UTF-8 -*-
3+
import os
4+
from . import Helper
5+
6+
7+
def run():
8+
tmpZipFilePath=os.getcwd()+"/Tools/phpStudy20161103/phpStudy.7z"
9+
tmpZipFilePath=tmpZipFilePath.replace('\\','/')
10+
# print(tmpZipFilePath)
11+
tmpTargetDirPath=os.path.splitext(tmpZipFilePath)[0]
12+
if os.path.isdir(tmpTargetDirPath)==False:
13+
# 先解压
14+
print(u"第一次打开,先解压\n")
15+
Helper.Ex_7z(tmpZipFilePath,False)
16+
print(u"解压完成\n")
17+
18+
tmpExePath=os.getcwd()+"/Tools/phpStudy20161103/phpStudy/Start.bat"
19+
# print(tmpExePath)
20+
# Helper.OpenOneToolDir("Win32DiskImager/Win32DiskImager/")
21+
os.system(tmpExePath)
22+
23+
24+
if __name__=="__main__":
25+
run()
Binary file not shown.

0 commit comments

Comments
 (0)