Skip to content
This repository has been archived by the owner on Mar 22, 2018. It is now read-only.

Commit

Permalink
adding sanity check to devinstall script
Browse files Browse the repository at this point in the history
documenting the steps as of 'for dummies request'
wondering how people can still be using such junk (writing a batch file is amazing)
closes #215
  • Loading branch information
mfrasca committed Dec 29, 2015
1 parent 6a9325f commit f72095d
Show file tree
Hide file tree
Showing 3 changed files with 46 additions and 14 deletions.
Binary file added doc/images/screenshots/sys32cmd-1.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
27 changes: 19 additions & 8 deletions doc/installing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -118,14 +118,17 @@ script for it. Read the above Linux instructions, follow them, enjoy.
Installing on Windows
---------------------

The Windows installer used to be a "batteries-included" installer,
installing everything needed to run Bauble. The current maintainer
of bauble.classic cannot run Windows applications. If you want to
run the latest version of bauble on Windows: download and install
the dependencies and then install Bauble from the source package.
The current maintainer of bauble.classic has no interest in learning how to
produce Windows installers, so the Windows installation is here reduced to
the same installation procedure as on Unix (Linux and MacOSX).

Please report any trouble and help with packaging will be very
welcome.
Please report any trouble. Help with packaging will be very welcome, in
particular by other Windows users.

The steps described here instruct you on how to install Git, Gtk, Python,
and the python database connectors. With this environment correctly set up,
the Bauble installation procedure runs as on Linux. The concluding steps are
again Windows specific.

.. note:: Bauble has been tested with and is known to work on W-XP, W-7 and
W-8. Although it should work fine on other versions Windows it has not
Expand All @@ -142,7 +145,7 @@ welcome.
.. _Direct link to download PyGTK: http://ftp.gnome.org/pub/GNOME/binaries/win32/pygtk/2.24/pygtk-all-in-one-2.24.2.win32-py2.7.msi
.. _Direct link to download psycopg2: http://www.stickpeople.com/projects/python/win-psycopg/2.6.1/psycopg2-2.6.1.win32-py2.7-pg9.4.4-release.exe

the installation steps on Windows:
The installation steps on Windows:

#. download and install ``git`` (comes with a unix-like ``sh`` and includes
``vi``) from::
Expand Down Expand Up @@ -216,6 +219,11 @@ the installation steps on Windows:

https://raw.githubusercontent.com/Bauble/bauble.classic/master/scripts/devinstall.bat

right before you hit the enter key to run the script, your screen might
look like something like this:

.. image:: images/screenshots/sys32cmd-1.png

this will pull the ``bauble.classic`` repository on github to your home
directory, under ``Local\github\Bauble``, checkout the ``bauble-1.0``
production line, create a virtual environment and install bauble into it.
Expand All @@ -226,6 +234,9 @@ the installation steps on Windows:
this is the last installation step that depends, heavily, on a working
internet connection.

the operation can take several minutes to complete, depending on the
speed of your internet connection.

#. the last installation step creates the Bauble group and shortcuts in the
Windows Start Menu, for all users. To do so, you need run a script with
administrative rights. The script is called ``devinstall-finalize.bat``,
Expand Down
33 changes: 27 additions & 6 deletions scripts/devinstall.bat
Original file line number Diff line number Diff line change
@@ -1,4 +1,29 @@
@echo off
ECHO sanity check

SET SHOULD_CANCEL=0

python -c "1" 2>NUL
IF %ERRORLEVEL% NEQ 0 (
ECHO Python not properly installed
SET SHOULD_CANCEL=1
goto SKIP_GTK_TEST
)
python -c "import gtk" 2>NUL
IF %ERRORLEVEL% NEQ 0 (
ECHO PyGtk not properly installed
SET SHOULD_CANCEL=1
)
:SKIP_GTK_TEST
git --version 2>NUL >NUL
IF %ERRORLEVEL% NEQ 0 (
ECHO git not properly installed
SET SHOULD_CANCEL=1
)

IF %SHOULD_CANCEL% NEQ 0 exit /b
ECHO sanity check passed

IF %1.==. GOTO DEFAULTCHOICE
set CHECKOUT=bauble-%1
GOTO CONTINUE
Expand Down Expand Up @@ -40,12 +65,8 @@ ECHO create the globalizing script
IF DEFINED PUBLIC (SET AUDESKTOP=%PUBLIC%\Desktop) & (SET AUSTARTMENU=%PROGRAMDATA%\Microsoft\Windows\Start Menu) ELSE (SET AUDESKTOP=%ALLUSERSPROFILE%\Desktop) & (SET AUSTARTMENU=%ALLUSERSPROFILE%\Start Menu)
(
echo @echo off
echo NET SESSION >nul 2>&1
echo IF %ERRORLEVEL% EQU 0 (
echo mkdir "%AUSTARTMENU%\Programs\Bauble"
echo copy "%HOMEDRIVE%%HOMEPATH%"\Local\github\Bauble\bauble.classic\scripts\bauble.lnk "%AUSTARTMENU%\Programs\Bauble"
echo ) else (
echo )
echo mkdir "%AUSTARTMENU%\Programs\Bauble"
echo copy "%HOMEDRIVE%%HOMEPATH%"\Local\github\Bauble\bauble.classic\scripts\bauble.lnk "%AUSTARTMENU%\Programs\Bauble"
) > devinstall-finalize.bat

ECHO please run devinstall-finalize.bat as administrator.
Expand Down

0 comments on commit f72095d

Please sign in to comment.