继续翻译中。。。。

The syntax of the pyinstaller command is:

pyinstaller [options] script [script ...] | specfile

//You may give a path to the script or spec file, for example
pyinstaller options... ~/myproject/source/myscript.py //or, on Windows,
pyinstaller "C:\Documents and Settings\project\myscript.spec"

生成什么:

-F, --onefile
创建一个捆绑好的可执行文件。Create a one-file bundled executable. -D, --onedir
创建一个文件夹包含可执行包(默认)。Create a one-folder bundle containing an executable (default) --specpath=DIR
指定存储生成的规范文件的文件夹。Folder to store the generated spec file (default: current directory) -n NAME, --name=NAME
打包好的可执行文件的名字。Name to assign to the bundled app and spec file (default: first script's basename) //form http://www.cnblogs.com/osfipin/

什么包,搜索位置

-p DIR, --paths=DIR
A path to search for imports (like using PYTHONPATH). Multiple paths are allowed, separated by ':', or use this option multiple times --hidden-import=MODULENAME
Name an import not visible in the code of the script(s). This option can be used multiple times. --additional-hooks-dir=HOOKSPATH
An additional path to search for hooks. This option can be used multiple times. --runtime-hook=RUNTIME_HOOKS
Path to a custom runtime hook file. A runtime hook is code that is bundled with the executable and is executed before any other code or module to set up special features of the runtime environment. This option can be used multiple times. --exclude-module=EXCLUDES
Optional module or package (his Python names,not path names) that will be ignored (as thoughit was not found).This option can be used multiple times. --key=KEY
The key used to encrypt Python bytecode.

如何生成

-d, --debug
Tell the bootloader to issue progress messages while initializing and starting the bundled app. Used to diagnose problems with missing imports. -s, --strip
在可执行程序和共享库应用一个符号表条(不建议用于Windows)。Apply a symbol-table strip to the executable and shared libs (not recommended for Windows) --noupx Do not use UPX even if it is available (works differently between Windows and *nix)

Windows和Mac OS X特定选项

-c, --console, --nowindowed
显示控制台窗口(默认)。Open a console window for standard i/o (default) -w, --windowed, --noconsole
不显示控制台窗口(背景黑色的窗口)。Windows and Mac OS X: do not provide a console window for standard i/o. On Mac OS X this also triggers building an OS X .app bundle.This option is ignored in *NIX systems. -i <FILE.ico or FILE.exe,ID or FILE.icns>, --icon=<FILE.ico or FILE.exe,ID or FILE.icns>
加入图标。FILE.ico: apply that icon to a Windows executable. FILE.exe,ID, extract the icon with ID from an exe. FILE.icns: apply the icon to the .app bundle on Mac OS X

Windows特定的选项

--version-file=FILE
add a version resource from FILE to the exe -m <FILE or XML>, --manifest=<FILE or XML>
add manifest FILE or XML to the exe -r <FILE[,TYPE[,NAME[,LANGUAGE]]]>, --resource=<FILE[,TYPE[,NAME[,LANGUAGE]]]>
Add or update a resource of the given type, name and language from FILE to a Windows executable. FILE can be a data file or an exe/dll. For data files, at least TYPE and NAME must be specified. LANGUAGE defaults to 0 or may be specified as wildcard * to update all resources of the given TYPE and NAME. For exe/dll files, all resources from FILE will be added/updated to the final executable if TYPE, NAME and LANGUAGE are omitted or specified as wildcard *.This option can be used multiple times. --uac-admin
Using this option creates a Manifest which will request elevation upon application restart. --uac-uiaccess
Using this option allows an elevated application to work with Remote Desktop.

Mac OS X的特定选项

--osx-bundle-identifier=BUNDLE_IDENTIFIER
Mac OS X .app bundle identifier is used as the default unique program name for code signing purposes. The usual form is a hierarchical name in reverse DNS notation. For example: com.mycompany.department.appname (default: first script's basename)

//osfipin来自 http://www.cnblogs.com/osfipin/

最新文章

  1. mysql实用操作
  2. C#操作文件夹及文件的方法的使用
  3. 【BZOJ1013】【JSOI2008】球形空间产生器sphere(高斯消元)
  4. [USACO2002][poj1946]Cow Cycling(dp)
  5. Redis配置文件之————redis.conf配置及说明
  6. linux下文件编码的查看与修改
  7. mysql --The MEMORY Storage Engine--官方文档
  8. 用document.onreadystatechange和document.readyState确保文档加载完毕才获取DOM
  9. [BJOI2019]光线(递推)
  10. express应用程序生成器
  11. 网络基础&#160;记一次HTTPS证书验证测试过程
  12. Golang的Json encode/decode以及[]byte和string的转换
  13. Linux 网络管理、软件包安装
  14. 洛谷 P3899 [谈笑风生]
  15. hive数据查询
  16. 迪米特法则(Law of Demeter, LoD)
  17. iOS.Location-Based Service
  18. 利用Github搭建自己的博客
  19. ispriter自动构建css-sprite
  20. 我的&quot;gethup&quot;(GitHub)注册之旅

热门文章

  1. Anliven - 有效阅读的方法
  2. javascript学习总结(一):基础知识。
  3. Java开发中的高频Collections用法总结与Java平台实现源代码查看方式
  4. 开启事务时mybatis返回主键id
  5. ECharts整合HT&#160;for&#160;Web的网络拓扑图应用
  6. 关于HttpHandler的相关知识总结
  7. [python基础]关于装饰器
  8. Json.Net
  9. jQuery uploadify在谷歌和火狐浏览器下无法上传
  10. 你应该知道的 RPC 原理