Skip to content

Commit 41116d1

Browse files
committed
create v1.8 package, add help etc.
1 parent 5869626 commit 41116d1

File tree

13 files changed

+1058
-762
lines changed

13 files changed

+1058
-762
lines changed

Pipfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ pycodestyle = "*"
1010
yapf = "*"
1111
pytest = "*"
1212
pytest-qt = "*"
13-
pyqt5-tools = "*" #"<5.14.1.3.0.3"
13+
pyqt5-tools = "<5.14.1.3.0.3"
1414

1515
[packages]
1616
requests = ">2.0"

Pipfile.bak

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
[[source]]
2+
name = "pypi"
3+
# url = "https://pypi.douban.com/simple"
4+
url = "https://pypi.tuna.tsinghua.edu.cn/simple"
5+
# url = "https://mirrors.aliyun.com/pypi/simple"
6+
verify_ssl = true
7+
8+
[dev-packages]
9+
pycodestyle = "*"
10+
yapf = "*"
11+
pytest = "*"
12+
pytest-qt = "*"
13+
pyqt5-tools = "*" #"<5.14.1.3.0.3"
14+
15+
[packages]
16+
requests = ">2.0"
17+
chardet = ">=3.0.4"
18+
preimport = ">=1.1.0"
19+
toml = ">=0.10.0"
20+
tomlconfig = ">=1.2.1"
21+
pyqt5 = ">=5.10.1,<5.14"
22+
pyqt5-sip = ">=12.7,<=12.7.1"
23+
qscintilla = ">=2.11.4,<=2.11.4"
24+
codeeditor = ">=1.1.0"
25+
26+
# [requires]
27+
# python_version = "3.7"

Pipfile.lock

Lines changed: 180 additions & 118 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/dev/distribution/build.md

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
自动收集QssStylesheetEditor在**windows平台上依赖**的所有文件
2+
3+
# 准备工作
4+
5+
dist文件夹中准备好以下文件:
6+
7+
+ libpython文件夹:python3.7的主要文件(python3.dll,python37.dll等)
8+
+ Lib文件夹:PyQt5和requests包
9+
+ DLLs文件夹:Windows共享库(msvcp140.dll,cvruntime140.dll,apims-win-cr-\*.dll等)
10+
+ scripts文件夹:main.py
11+
+ 启动文件:AppStart.exe、AppStart.vbs等
12+
13+
# build
14+
15+
制作windows平台安装包需要的文件的脚本。
16+
17+
1. pipenv shell(如果使用了pipenv虚拟环境,先进入虚拟环境)
18+
2. cd installer(进入installer文件夹)
19+
3. compile_pyscripts.cmd(运行build脚本)
20+
21+
> build文件夹是个中间文件夹,compile_pyscripts运行过程中放临时文件的。
22+
>
23+
> 最终编译的python脚本(pyc)及dll等文件会在“dist\build”文件夹中。
24+
25+
26+
> 其他平台可以忽略本脚本,当然编译为pyc的python码也可以在其他平台上运行。

docs/dev/distribution/build.md.bak

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
自动收集QssStylesheetEditor在**windows平台上依赖**的所有文件
2+
3+
# 准备工作
4+
5+
dist文件夹中准备好以下文件:
6+
7+
+ libpython文件夹:python3.7的主要文件(python3.dll,python37.dll等)
8+
+ Lib文件夹:PyQt5和requests包
9+
+ DLLs文件夹:Windows共享库(msvcp140.dll,cvruntime140.dll,apims-win-cr-\*.dll等)
10+
+ scripts文件夹:main.py
11+
+ 启动文件:AppStart.exe、AppStart.vbs等
12+
13+
# build
14+
15+
制作windows平台安装包的脚本。
16+
17+
1. pipenv shell(如果使用了pipenv虚拟环境,先进入虚拟环境)
18+
2. cd installer(进入installer文件夹)
19+
3. compile_pyscripts.cmd(运行build脚本)
20+
21+
> build文件夹是个中间文件夹,compile_pyscripts运行过程中放临时文件的。
22+
>
23+
> 最终编译的python脚本(pyc)及dll等文件会在“dist\build”文件夹中。
24+
25+
26+
> 其他平台可以忽略本脚本,当然编译为pyc的python码也可以在其他平台上运行。

