我正在开发一些伪GUI应用程序(基于思想家),我需要创建可执行的Windows Installer。 我创建了main函数,只创建了logger和输入小部件。
import logging
import sys
import os
import datetime
import InputWidget
logger = logging.getLogger("xxx")
def main():
filename = "xxx" + datetime.datetime.now().strftime('%Y-%m-%d-%H.%M.%S') + ".log"
log_file = os.path.abspath(os.path.join('logs',filename))
logging.basicConfig(filename=log_file,
filemode='a',
format='%(asctime)s:%(msecs)d %(levelname)s %(name)s \t %(message)s',
datefmt='%H:%M:%S',
level=logging.DEBUG)
logger.info("Start application")
widget = InputWidget.InputWidget()
widget.run()
然后我在this example
之后创建了 installer.cfg 文件[Application]
name=xxx
version=1.0
entry_point=main:main
icon=config/Stopwatch.ico
console=true
[Python]
version=2.7.14
bitness=64
[Include]
# Importable packages that your application requires, one per line
packages = src
future
gspread
impala
mistune
numpy
oauth2client
pandas
pypi_wheels = google-api-python-client==1.6.4
PyDrive==1.3.1
Pygments==2.2.0
pygsheets==1.1.3
# Other files and folders that should be installed
files = config\
logs\
但是在安装之后,windows无法找到python。如何指定python安装点?
你能告诉我如何输出环境变量吗?
如何改进 installer.cfg 文件?
使用pynsist作为部署工具是个好主意吗?也许你有更好的建议?