From 56e845753a0030dc08aafec6059ba8b92b25e7e2 Mon Sep 17 00:00:00 2001 From: Eowyn Date: Fri, 21 Dec 2012 13:53:24 -0500 Subject: [PATCH] Adds recommended line normalization If you have line normalization set for the repo, developers won't have to worry about their settings. https://help.github.com/articles/dealing-with-line-endings --- .gitattributes | 22 ++++ kivy/tools/packaging/README.txt | 22 ++-- kivy/tools/packaging/win32/README.txt | 158 +++++++++++++------------- kivy/tools/packaging/win32/kivy.bat | 104 ++++++++--------- kivy/tools/packaging/win32/kivyenv.sh | 106 ++++++++--------- 5 files changed, 217 insertions(+), 195 deletions(-) create mode 100644 .gitattributes diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000000..412eeda78d --- /dev/null +++ b/.gitattributes @@ -0,0 +1,22 @@ +# Auto detect text files and perform LF normalization +* text=auto + +# Custom for Visual Studio +*.cs diff=csharp +*.sln merge=union +*.csproj merge=union +*.vbproj merge=union +*.fsproj merge=union +*.dbproj merge=union + +# Standard to msysgit +*.doc diff=astextplain +*.DOC diff=astextplain +*.docx diff=astextplain +*.DOCX diff=astextplain +*.dot diff=astextplain +*.DOT diff=astextplain +*.pdf diff=astextplain +*.PDF diff=astextplain +*.rtf diff=astextplain +*.RTF diff=astextplain diff --git a/kivy/tools/packaging/README.txt b/kivy/tools/packaging/README.txt index 39888e15fa..b7d50e9b39 100644 --- a/kivy/tools/packaging/README.txt +++ b/kivy/tools/packaging/README.txt @@ -1,12 +1,12 @@ -The files in teh win32 and osx subdirectories are -source and resource files that are used in the respective -portable packaged versions of kivy for each OS. Here, they -are under version controll. - -setup.py copies these files into the portable distribution -package that is created when you launch -'setup.py build_portable' - - -For example the win32 dir has the READMEand bat file which +The files in teh win32 and osx subdirectories are +source and resource files that are used in the respective +portable packaged versions of kivy for each OS. Here, they +are under version controll. + +setup.py copies these files into the portable distribution +package that is created when you launch +'setup.py build_portable' + + +For example the win32 dir has the READMEand bat file which sets up the ENV variables and launches the python interpreter. \ No newline at end of file diff --git a/kivy/tools/packaging/win32/README.txt b/kivy/tools/packaging/win32/README.txt index b8c5612a9a..dbd4fa6255 100644 --- a/kivy/tools/packaging/win32/README.txt +++ b/kivy/tools/packaging/win32/README.txt @@ -1,79 +1,79 @@ -!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -READ THIS FIRST -!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - -This version of Kivy is a portable win32 version, 32 bits. (it work also for -64 bits Windows.) This means everything you need to run kivy (including -python and all other dependencies etc) are included. - -This README only addresses the things specific to the portable version of kivy. -For general information on how to get started, where to find the documentation -and configuration see the README file in the kivy directory about Kivy. - -!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - - -Running portable Kivy -===================== - -The same directory that has this README file in it, contains a file called kivy.bat -running this kivy.bat file will set up the environment for kivy and starts the -python interpreter with any arguments you passed - -Example -~~~~~~~ - -If you open a command line and go to the directory (or add it to your PATH) -You can run the following: - -kivy test.py -w <-- will run test.py as a python script with kivy ready to use - - -Run a Kivy application without going to the command line -======================================================== - -Two options : - -1. You can drag your python script on top the kivy.bat file and it will launch - -2. If you right click on your python script (.py ending or whatever you named it), -you can select properties and select an application to open this type of file with. -Navigate to the folder that includes this README and select the kivy.bat file. -Now all you have to do is double click (check do this always for this file type -to make this the default) - - -If you already have Python installed -==================================== - -The portable Kivy version shouldn't cause any conflicts and cooperate fairly well -(at least if it's Python 2.6, otherwise some modules might cause problems if there -is entries on PYTHONPATH) - - -Install Kivy as a standard python module -======================================== - -Please refer to the install instructions in the complete README : -* Inside the kivy folder inside this one -* Kivy documentation at http://kivy.org/docs/ - - -Install development environment inside your current shell -========================================================= - -If you want to develop with Kivy's python, you may just want to load the -environment, and stay in your console. Inside a git bash / mingsys console, you -can type : - - source /path/to/kivyenv.sh - -And it will load the whole enviroment of Kivy. This will give you an access to: - - * Python binaries (python, pythonw, easy_install) - * Cython binaries (cython) - * Gstreamer binaries (gst-inspect, gst-launch, ...) - * Pre-configured PYTHONPATH for gst and Kivy - -Please note that if you already have a Python installed on your system, it will be -not used. +!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +READ THIS FIRST +!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + +This version of Kivy is a portable win32 version, 32 bits. (it work also for +64 bits Windows.) This means everything you need to run kivy (including +python and all other dependencies etc) are included. + +This README only addresses the things specific to the portable version of kivy. +For general information on how to get started, where to find the documentation +and configuration see the README file in the kivy directory about Kivy. + +!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + + +Running portable Kivy +===================== + +The same directory that has this README file in it, contains a file called kivy.bat +running this kivy.bat file will set up the environment for kivy and starts the +python interpreter with any arguments you passed + +Example +~~~~~~~ + +If you open a command line and go to the directory (or add it to your PATH) +You can run the following: + +kivy test.py -w <-- will run test.py as a python script with kivy ready to use + + +Run a Kivy application without going to the command line +======================================================== + +Two options : + +1. You can drag your python script on top the kivy.bat file and it will launch + +2. If you right click on your python script (.py ending or whatever you named it), +you can select properties and select an application to open this type of file with. +Navigate to the folder that includes this README and select the kivy.bat file. +Now all you have to do is double click (check do this always for this file type +to make this the default) + + +If you already have Python installed +==================================== + +The portable Kivy version shouldn't cause any conflicts and cooperate fairly well +(at least if it's Python 2.6, otherwise some modules might cause problems if there +is entries on PYTHONPATH) + + +Install Kivy as a standard python module +======================================== + +Please refer to the install instructions in the complete README : +* Inside the kivy folder inside this one +* Kivy documentation at http://kivy.org/docs/ + + +Install development environment inside your current shell +========================================================= + +If you want to develop with Kivy's python, you may just want to load the +environment, and stay in your console. Inside a git bash / mingsys console, you +can type : + + source /path/to/kivyenv.sh + +And it will load the whole enviroment of Kivy. This will give you an access to: + + * Python binaries (python, pythonw, easy_install) + * Cython binaries (cython) + * Gstreamer binaries (gst-inspect, gst-launch, ...) + * Pre-configured PYTHONPATH for gst and Kivy + +Please note that if you already have a Python installed on your system, it will be +not used. diff --git a/kivy/tools/packaging/win32/kivy.bat b/kivy/tools/packaging/win32/kivy.bat index 038efcadc8..5733eaae5f 100644 --- a/kivy/tools/packaging/win32/kivy.bat +++ b/kivy/tools/packaging/win32/kivy.bat @@ -1,52 +1,52 @@ -@ECHO off - -set kivy_portable_root=%~dp0 -ECHO botstrapping Kivy @ %kivy_portable_root% - - -IF DEFINED kivy_paths_initialized (GOTO :runkivy) - -ECHO Setting Environment Variables: -ECHO ################################# - -set GST_REGISTRY=%kivy_portable_root%gstreamer\registry.bin -ECHO GST_REGISTRY -ECHO %GST_REGISTRY% -ECHO --------------- - -set GST_PLUGIN_PATH=%kivy_portable_root%gstreamer\lib\gstreamer-0.10 -ECHO GST_PLUGIN_PATH: -ECHO %GST_PLUGIN_PATH% -ECHO --------------- - -set PATH=%kivy_portable_root%;%kivy_portable_root%Python;%kivy_portable_root%Python\Scripts;%kivy_portable_root%gstreamer\bin;%kivy_portable_root%MinGW\bin;%PATH% -ECHO PATH: -ECHO %PATH% -ECHO ---------------------------------- - -set PYTHONPATH=%kivy_portable_root%kivy;%PYTHONPATH% -ECHO PYTHONPATH: -ECHO %PYTHONPATH% -ECHO ---------------------------------- - -SET kivy_paths_initialized=1 -ECHO ################################## - - -:runkivy - -ECHO done bootstraping kivy...have fun!\n -IF (%1)==() GOTO SHELL -ECHO running "python.exe %*" \n -python.exe %* -IF %errorlevel% NEQ 0 (PAUSE) -GOTO END -:SHELL -ECHO. -ECHO ----------------------------------------------------------------------- -ECHO - Running a shell, you can browse kivyexamples and launch apps with: - -ECHO - python app.py - -ECHO ----------------------------------------------------------------------- -ECHO. -cmd -:END +@ECHO off + +set kivy_portable_root=%~dp0 +ECHO botstrapping Kivy @ %kivy_portable_root% + + +IF DEFINED kivy_paths_initialized (GOTO :runkivy) + +ECHO Setting Environment Variables: +ECHO ################################# + +set GST_REGISTRY=%kivy_portable_root%gstreamer\registry.bin +ECHO GST_REGISTRY +ECHO %GST_REGISTRY% +ECHO --------------- + +set GST_PLUGIN_PATH=%kivy_portable_root%gstreamer\lib\gstreamer-0.10 +ECHO GST_PLUGIN_PATH: +ECHO %GST_PLUGIN_PATH% +ECHO --------------- + +set PATH=%kivy_portable_root%;%kivy_portable_root%Python;%kivy_portable_root%Python\Scripts;%kivy_portable_root%gstreamer\bin;%kivy_portable_root%MinGW\bin;%PATH% +ECHO PATH: +ECHO %PATH% +ECHO ---------------------------------- + +set PYTHONPATH=%kivy_portable_root%kivy;%PYTHONPATH% +ECHO PYTHONPATH: +ECHO %PYTHONPATH% +ECHO ---------------------------------- + +SET kivy_paths_initialized=1 +ECHO ################################## + + +:runkivy + +ECHO done bootstraping kivy...have fun!\n +IF (%1)==() GOTO SHELL +ECHO running "python.exe %*" \n +python.exe %* +IF %errorlevel% NEQ 0 (PAUSE) +GOTO END +:SHELL +ECHO. +ECHO ----------------------------------------------------------------------- +ECHO - Running a shell, you can browse kivyexamples and launch apps with: - +ECHO - python app.py - +ECHO ----------------------------------------------------------------------- +ECHO. +cmd +:END diff --git a/kivy/tools/packaging/win32/kivyenv.sh b/kivy/tools/packaging/win32/kivyenv.sh index 017b1bf4c8..43731cce52 100644 --- a/kivy/tools/packaging/win32/kivyenv.sh +++ b/kivy/tools/packaging/win32/kivyenv.sh @@ -1,53 +1,53 @@ -# Script to initialize the complete dev environment -# for Kivy. Use that when you want to develop :) -# -# This will give you an access to : -# - Python binaries (python, easy_install) -# - Cython binaries (cython) -# - A correct pythonpath (Kivy) -# - Gstreamer binaries (gst-inspect, ...) -# -# Usage: source /path/to/kivyenv.sh -# - -# Get root directory of portable installation -tmp=$(dirname $BASH_SOURCE) -export KIVY_PORTABLE_ROOT=$(cd $tmp; pwd) - -if [ ! -d $KIVY_PORTABLE_ROOT ]; then - echo "Usage: source /path/to/kivyenv.sh" - exit 1 -fi - -# bootstrapping -echo bootstrapping Kivy @ $KIVY_PORTABLE_ROOT - -if [ "X$KIVY_PATHS_INITIALIZED" != "X1" ]; then - -echo Setting Environment Variables: -echo ################################# - -export GST_REGISTRY=$KIVY_PORTABLE_ROOT/gstreamer/registry.bin -echo GST_REGISTRY is $GST_REGISTRY -echo ---------------------------------- - -export GST_PLUGIN_PATH=$KIVY_PORTABLE_ROOT/gstreamer/lib/gstreamer-0.10 -echo GST_PLUGIN_PATH is $GST_PLUGIN_PATH -echo ---------------------------------- - -export PATH=$KIVY_PORTABLE_ROOT:$KIVY_PORTABLE_ROOT/Python:$KIVY_PORTABLE_ROOT/Python/Scripts:$KIVY_PORTABLE_ROOT/gstreamer/bin:$KIVY_PORTABLE_ROOT/MinGW/bin:$PATH -echo PATH is $PATH -echo ---------------------------------- - -echo 'Convert to windows path:' $KIVY_PORTABLE_ROOT -KIVY_PORTABLE_ROOT_PY=$(python -c 'import os, sys; print os.path.realpath(sys.argv[1])' $KIVY_PORTABLE_ROOT/kivy) -export PYTHONPATH=$KIVY_PORTABLE_ROOT_PY\;$PYTHONPATH -echo PYTHONPATH is $PYTHONPATH - -export KIVY_PATHS_INITIALIZED=1 -echo ################################## - -fi - -echo done bootstraping kivy...have fun! -echo +# Script to initialize the complete dev environment +# for Kivy. Use that when you want to develop :) +# +# This will give you an access to : +# - Python binaries (python, easy_install) +# - Cython binaries (cython) +# - A correct pythonpath (Kivy) +# - Gstreamer binaries (gst-inspect, ...) +# +# Usage: source /path/to/kivyenv.sh +# + +# Get root directory of portable installation +tmp=$(dirname $BASH_SOURCE) +export KIVY_PORTABLE_ROOT=$(cd $tmp; pwd) + +if [ ! -d $KIVY_PORTABLE_ROOT ]; then + echo "Usage: source /path/to/kivyenv.sh" + exit 1 +fi + +# bootstrapping +echo bootstrapping Kivy @ $KIVY_PORTABLE_ROOT + +if [ "X$KIVY_PATHS_INITIALIZED" != "X1" ]; then + +echo Setting Environment Variables: +echo ################################# + +export GST_REGISTRY=$KIVY_PORTABLE_ROOT/gstreamer/registry.bin +echo GST_REGISTRY is $GST_REGISTRY +echo ---------------------------------- + +export GST_PLUGIN_PATH=$KIVY_PORTABLE_ROOT/gstreamer/lib/gstreamer-0.10 +echo GST_PLUGIN_PATH is $GST_PLUGIN_PATH +echo ---------------------------------- + +export PATH=$KIVY_PORTABLE_ROOT:$KIVY_PORTABLE_ROOT/Python:$KIVY_PORTABLE_ROOT/Python/Scripts:$KIVY_PORTABLE_ROOT/gstreamer/bin:$KIVY_PORTABLE_ROOT/MinGW/bin:$PATH +echo PATH is $PATH +echo ---------------------------------- + +echo 'Convert to windows path:' $KIVY_PORTABLE_ROOT +KIVY_PORTABLE_ROOT_PY=$(python -c 'import os, sys; print os.path.realpath(sys.argv[1])' $KIVY_PORTABLE_ROOT/kivy) +export PYTHONPATH=$KIVY_PORTABLE_ROOT_PY\;$PYTHONPATH +echo PYTHONPATH is $PYTHONPATH + +export KIVY_PATHS_INITIALIZED=1 +echo ################################## + +fi + +echo done bootstraping kivy...have fun! +echo