python-imprastorage/setup_build.py

78 lines
3.1 KiB
Python
Raw Normal View History

2012-10-01 20:20:56 +00:00
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
# #
# software : ImpraStorage <http://imprastorage.sourceforge.net/> #
2012-10-09 20:57:01 +00:00
# version : 0.8 #
2012-10-01 20:20:56 +00:00
# date : 2012 #
# licence : GPLv3.0 <http://www.gnu.org/licenses/> #
# author : a-Sansara <http://www.a-sansara.net/> #
# copyright : pluie.org <http://www.pluie.org/> #
# #
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
#
# This file is part of ImpraStorage.
#
# ImpraStorage is free software (free as in speech) : 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 3 of the License,
# or (at your option) any later version.
#
# ImpraStorage 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 ImpraStorage. If not, see <http://www.gnu.org/licenses/>.
2012-09-20 21:55:37 +00:00
import sys
from cx_Freeze import setup, Executable
productName = "ImpraStorage"
# Dependencies are automatically detected, but it might need fine tuning.
2012-09-29 18:42:55 +00:00
build_exe_options = {"packages": ["os","subprocess","importlib","platform"],
"excludes": ["tkinter"],
"include_files": [('launcher.bat','launcher.bat'),('cmd.bat','cmd.bat'),('wk','wk')]
}
2012-09-20 21:55:37 +00:00
# GUI applications require a different base on Windows (the default is for a
# console application).
base = None
#if sys.platform == "win32":
# base = "Win32GUI"
if 'bdist_msi' in sys.argv:
2012-09-29 18:42:55 +00:00
sys.argv += ['--initial-target-dir', 'C:\\' + productName]
# sys.argv += ['--install-script', 'install.py']
2012-09-20 21:55:37 +00:00
exe = Executable(
script="imprastorage.py",
base=None,
2012-09-29 18:42:55 +00:00
targetName="imprastorage.exe"
2012-09-20 21:55:37 +00:00
)
setup(
name="ImpraStorage.exe",
2012-10-01 20:20:56 +00:00
version="0.7",
2012-09-29 18:38:04 +00:00
author="a-Sansara",
2012-09-29 18:42:55 +00:00
description="ImpraStorage provided a private imap access to store large files. License GNU GPLv3 Copyright 2012 pluie.org",
2012-09-20 21:55:37 +00:00
executables=[exe],
2012-09-29 18:42:55 +00:00
options = {"build_exe": build_exe_options},
2012-09-20 21:55:37 +00:00
scripts=[
2012-09-29 18:42:55 +00:00
2012-09-20 21:55:37 +00:00
]
2012-09-29 18:42:55 +00:00
)
2012-09-20 21:55:37 +00:00
else :
setup( name = "ImpraStorage",
2012-10-01 20:20:56 +00:00
version = "0.7",
2012-09-29 18:42:55 +00:00
description = "ImpraStorage provided a private imap access to store large files",
2012-09-20 21:55:37 +00:00
options = {"build_exe": build_exe_options},
executables = [Executable("imprastorage.py", base=base)])