Commits

marcus  committed 33632d0

Updated release management document.
Reenabled smpeg build in msys_build_deps.py (for MP3 playback)
freetype font file handling works for unicode under Python 2.x now.

  • Participants
  • Parent commits 53e233d
  • Branches pgreloaded

Comments (0)

Files changed (8)

File doc/Makefile

 	@cp -f BuildUnix.txt buildunix.rst
 	@cp -f MODULES.txt newmodules.rst
 	@cp -f MODULE_FAQ.txt module_faq.rst
+	@cp -f RELEASE.txt release.rst
 	@cp -f ../NEWS.txt news.rst
 
 help:
 	@rm -rf sphinx/build *~ *.pyc *.orig ref/pygame2_*
 	@rm -f ref/pygame2.rst ref/*~ ref/*.pyc ref/*.orig
 	@rm -f builddarwin.rst buildmingw.rst buildunix.rst buildvc.rst
-	@rm -f newmodules.rst module_faq.rst news.rst
+	@rm -f newmodules.rst module_faq.rst news.rst release.rst
 
 clean: docclean
 	@rm -rf html

File doc/RELEASE.txt

 * Update README.txt and doc/BuildXXX.txt to point to the latest required
   dependency versions.
 
-* Make sure, all tests for all supported Python versions work.
+* Make sure, all tests for all supported Python versions work on all
+  platforms. ::
+
+  make clean
+  make purge_installs
+  make installall
+  make testall
+  make testall2
 
 Editing News
 ============
 Releasing
 =========
 Once anything's tested, updated written down, the required packages have to be
-built. TODO
+built. First of all, the source packages are required as the binary packages
+will be built using them. ::
+
+    make release
+
+This also will create a set of bundled docs to be distributed.
+
+Win32 installers
+----------------
+For Win32 platforms, binary builds (MSI packages) for the Python versions
+*2.4*, *2.5*, *2.6* and *3.0* have to be made, based on one of the source
+packages, which were just created. ::
+
+  # For Python 2.4
+  c:\PythonXX\python.exe setup.py build bdist_wininst
+  
+  # For Python > 2.4
+  c:\PythonXX\python.exe setup.py build bdist_msi
+
+Once all installers are available, make sure they work and ship anything
+required by running the unit tests: ::
+
+  # Under Msys:
+  make testall
+  
+  # Win32 CMD prompt (do that for all versions):
+  c:\PythonXX\python.exe -c "import pygame2.test; pygame2.test.run ()"
+
+Mac OS X installers
+-------------------
+*TODO: Instructions for Mac OS X platforms*
+
+Once all packages are built the revision control tree can be tagged with the
+new version, the packages be published and an announcement sent to the mailing
+list.
 
 Postprocessing
 ==============
 likely to fail and the user will blame either the developer or the library.
 
 With a consistent versioning scheme, developers can test against versions
-explicitly to guarantee the functionality with those. User can receive an
+explicitly to guarantee the functionality with those. Users can receive an
 explicit notice, if their installed version might be incompatible and react
 upon that accordingly.
 

File doc/index.rst

    modules.rst
    capi.rst
    extending.rst
+   release.rst
 
 .. todolist::
 

File doc/src/sdlttfsysfont.xml

       This will search the system fonts for the given font name. You can
       also enable bold or italic styles, and the appropriate system font
       will be selected if available.
-      
-      This will always return a valid Font object, and will fallback on
-      the builtin pygame font if the given font is not found.
-
-      Name can also be a comma separated list of names, in which case
-      set of names will be searched in order.
     </desc>
     <example></example>
   </func>

File lib/sdlttf/sysfont.py

     This will search the system fonts for the given font name. You can also
     enable bold or italic styles, and the appropriate system font will be
     selected if available.
-
-    Name can also be a comma separated list of names, in which case set of
-    names will be searched in order.
     """
     if style is None:
         style = constants.STYLE_NORMAL
     bold = (style & constants.STYLE_BOLD) == constants.STYLE_BOLD
     italic = (style & constants.STYLE_ITALIC) == constants.STYLE_ITALIC
-    
+
     if name:
         fontname, gotbold, gotitalic = \
             pygame2.font.find_font (name, bold, italic, "ttf")

File msys_build_deps.py

   make clean
 fi
 """),
+    Dependency('SMPEG', ['smpeg-[0-9].*', 'smpeg'], ['smpeg.dll'], """
+
+set -e
+cd $BDWD
+
+if [ x$BDCONF == x1 ]; then
+  # This comes straight from SVN so has no configure script
+  if [ ! -f "./configure" ]; then
+    ./autogen.sh
+  fi
+  ./configure --disable-gtk-player --disable-opengl-player --disable-gtktest
+fi
+
+if [ x$BDCOMP == x1 ]; then
+  make CXXLD='$(CXX) -no-undefined'
+fi
+
+if [ x$BDINST == x1 ]; then
+  make install
+fi
+
+if [ x$BDSTRIP == x1 ]; then
+  strip --strip-all /usr/local/bin/smpeg.dll
+fi
+
+if [ x$BDCLEAN == x1 ]; then
+  set +e
+  make clean
+fi
+"""),
     Dependency('OGG', ['libogg-[1-9].*'], ['libogg-0.dll'], """
 
 set -e

File src/freetype/ft_font.c

     }
 
     if (!r_pixels)
+    {
+        PyErr_SetString (PyExc_PyGameError, PGFT_GetError (ft));
         goto cleanup;
+    }
 
     rtuple = Py_BuildValue("(iiO)", width, height, r_pixels);
 

File src/freetype/ft_wrap.c

     FT_UInt16 *utf16_buffer = NULL;
     *must_free = 0;
 
-#ifdef IS_PYTHON_3
     /* 
      * If this is Python 3 and we pass an unicode string,
      * we can access directly its internal contents, as
     if (PyUnicode_Check(obj))
     {
         utf16_buffer = (FT_UInt16 *)PyUnicode_AS_UNICODE(obj);
-    } else
-#endif
+    }
+    else if (Bytes_Check(obj))
+    {
+    
+        const char *latin1_buffer;
+        size_t i, len;
 
-        /*
-         * If we pass a Bytes array, we assume it's standard
-         * text encoded in Latin1 (SDL_TTF does the same).
-         * We need to expand each character into 2 bytes because
-         * FreeType expects UTF16 encodings.
-         *
-         * TODO: What happens if the user passes a byte array
-         * representing e.g. a UTF8 string? He would be mostly
-         * stupid, yes, but we should probably handle it.
-         */
-        if (Bytes_Check(obj))
-        {
-            const char *latin1_buffer;
-            size_t i, len;
+        latin1_buffer = (const char *)Bytes_AsString(obj);
+        len = strlen(latin1_buffer);
 
-            latin1_buffer = (const char *)Bytes_AsString(obj);
-            len = strlen(latin1_buffer);
+        utf16_buffer = malloc((len + 1) * sizeof(FT_UInt16));
+        if (!utf16_buffer)
+            return NULL;
 
-            utf16_buffer = malloc((len + 1) * sizeof(FT_UInt16));
-            if (!utf16_buffer)
-                return NULL;
+        for (i = 0; i < len; ++i)
+            utf16_buffer[i] = (FT_UInt16)latin1_buffer[i];
 
-            for (i = 0; i < len; ++i)
-                utf16_buffer[i] = (FT_UInt16)latin1_buffer[i];
-
-            utf16_buffer[i] = 0;
-            *must_free = 1;
-        }
+        utf16_buffer[i] = 0;
+        *must_free = 1;
+    }
 
     return utf16_buffer;
 }