PyInstaller编译python3时使用的详细参数介绍
继续翻译中。。。。
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/
PyInstaller编译python3时使用的详细参数介绍的更多相关文章
- Monkey框架(基础知识篇) - monkey启动与参数介绍
一.monkey启动 直接PC启动:> adb shell monkey [options] <count> shell 端启动:> adb shell >monkey ...
- 一些编译php时的configure 参数
一些编译php时的configure 参数 ./configure –prefix=/usr/local/php php 安装目录 –with-apxs2=/usr/local/apache/bin/ ...
- 使用autotools工具用configure、make、make install编译安装linux工程的详细步骤
使用autotools工具用configure.make.make install编译安装linux工程的详细步骤 转载tmxkwzy 最后发布于2016-11-24 10:20:15 阅读数 324 ...
- 如何在编译内核时添加缺少的固件(随着intel wireless 5100 AGN的 iwlwifi 案例)
我不知道你在笔记本使用 Linux 在内核编译无线wifi 不能用.我的书"关联 Y450"一个足够的旧书,随着无线网卡: $ lspci | grep Wireless 06:0 ...
- $_SERVER的详细参数整理下
PHP编程中经常需要用到一些服务器的一些资料,特把$_SERVER的详细参数整理下,方便以后使用. $_SERVER['PHP_SELF'] #当前正在执行 脚本的文件名,与 document roo ...
- 编译内核时覆盖KBUILD_BUILD_USER和KBUILD_BUILD_HOST
默认情况下make kernel.img编译出来的内核在/proc/version中显示的内容是: Linux version 3.0.36+ (xxx@yyyy) (gcc version 4.6. ...
- JQuery中Ajax详细参数使用案例
JQuery中Ajax详细参数使用案例 参考文档:http://www.jb51.net/shouce/jquery1.82/ 参考文档:http://jquery.cuishifeng.cn/jQu ...
- .NET编译项目时出现《此实现不是 Windows 平台 FIPS 验证的加密算法的一部分》处理方法
有用户提出在编译代码时出现源文件“D:\.......ervice.cs”未能打开(“此实现不是 Windows 平台 FIPS 验证的加密算法的一部分.”)的问题,如下图所示: 对于上面的问题,只需 ...
- 编译驱动模块时,出现“stack protector enabled but no compiler support”[解决办法]【转】
转自:http://blog.chinaunix.net/uid-26847859-id-3297170.html 原文地址:编译驱动模块时,出现“stack protector enabled bu ...
随机推荐
- weback学习笔记
weback可以把各种资源,例如JS(含JSX).coffee.样式(含less/sass).图片等都作为模块来使用和处理.同时支持amd cmd CommonJS语法.同时可以和gulp一块使用. ...
- sublime Text3使用笔记
转载:http://blog.csdn.net/u012771929/article/details/30030249 目录: 1.setting 安装插件,package control ,Emme ...
- Elasticsearch 安装与启动
平台支撑 ES支持在不同的平台上运行,下面这幅图中,对号标记的是经过测试的平台,其他的也可以运行,但是可能会出现BUG. 下载与安装 在官网下载地址就可以进行下载. 然后解压,进入bin目录,运行下面 ...
- Redis发布订阅实现原理
发布订阅中使用到的命令就只有三个:PUBLISH,SUBSCRIBE,PSUBSCRIBE PUBLISH 用于发布消息 SUBSCRIBE 也叫频道订阅,用于订阅某一特定的频道 PSUBSCRIBE ...
- 计算机中数据实体和数据表示形式(以C#为例)
摘自网络的一段话: “在程序代码中,可以用多种方式表示数据,十进制.十六进制.八进制都是常用的表示方式,但计算机内部永远就只使用二进制,与你写程序时用什么无关.你说要定义数组int a[10],其中涉 ...
- javascript设计模式之单体模式
一入前端深似海,刚入前端,以为前端只是div+css布局外加jquery操作DOM树辣么简单.伴随着对前端学习的深入,发现前端也是博大精深,而且懂得越多,才发现自己越无知,所以一定不能停下脚步的学习. ...
- unity3d引擎的学习
1.在project里面建立一个Editor文件夹,并在其下面放置配置某个游戏物体X的脚本,就可以在游戏物体那一栏里面新建该游戏物体X. 2.将一个游戏物体B放到某个游戏物体F下,点击Reset po ...
- MEF入门之不求甚解,但力求简单能讲明白(一)
起因:工作需要针对不同类型的文件做不同的处理.打个比方,txt文件,直接打印,doc文件,直接发email,jpg文件,上传xxx相册站点. 其实这个问题在学习最基本的工厂模式的时候早已经解决了,稍有 ...
- Zookeeper安装,Zookeeper单机模式安装
http://zookeeper.apache.org/releases.html#download 下载解压到(我自己的)解压到 /usr/local 下 把名字改成 zookeeper 进入zoo ...
- 关于Bugzilla WebService接口
参考:http://www.bugzilla.org/docs/3.2/en/html/api/Bugzilla/WebService.html http://www.bugzilla.org/doc ...