Commit Graph

30 Commits

Author SHA1 Message Date
rdb f2e66a280c deploy-stub: Fix immediate exit on Windows if no log_filename is set 2020-12-28 15:27:56 +01:00
rdb ce4690b869 deploy-stub: disable PYTHONINSPECT mechanism in +opt builds 2020-09-12 15:10:03 +02:00
rdb e443acd7a0 deploy-stub: Enable line_buffering on Windows when writing to log file
Fixes #947
2020-09-12 15:04:14 +02:00
rdb a94914fd86 deploy-stub: forward compat with Python 4.0 2020-09-12 15:00:41 +02:00
rdb 2880525c1e deploy-stub: flush output streams before exit
Intended to address #946
2020-06-14 11:07:31 +02:00
rdb fc71fef27d deploy-stub: chdir to Resources dir in GUI macOS app bundle
This prevents a common error of trying to load non-Panda3D assets without specifying $MAIN_DIR.  We aren't currently making any guarantees about the cwd (which may in fact be / when launching from Finder), so I think this is safe.
2020-03-30 15:54:50 +02:00
rdb 518dece368 deploy-ng: strip -psn_* argument that macOS passes to GUI apps 2019-10-25 10:37:02 +02:00
rdb eda709bbfc deploy-ng: work around Python 2 crash with logging in GUI apps 2019-04-02 01:31:57 +02:00
rdb 2664a24e6a deploy-ng: fix redirecting GUI app output to log in VC2015/UCRT
Fixes #461
2018-12-02 20:23:09 +01:00
rdb 3124564040 deploy-ng: fix crash when using local logfile in non-writable dir
Fixes #462
2018-12-02 16:27:08 +01:00
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