Nuitka / Nuitka

Nuitka is a Python compiler written in Python. It's fully compatible with Python 2.6, 2.7, 3.4-3.12. You feed it your Python app, it does a lot of clever things, and spits out an executable or extension module.
http://nuitka.net
Apache License 2.0
11.8k stars 639 forks source link

Cannot add copyright information for macOS bundles #2658

Closed telenkor closed 8 months ago

telenkor commented 8 months ago

Compilation occurs normally, the finished application performs all its functions. However, when after this I add follow lines for information about the author to the Info.plist file, the functionality is strangely broken.

    <key>NSHumanReadableCopyright</key>
    <string>© 2016–2024 Dmitry Chushkin (mail@mail.com)</string>

The GUI works, the file/directory selection dialog works, but nothing further happens with the selected files. There are no error messages.

However, if I add the following line before compiling ("NSHumanReadableCopyright", "© 2016–2024 Dmitry Chushkin (mail@mail.com)"), to the file /env/lib/python3.11/site-packages/nuitka/utils/MacOSApp.py then my application functions without any problems. And information about the author is displayed in the standard About dialog box.

Nuitka: 1.9.7 MacOS: 12.7.1 Arch: x86_64 Python 3.11.7

Commands for configuration: mkdir -p /Volumes/RAM\ Disk/compil/venv cd /Volumes/RAM\ Disk/compil/venv python3 -m venv env source env/bin/activate pip install nuitka pip install Pillow pip install jdk4py pip install packaging pip install customtkinter pip install --upgrade pip

Command for Nuitka:

python3 -m nuitka --enable-plugin=tk-inter --follow-imports --macos-create-app-bundle --standalone --include-data-dir='./themes'=themes --include-data-dir='./tools'=tools --include-data-files='_version.py'=_version.py --macos-target-arch="x86_64" --macos-signed-app-name="net.telenkor.TestApp" --macos-app-version="0.3.1" --macos-app-icon='/Volumes/RAM Disk/AppIcon.icns' 'test.py'
kayhayen commented 8 months ago

I think that --copyright should be used to do this. Manual editing of signed software is going to make its signature invalid, which has all kinds of effects. In macOS there is always a signature these days.

kayhayen commented 8 months ago

It seems --copyright and --trademark are both not yet implemented for macOS. Given your information, I managed to add it. There seems to be no key for trademarks, so it is using the same one, combining the text of both if they are both present or just using one of it. Let me know if that works for you.

Thanks for your report, this is fixed on the factory branch, which is a development version under rapid development. You can try it out by going here: https://nuitka.net/doc/factory.html

Feedback if this is working is very welcome, just please do not share plans of doing it, but rather confirmations or denials of it working.

telenkor commented 8 months ago

It seems --copyright and --trademark are both not yet implemented for macOS. Given your information, I managed to…

Everything works fine, as you said: --copyright or --trademark have the same effect.

kayhayen commented 8 months ago

If I overlooked a key for it to use with trademarks, let me know. For Windows, this is actually a separate item, but on that page I found, it wasn't listed.

telenkor commented 8 months ago

I wanted to say that this worked for the "factory" version, but for the current 1.9.7 there is no effect.

kayhayen commented 8 months ago

This is now on the develop and the commercial staging branch and part of the latest pre-release, will be part of the 2.0 release that will eventually follow.

kayhayen commented 8 months ago

This is part of the stable release 2.0 that I just made.