$ pyinstaller script.py <spanclass="hljs-comment"># Compiles into './dist/script' directory.</span>
$ pyinstaller script.py --onefile <spanclass="hljs-comment"># Compiles into './dist/script' console app.</span>
$ pyinstaller script.py --windowed <spanclass="hljs-comment"># Compiles into './dist/script' windowed app.</span>
$ pyinstaller script.py --add-data <spanclass="hljs-string">'<path>:.'</span><spanclass="hljs-comment"># Adds file to the root of the executable.</span>
</code></pre></div>
</code></pre></div></div>
<ul>
<li><strong>Paths of files have to be changed to <codeclass="python hljs"><spanclass="hljs-string">'os.path.join(sys._MEIPASS, "<path>")'</span></code>.</strong></li>