Skip to content

Instantly share code, notes, and snippets.

View nskrypnik's full-sized avatar

Niko Skrypnik nskrypnik

View GitHub Profile
[INFO ] [Window ] virtual keyboard not allowed, single mode, not docked
[DEBUG ] [Atlas ] Load <c:\kivy\kivy\kivy\data\..\data\images\defaulttheme.atlas>
[DEBUG ] [Atlas ] Need to load 1 images
[DEBUG ] [Atlas ] Load <c:\kivy\kivy\kivy\data\..\data\images\defaulttheme-0.png>
[DEBUG ] [ImagePygame ] Load <c:\kivy\kivy\kivy\data\..\data\images\defaulttheme-0.png>
OpenGL Warning: VBoxCrHgsmiCreate failed
[DEBUG ] [ImagePygame ] Load <examples/widgets\softboy.png>
OpenGL Warning: VBoxCrHgsmiCreate failed
[INFO ] [GL ] NPOT texture support is available
OpenGL Warning: VBoxCrHgsmiCreate failed
import cymunk as cy
from os.path import dirname, join
from kivy.clock import Clock
from kivy.app import App
from kivy.graphics import Color, Rectangle, PopMatrix, PushMatrix
from kivy.uix.widget import Widget
from kivy.properties import DictProperty, ListProperty
from kivy.core.image import Image
from random import random
from kivy.lang import Builder
@nskrypnik
nskrypnik / gist:7206351
Created October 28, 2013 23:02
Crash log fragment while using custom font on Android
I/python ( 3232): [INFO ] [Text ] Provider: pygame
I/python ( 3232): [DEBUG ] [App ] Loading kv <./moonrabbit.kv>
D/KeyguardViewMediator( 186): setHidden false
I/python ( 3232): [DEBUG ] [ImagePygame ] Load <resources/interface/logo.png>
D/AudioHardwareTinyALSA( 99): Entering AudioStreamOutALSA standby mode
I/AudioHardwareTinyALSA( 99): Close mHandle:16c3260
I/python ( 3232): [DEBUG ] [ImagePygame ] Load <resources/grass/grass-texture.png>
I/python ( 3232): [INFO ] [OSC ] using <thread> for socket
I/python ( 3232): [DEBUG ] [Base ] Create provider from android
I/python ( 3232): [INFO ] [Base ] Start application main loop
@nskrypnik
nskrypnik / gist:7321127
Created November 5, 2013 15:50
Error while trying to load .tga image
I/python (21813): Traceback (most recent call last):
I/python (21813): File "/home/niko/projects/kivyorigin/trackball/main.py", line 142, in <module>
I/python (21813): File "/home/niko/projects/android/python-for-android/build/python-install/lib/python2.7/site-packages/kivy/app.py", line 705, in run
I/python (21813): File "/home/niko/projects/kivyorigin/trackball/main.py", line 139, in build
I/python (21813): File "/home/niko/projects/kivyorigin/trackball/main.py", line 33, in __init__
I/python (21813): File "/home/niko/projects/kivyorigin/trackball/main.py", line 56, in setup_scene
I/python (21813): File "/home/niko/projects/android/python-for-android/build/python-install/lib/python2.7/site-packages/kivy/core/image/__init__.py", line 440, in __init__
I/python (21813): File "/home/niko/projects/android/python-for-android/build/python-install/lib/python2.7/site-packages/kivy/core/image/__init__.py", line 628, in _set_filename
I/python (21813): File "/home/niko/projects/android
@nskrypnik
nskrypnik / gist:7450085
Created November 13, 2013 14:36
Error while kivy-ios compiling
./Parser/hostpgen ./Grammar/Grammar ./Include/graminit.h ./Python/graminit.c
./Parser/hostpgen ./Grammar/Grammar ./Include/graminit.h ./Python/graminit.c
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -c -fno-strict-aliasing -arch armv7 -pipe -no-cpp-precomp -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS6.1.sdk -miphoneos-version-min=6.1 -O3 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I. -IInclude -I./Include -DPy_BUILD_CORE -o Python/symtable.o Python/symtable.c
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -c -fno-strict-aliasing -arch armv7 -pipe -no-cpp-precomp -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS6.1.sdk -miphoneos-version-min=6.1 -O3 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I. -IInclude -I./Include -DPy_BUILD_CORE -o Python/ast.o Python/ast.c
/Applications/Xcode.app/
@nskrypnik
nskrypnik / gist:7484212
Created November 15, 2013 13:19
Patch for cythonize file to build cymunk properly
diff --git a/tools/cythonize.py b/tools/cythonize.py
index 2963624..a64585d 100755
--- a/tools/cythonize.py
+++ b/tools/cythonize.py
@@ -29,7 +29,7 @@ def do(fn):
# cythonize
subprocess.Popen([cython, fn], env=os.environ).communicate()
- if not package:
+ if not package or package == 'cymunk_python':
#!/bin/sh
# build-cymunk.sh
#
#
# Created by Niko Skrypnik on 11/14/13.
#
. $(dirname $0)/environment.sh
import win32com.client
import os
# Change to match your psd file
psdFile = r'E:\topestate\1main.psd'
exportPath = r'E:\topestate\main'
# Photoshop actually exposes several different COM interfaces,
# including one specifically for classes defining export options.
building 'kivy.core.text.text_sdlttf' extension
creating build/temp.macosx-10.7-armv7-2.7/kivy/core/text
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -arch armv7 -pipe -no-cpp-precomp -miphoneos-version-min=6.1 -O3 -g -I/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS6.1.sdk -I/Users/nskrypnik/kivy-ios/build/include -I/Users/nskrypnik/kivy-ios/build/include/SDL -I/Users/nskrypnik/kivy-ios/build/include/freetype -I/Users/nskrypnik/kivy-ios/tmp/Python-2.7.1/Include -I/Users/nskrypnik/kivy-ios/tmp/Python-2.7.1 -c kivy/core/text/text_sdlttf.c -o build/temp.macosx-10.7-armv7-2.7/kivy/core/text/text_sdlttf.o -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS6.1.sdk
kivy/core/text/text_sdlttf.c:1:2: error: Do not use this file, it is the result of a failed Cython compilation.
#error Do not use this file, it is the result
-- cythonize ['/Users/nskrypnik/kivy-ios/tools/cythonize.py', './kivy/core/text/text_sdlttf.pyx']
cythonize: ./kivy/core/text/text_sdlttf.pyx
Error compiling Cython file:
------------------------------------------------------------
...
if ext.lower() == 'ttf':
fontobject = TTF_OpenFont(fontname, int(self.options['font_size']))
# fallback to search a system font