docs/dev/distribution/package.md

Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
打包安装程序,或者python安装包等
2+
3+
# 打包类型
4+
5+
可以打包为不同的类型的包,每一种包都可以安装QssStylesheetEditor,主要包括如下几种:
6+
7+
+ Windows安装包:向导式安装程序
8+
+ python pip安装包:
9+
- python zip安装包:pip可以安装的压缩包
10+
- python wheel安装包(.whl):可以用pip直接安装的包
11+
+ 清洁源码包(.zip):手动安装依赖后,可以运行的清洁源码(.py or .pyc)包
12+
13+
# Windows安装包
14+
15+
1、编译源码(py编译为pyc),收集windows平台上依赖的文件
16+
17+
运行build文件夹中的compile_pyscripts.cmd脚本。见“docs/dev/distribution/build.md”
18+
19+
> dist/build文件夹中的文件即为脚本生成的用于打包的文件。
20+
>
21+
> dist/build文件夹中文件实际上就是免安装的绿色版windows程序,可以直接运行。
22+
23+
2、打包为向导式windows安装程序
24+
25+
> 安装Nsis中文增强版
26+
27+
+ 用VNISEDIT打开“installer”文件夹中“installer.nsi”文件。
28+
+ 编译脚本(ctl+F9)
29+
+ dist文件夹中自动生成QssStylesheetEditor1.8_win_x64_Installer.exe
30+
31+
> 双击“QssStylesheetEditor1.8_win_x64_Installer.exe”就可以启动安装程序。
32+
33+
# Pip安装包
34+
35+
> pip安装包是根据“setup.py”和“setup.cfg”生成的,不依赖于installer文件夹中的文件。
36+
37+
**制作wheel包**
38+
39+
执行如下命令:
40+
41+
1. pipenv shell(如果使用了pipenv虚拟环境,先进入虚拟环境)
42+
2. cd QssStylesheetEditor(进入QssStylesheetEditor文件夹)
43+
3. python setup.py bdist_wheel(生成wheel包)
44+
45+
dist文件中生成QssStylesheetEditor-1.8-py3-none-any.whl,可以直接发布了,直接pip install QssStylesheetEditor-1.8-py3-none-any.whl安装就可以用了。
46+
47+
> python setup.py bdist_rpm # rpm格式包
48+
49+
**制作pip安装压缩包**
50+
51+
执行如下命令:
52+
53+
1. pipenv shell(如果使用了pipenv虚拟环境,先进入虚拟环境)
54+
2. cd QssStylesheetEditor(进入QssStylesheetEditor文件夹)
55+
3. python setup.py sdist(生成压缩包)
56+
57+
dist文件中生成QssStylesheetEditor-1.8.tar.gz,可以直接发布了,直接pip install QssStylesheetEditor-1.8.tar.gz安装就可以用了。
58+
59+
60+
# 手动打包清洁源码包
61+
62+
1. 把dist/build/scripts文件中文件拷贝出来。
63+
2. 把main.pyc删除
64+
3. 把bootstrapper.pyc文件名改为qsseditor.pyw
65+
66+
就可以发布了。
67+
68+
使用方法:
69+
70+
+ 用pip安装preimport、tomlconfig、CodeEditor、requests。
71+
+ 鼠标双击 qsseditor.pyw或者命令行运行 `python qsseditor.pyw`

