Hi René,

 

I’m new to low level binding for Python, although I’m not new to game porting.

 

There is a source file for OS X called sdlmain_osx.m, I haven’t checked it out 
completely, but I assumed it’s the entry point for all the bindings and set an 
executable to run pygame py files, I wonder if there is something similar for 
Windows, I’m trying to understand what are the extensions or how do they get 
built, from setup.py

 

    @add_command('build_ext')

    class WinBuildExt(build_ext):

        """This build_ext sets necessary environment variables for MinGW"""

 

        # __sdl_lib_dir is possible location of msvcrt replacement import

        # libraries, if they exist. Pygame module base only links to SDL so

        # should have the SDL library directory as its only -L option.

        for e in extensions:

            if e.name == 'base':

                __sdl_lib_dir = e.library_dirs[0].replace('/', os.sep)

                break

 

        def build_extensions(self):

            # Add supported optimisations flags to reduce code size with MSVC

            opts = flag_filter(self.compiler, "/GF", "/Gy")

            for extension in extensions:

                extension.extra_compile_args += opts

 

            build_ext.build_extensions(self)

 

I suppose those are Python extensions. The main problem found is the binding 
place in which, for example, the aliens.py file will execute, how does Python 
know where to pick the built bindings for Windows? 

 

It is possible to upgrade Python to something newer, I can definitely start 
working on it, my first attempt was to use the latest Python release, there are 
some key points in the port that would be only specific for UWP/Xbox One that 
can translate to later versions, but it can take at least a few months more. 

 

What is the current Python version pygame Is supporting for pygame 2.0? 

 

From: owner-pygame-us...@seul.org <owner-pygame-us...@seul.org> On Behalf Of 
René Dudfield
Sent: Thursday, November 5, 2020 1:41 AM
To: pygame-users@seul.org
Subject: Re: [pygame] pygame Xbox One port

 

Hello Victor,

 

oh, fun project.

 

To your question... "Where is the main file for Windows?" I'm not sure what you 
mean.

We don't really support python 3.4 in pygame anymore. Is there not something 
newer? If there's not something newer... we can reconsider of course!

 

Looking forward to reading about your progress.

 

best regards,

 

 

On Thu, Nov 5, 2020 at 9:10 AM <greent...@gmail.com 
<mailto:greent...@gmail.com> > wrote:

Hello. 

 

I recently upgraded a Python 3.4 Windows 8.1 port for WinRT to be used with UWP 
and Xbox One. The port can be found at https://github.com/Greentwip/cpython, 
however, I’m troubling myself with the way pygame makes its binding calls to 
SDL DLLs, the cpython port is embedded in such a way it can be called like 
this: 

 

#include <Python.h>

 

int

main(int argc, char *argv[])

{

  Py_SetProgramName(argv[0]);  /* optional but recommended */

  Py_Initialize();

  PyRun_SimpleString("from time import time,ctime\n"

                     "print 'Today is',ctime(time())\n");

  Py_Finalize();

  return 0;

}

 

Where is the main file for Windows?, am I getting it right? There should be a 
main file right? I think it might be a good starting point to start porting 
projects to console platforms.

 

I will share my findings on the code as I slowly port pygame to Xbox One.

 

Thanks!

 

Victor Lopez

 

 

Reply via email to