#!/usr/bin/python3.13
# -*- coding: utf-8 -*-
"""
brickv (Brick Viewer)
Copyright (C) 2013 Olaf Lüke <olaf@tinkerforge.com>
Copyright (C) 2015 Matthias Bolte <matthias@tinkerforge.com>

brickv: Brick Viewer startup

This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.

You should have received a copy of the GNU General Public
License along with this program; if not, write to the
Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA.
"""

import sys
if (sys.hexversion & 0xFF000000) != 0x03000000:
    print('Python 3.x required')
    sys.exit(1)

try:
    from brickv.main import main

    if __name__ == "__main__":
        main(dev_mode=False) # FIXME: this script is currently only used for the AUR package,
                             #        that currently lacks the package_type maker file that
                             #        would be used to detect if brickv runs from source or
                             #        packaged. if it runs from source dev-mode should be on.
                             #        if it runs from a package dev-mode should be off
except ImportError:
    print('Could not import brickv. Please make sure that brickv is installed properly. ' + \
          'If you want to start brickv from source, you should directly call "python main.py".')

    sys.exit(1)