docs/dev/distribution/package.md.bak

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
打包安装程序,或者python安装包等
2+
3+
# 打包类型
4+
5+
可以打包为不同的类型的包,每一种包都可以安装QssStylesheetEditor,主要包括如下几种:
6+
7+
+ Windows安装包:向导式安装程序
8+
+ python pip安装包:
9+
- python zip安装包:pip可以安装的压缩包
10+
- python wheel安装包(.whl):可以用pip直接安装的包
11+
+ 清洁源码包(.zip):手动安装依赖后,可以运行的清洁源码(.py or .pyc)包
12+
13+
# Windows安装包
14+
15+
1、编译源码(py编译为pyc),收集windows平台上依赖的文件
16+
17+
运行build文件夹中的compile_pyscripts.cmd脚本。见“docs/dev/distribution/build.md”
18+
19+
> dist/build文件夹中的文件即为脚本生成的用于打包的文件。
20+
>
21+
> dist/build文件夹中文件实际上就是免安装的绿色版windows程序,可以直接运行。
22+
23+
2、打包为向导式windows安装程序
24+
25+
> 安装Nsis中文增强版
26+
27+
+ 用VNISEDIT打开“installer”文件夹中“installer.nsi”文件。
28+
+ 编译脚本(ctl+F9)
29+
+ dist文件夹中自动生成QssStylesheetEditor1.8_win_x64_Installer.exe
30+
31+
> 双击“QssStylesheetEditor1.8_win_x64_Installer.exe”就可以启动安装程序。
32+
33+
# Pip安装包
34+
35+
> pip安装包是根据“setup.py”和“setup.cfg”生成的,不依赖于installer文件夹中的文件。
36+
37+
**制作wheel包**
38+
39+
执行如下命令:
40+
41+
1. pipenv shell(如果使用了pipenv虚拟环境,先进入虚拟环境)
42+
2. cd QssStylesheetEditor(进入QssStylesheetEditor文件夹)
43+
3. python setup.py bdist_wheel(生成wheel包)
44+
45+
dist文件中生成QssStylesheetEditor-1.8-py3-none-any.whl,可以直接发布了,直接pip install QssStylesheetEditor-1.8-py3-none-any.whl安装就可以用了。
46+
47+
> python setup.py bdist_rpm # rpm格式包
48+
49+
**制作pip安装压缩包**
50+
51+
执行如下命令:
52+
53+
1. pipenv shell(如果使用了pipenv虚拟环境,先进入虚拟环境)
54+
2. cd QssStylesheetEditor(进入QssStylesheetEditor文件夹)
55+
3. python setup.py sdist(生成压缩包)
56+
57+
dist文件中生成QssStylesheetEditor-1.8.tar.gz,可以直接发布了,直接pip install QssStylesheetEditor-1.8.tar.gz安装就可以用了。
58+
59+
60+
# 手动打包清洁源码包
61+

installer/installer.nsi

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,10 @@ SetCompressor /SOLID /FINAL lzma ;ʹ
2323

2424
!define ProductName "QssStylesheetEditor" ;产品名,和项目名相同
2525
!define StartFile "AppStart" ;.exe文件名,启动软件的exe名称
26-
!define Version "1.7" ;版本
26+
!define Version "1.8" ;版本
2727
!define Publisher "lileilei" ;发布人
2828
!define Website "https://github.com/hustlei/QssStylesheetEditor" ;网站地址
29-
!define Year "2019"
29+
!define Year "2023"
3030
!define Brand "hustlei,${Year} @wuhan" ;品牌,作者声明
3131

3232
;资源

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919

2020
setup(
2121
name="QssStylesheetEditor", # ProjectName
22-
version="1.7",
22+
version="1.8",
2323
python_requires='>=3.0.*, <4', # python的依赖关系
2424
install_requires=["requests>=2.0", "preimport>=1.1.0", "tomlconfig>=1.2.1", "CodeEditor>=1.1.0"],
2525

src/config/config.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,4 @@ autoexportqss = ""
1515
[update]
1616
autocheck = ""
1717
checkfreq = ""
18-
lastcheckday = 2022-04-30
18+
lastcheckday = 2023-08-07

0 commit comments

Comments
 (0)