20 Commits

Author SHA1 Message Date
Mitchell Stokes
495ce50d84 deploy-ng: NULL terminate readlink() result in deploy-stub 2018-08-18 21:36:45 -07:00
rdb
d00109452a deploy-ng: set __file__ for all frozen modules (using import hooks)
Many thirdparty libraries rely on __file__ being set properly, for example to be able to locate data files, so it is easiest to just set this to something remotely sensible (like the executable path).
2018-05-13 23:37:40 +02:00
rdb
742c143a01 deploy-ng: support logging via log_filename (and log_append) setting 2018-04-08 17:57:48 +02:00
rdb
2c35d7a8e9 deploy-ng: changes to make macOS app bundles work correctly 2017-12-21 15:49:16 +01:00
rdb
a512c44366 deploy-ng: fix Windows codec error when console codepage is 0 2017-12-21 14:09:09 +01:00
rdb
f703fd51ed deploy-ng: allow deploy-stub to set MAIN_DIR via blobinfo 2017-12-21 12:25:17 +01:00
rdb
dac08490ee deploy-ng: implement getting executable path on Linux and macOS 2017-11-24 23:43:15 +01:00
rdb
409b241b40 Fix compile errors 2017-11-24 22:38:51 +01:00
rdb
d755de849c deploy-ng: new extensible blob format with PRC configurability 2017-11-24 21:48:18 +01:00
rdb
da2ad0f0bc deploy-ng: default to ACP if console codepage codec wasn't frozen
This is necessary because when Python is initialized, it takes the codec to use from GetConsoleCP() and GetConsoleOutputCP() without bothering to check whether the given codec is available.  However, in most cases, the console codepage will be the same as the ANSI codepage (ie. GetACP()) which is always supported by Python via the 'mbcs' codec.

So what we do is we check whether the console codepage is frozen in, and if not, we set the console codepage to the ANSI codepage and set the stdin/stdout/stderr encoding to 'mbcs'.

This is still not a perfect solution because the ACP may not be able to encode all characters that the application is printing, which would still result in unexpected errors.  Ideally, we'd pull in Python 3.6's _io._WindowsConsoleIO class, which bypasses this whole mess by directly using the wide-character Windows APIs to write to the console.
2017-11-22 19:33:17 +01:00
rdb
2026879ac9 deploy-ng: change format of blob to be easily mappable by deploy-ng 2017-09-19 23:11:59 +02:00
rdb
1c018f5bdb deploy-ng: fixes for FreeBSD 2017-09-19 22:03:44 +02:00
Mitchell Stokes
efd25e98a5 deploy-stub: Fix memory leaks 2017-01-28 23:35:00 -08:00
Mitchell Stokes
eec5c997c0 deploy-ng: Use length-prefixed strings for writing modules to deploy-stub
This wastes less space than always using 256 characters for every module
name.
2017-01-19 19:43:11 -08:00
rdb
31136124c7 deploy-ng: fix issues with Python 3 / Windows / Unicode, add deploy-stubw 2017-01-06 01:42:00 +01:00
rdb
bae19a203b deploy-ng: changes to make it work on Windows 2016-12-08 13:21:10 +01:00
rdb
0002030e86 deploy-ng: fix missing Py_DecodeLocale definition error 2016-12-06 02:32:08 +01:00
rdb
4335e3759a Update Py_FrozenMain to work with Python 3.2 2016-12-06 02:14:39 +01:00
rdb
f001bd20d7 deploy-ng: fix issues with Mac/Python 2 build 2016-12-05 18:55:04 -05:00
Mitchell Stokes
aa6e722941 Create experimental yapdt (Yet Another Panda3D Deployment Tool)
This uses FreezeTool and a new deploy-stub binary to create frozen
applications without needing a compiler when running the tool. This tool
is for experimenting with deployment options and is currently inflexible
and hacky.
2016-11-08 19:40:30 -08:00