Building Binaries

Building Binaries

Hello to the community

I am new to running Panda 3D software. My problem is the following. At the time of creating the binaries of my program following the steps of the tutorial: 1: Create a setup.py file for your application

2: Execute python setup.py bdist_apps
It seems to do nothing, I leave images of the setup.py and the cmd window.

Sorry for my English.
a greeting

You have an error in the team name, you need: build_apps

Thanks for answering.
Sorry the picture I sent is wrong. I send the new image where you can see that after executing nothing happens

Hmm try this.:

cd C:/Panda3D-1.10.6-64x/samples/asteroids
c:/Panda3D-1.10.6-64x/python/python.exe setup.py build_apps

If that doesn’t work, could you please show us the contents of your “setup.py” and “requirements.txt” files?

Hello thanks the content of my setup.py file is as follows.

the requirements.txt file is as follows

panda3d

I get the following
C:\Panda3D-1.10.6-x64\python>python.exe setup.py build_apps
python.exe: can’t open file ‘setup.py’: [Errno 2] No such file or directory

You went to the folder with this command?

Wait, is that all of your “setup.py” that you posted there? Because if so, then it seems to have had some of its content cut off–it ends suddenly after “plugins”, without closing the brackets for any of “build_apps”, “options”, or “setup”. (Which might be why the vertical line on the left of the image is red: it’s indicating a problem with the code in the file.)

Continuing the discussion from Building Binaries:

the diagonal bars as you place give me error.

C:>cd C: /Panda3D-1.10.6-64x/samples/asteroids
El sistema no puede encontrar la ruta especificada.

I have to place them in the opposite direction.
C:>cd C:\Panda3D-1.10.6-x64\samples\asteroids

C:\Panda3D-1.10.6-x64\samples\asteroids>

You’re right
You will see the code is taken from the asteroids example.
Following the tutorials on the official Panda website, this example is the only one that can generate binary files.
Anyway I already put the closure, and the result is the same

And so in order:

  1. Open the command window (console)
  2. cd C:\Panda3D-1.10.6-x64\samples\asteroids
    Press enter
  3. C:\Panda3D-1.10.6-x64\python\python.exe setup.py build_apps
    Press enter
from setuptools import setup

setup(
    name="asteroids",
    options = {
        'build_apps': {
            'include_patterns': [
                '**/*.png',
                '**/*.jpg',
                '**/*.egg',
            ],
            'gui_apps': {
                'asteroids': 'main.py',
            },
            'log_filename': '$USER_APPDATA/Asteroids/output.log',
            'log_append': False,
            'plugins': [
                'pandagl',
                'p3openal_audio',
            ],
        }
    }
)

Check carefully.

Ah, wait–cross-checking with another example, I notice that the “setup.py” used by the “Asteroids” example is missing something: it doesn’t specify any platforms to build for!

Perhaps there’s a default, but in case there isn’t, the lack of a target platform might be the reason that you’re not getting any output: the system is being told to build for no platforms at all.

Try adding this after plugins:

"platforms" : [
                "win_amd64"
               # Or "win32", of you're using a 32-bit system
            ]

So that you end up with something like this:

from setuptools import setup

setup(
    name="asteroids",
    options = {
        'build_apps': {
            'include_patterns': [
                '**/*.png',
                '**/*.jpg',
                '**/*.egg',
            ],
            'gui_apps': {
                'asteroids': 'main.py',
            },
            'log_filename': '$USER_APPDATA/Asteroids/output.log',
            'log_append': False,
            'plugins': [
                'pandagl',
                'p3openal_audio',
            ],
            'platforms': [
                'win_amd64',
            ]
        }
    }
)

The fact that there is no output suggests to me that there is something really screwing going on here, and that setuptools isn’t even being run.

What happens if you run python on it’s own, do you get the REPL environment? What command do you us to run your game?

Also, to clear up a couple of things:

  1. bdist_apps and build_apps are both valid commands. build_apps will build binaries and bdist_apps packages them. bdist_apps also runs build_apps.
  2. There is a default value for platforms it’s manylinux1_x86_64, macosx_10_6_x86_64, win_amd64
1 Like

It seems this works Thanks
Forgive me but I am a little lost.
Now I get a series of errors.

Do you have a 32-bit system? You need to install.

Installer for Windows (32-bit)

As well as additionally change the file, setup.py on this occasion to such content:

from setuptools import setup

setup(
    name="asteroids",
    options = {
        'build_apps': {
            'include_patterns': [
                '**/*.png',
                '**/*.jpg',
                '**/*.egg',
            ],
            'gui_apps': {
                'asteroids': 'main.py',
            },
            'log_filename': '$USER_APPDATA/Asteroids/output.log',
            'log_append': False,
            'plugins': [
                'pandagl',
                'p3openal_audio',
            ],
            'platforms': [
                'win32',
            ]
        }
    }
)

I have a 64 bit system. I understand that these systems run 32 bit. please correct me if I’m wrong.
Anyway if I don’t put anything in the setup.py it creates for all the default platforms (linux, mac, Windows) as the documentation says, and it shows me an error for each system.

Is your system a Windows 32 or 64 bit? If 64 bits, then try this.

from setuptools import setup

setup(
    name="asteroids",
    options = {
        'build_apps': {
            'include_patterns': [
                '**/*.png',
                '**/*.jpg',
                '**/*.egg',
            ],
            'gui_apps': {
                'asteroids': 'main.py',
            },
            'log_filename': '$USER_APPDATA/Asteroids/output.log',
            'log_append': False,
            'plugins': [
                'pandagl',
                'p3openal_audio',
            ],
            'platforms': [
                'win_amd64',
            ]
        }
    }
)

I have exactly the same error if I try on Windows 64 bit, build a “win32” build"

running build_apps
Building platforms: win32
Gathering wheels for platform: win32
Looking in indexes: https://pypi.org/simple, https://archive.panda3d.org/simple/opt, https://archive.panda3d.org/thirdparty
Collecting panda3d (from -r C:\Panda3D-1.10.6-x64\samples\asteroids\requirements.txt (line 1))
  File was already downloaded c:\panda3d-1.10.6-x64\samples\asteroids\build\__whl_cache__\win32_cp37m\panda3d-1.10.6+opt-cp37-cp37m-win32.whl
Successfully downloaded panda3d
WARNING: You are using pip version 19.2.3, however version 20.0.2 is available.
You should consider upgrading via the 'python -m pip install --upgrade pip' command.
Building runtime for platform: win32
There are some missing modules: ['__builtin__', '_posixsubprocess']
warning: build_apps: could not find dependency VERSION.dll (referenced by python37.dll)

warning: build_apps: could not find dependency VCRUNTIME140.dll (referenced by python37.dll)

warning: build_apps: could not find dependency VCRUNTIME140.dll (referenced by deploy-stubw.exe)

warning: build_apps: could not find dependency SETUPAPI.dll (referenced by libpanda.dll)

warning: build_apps: could not find dependency bcrypt.dll (referenced by libcrypto-1_1.dll)

Copying game files for platform: win32

Writing /c/Panda3D-1.10.6-x64/samples/asteroids/build/win32/models/plane.egg.bam

C:\Panda3D-1.10.6-x64\samples\asteroids>

The conclusion is simple, you can’t be on a 64-bit system and build a 32-bit build in reverse too.