Cleanup
[carla.git] / source / frontend / common / __init__.py
blob28c9e6238c6412703812cbf094c866b2f4ab71f0
1 #!/usr/bin/env python3
2 # -*- coding: utf-8 -*-
4 # Common Carla code
5 # Copyright (C) 2011-2022 Filipe Coelho <falktx@falktx.com>
7 # This program is free software; you can redistribute it and/or
8 # modify it under the terms of the GNU General Public License as
9 # published by the Free Software Foundation; either version 2 of
10 # the License, or any later version.
12 # This program is distributed in the hope that it will be useful,
13 # but WITHOUT ANY WARRANTY; without even the implied warranty of
14 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 # GNU General Public License for more details.
17 # For a full copy of the GNU General Public License see the doc/GPL.txt file.
19 # ---------------------------------------------------------------------------------------------------------------------
20 # Imports (Global)
22 from platform import architecture
23 from sys import platform, maxsize
25 # ---------------------------------------------------------------------------------------------------------------------
26 # Set Version
28 VERSION = "2.6.0-alpha1"
30 # ---------------------------------------------------------------------------------------------------------------------
31 # 64bit check
33 kIs64bit = bool(architecture()[0] == "64bit" and maxsize > 2**32)
35 # ---------------------------------------------------------------------------------------------------------------------
36 # Set Platform
38 if platform == "darwin":
39 HAIKU = False
40 LINUX = False
41 MACOS = True
42 WINDOWS = False
43 elif "haiku" in platform:
44 HAIKU = True
45 LINUX = False
46 MACOS = False
47 WINDOWS = False
48 elif "linux" in platform:
49 HAIKU = False
50 LINUX = True
51 MACOS = False
52 WINDOWS = False
53 elif platform in ("win32", "win64", "cygwin"):
54 HAIKU = False
55 LINUX = False
56 MACOS = False
57 WINDOWS = True
58 else:
59 HAIKU = False
60 LINUX = False
61 MACOS = False
62 WINDOWS = False
64 # ---------------------------------------------------------------------------------------------------------------------