-
Notifications
You must be signed in to change notification settings - Fork 17
/
build_binary.py
35 lines (28 loc) · 964 Bytes
/
build_binary.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
import sys
from cx_Freeze import setup, Executable
from os import environ, getcwd, path
from greenflare.core.defaults import Defaults
sys.path.append(getcwd() + path.sep + 'greenflare')
print(sys.path)
print(getcwd())
# Dependencies are automatically detected, but it might need fine tuning.
build_exe_options = {"include_files": ["greenflare/resources/"]}
# GUI applications require a different base on Windows (the default is for a
# console application).
base = None
targetName = "greenflare"
if sys.platform == "win32":
base = "Win32GUI"
targetName = "greenflare.exe"
target = Executable(
script='greenflare/app.py',
base=base,
icon='greenflare/resources/greenflare-icon-32x32.ico',
targetName=targetName
)
setup(name='Greenflare SEO Crawler',
version=Defaults.version,
author='Benjamin Görler',
description='Greenflare SEO Crawler',
options={'build_exe': build_exe_options},
executables=[target])