|
|
|
@ -18,7 +18,7 @@
|
|
|
|
|
|
|
|
|
|
import os
|
|
|
|
|
from os import path
|
|
|
|
|
import glob
|
|
|
|
|
from glob import glob
|
|
|
|
|
import sys
|
|
|
|
|
|
|
|
|
|
import distutils
|
|
|
|
@ -41,7 +41,7 @@ data_files.append(('/usr/share/applications',
|
|
|
|
|
['data/cl-console-gui-install.desktop',
|
|
|
|
|
'data/cl-console-gui-update.desktop',
|
|
|
|
|
'data/cl-console-gui-update-xfce.desktop',
|
|
|
|
|
'data/cl-console-gui.desktop'
|
|
|
|
|
'data/cl-console-gui.desktop',
|
|
|
|
|
'data/cl-console-gui-xfce.desktop']))
|
|
|
|
|
data_files.append(('/etc/xdg/autostart',
|
|
|
|
|
['data/cl-update-checker.desktop']))
|
|
|
|
@ -50,44 +50,20 @@ data_files.append(('/usr/share/calculate/themes/install',
|
|
|
|
|
'data/install/finish.jpg']))
|
|
|
|
|
for size in [16,22,24,48,64,72,96,128]:
|
|
|
|
|
data_files.append(('/usr/share/icons/Calculate/%dx%d/apps' %(size,size),
|
|
|
|
|
glob.glob('data/%dx%d/calculate-console.png' %(size,size))))
|
|
|
|
|
glob('data/%dx%d/calculate-console.png' %(size,size))))
|
|
|
|
|
data_files.append(('/usr/share/icons/Calculate/%dx%d/apps' %(size,size),
|
|
|
|
|
glob.glob('data/%dx%d/calculate-install.png' %(size,size))))
|
|
|
|
|
glob('data/%dx%d/calculate-install.png' %(size,size))))
|
|
|
|
|
data_files.append(('/usr/share/icons/Calculate/%dx%d/apps' %(size,size),
|
|
|
|
|
glob.glob('data/%dx%d/calculate-update.png' %(size,size))))
|
|
|
|
|
glob('data/%dx%d/calculate-update.png' %(size,size))))
|
|
|
|
|
|
|
|
|
|
var_data_files = []
|
|
|
|
|
|
|
|
|
|
__version__ = "3.1.8"
|
|
|
|
|
__version__ = "3.2.2"
|
|
|
|
|
__app__ = "calculate-console-gui"
|
|
|
|
|
|
|
|
|
|
class cl_console_data(install_data):
|
|
|
|
|
def run (self):
|
|
|
|
|
install_data.run(self)
|
|
|
|
|
data_file = []
|
|
|
|
|
fileNames = map(lambda x: path.split(x[0])[1], data_file)
|
|
|
|
|
listNames = map(lambda x: filter(lambda y: y, x[0].split("/")),
|
|
|
|
|
data_file)
|
|
|
|
|
data_find = {}
|
|
|
|
|
for i in range(len(fileNames)):
|
|
|
|
|
listNames[i].reverse()
|
|
|
|
|
data_find[fileNames[i]] =[listNames[i],data_file[i][1]]
|
|
|
|
|
|
|
|
|
|
for path in self.get_outputs():
|
|
|
|
|
nameFile = path.split(path)[1]
|
|
|
|
|
if nameFile in data_find.keys():
|
|
|
|
|
data = data_find[nameFile][0]
|
|
|
|
|
mode = data_find[nameFile][1]
|
|
|
|
|
flagFound = True
|
|
|
|
|
iMax = len(data)
|
|
|
|
|
pathFile = path
|
|
|
|
|
for i in range(iMax):
|
|
|
|
|
if data[i] != path.split(pathFile)[1]:
|
|
|
|
|
flagFound = False
|
|
|
|
|
break
|
|
|
|
|
pathFile = path.split(pathFile)[0]
|
|
|
|
|
if flagFound:
|
|
|
|
|
os.chmod(path, mode)
|
|
|
|
|
packages = [
|
|
|
|
|
"calculate."+str('.'.join(root.split(os.sep)[1:]))
|
|
|
|
|
for root, dirs, files in os.walk('pym/consolegui')
|
|
|
|
|
if '__init__.py' in files
|
|
|
|
|
]
|
|
|
|
|
|
|
|
|
|
setup(
|
|
|
|
|
name = __app__,
|
|
|
|
@ -97,13 +73,9 @@ setup(
|
|
|
|
|
author_email = "support@calculate.ru",
|
|
|
|
|
url = "http://calculate-linux.org",
|
|
|
|
|
license = "http://www.apache.org/licenses/LICENSE-2.0",
|
|
|
|
|
# data_files = [("",(glob.glob("build/locale/*.mo")))],
|
|
|
|
|
|
|
|
|
|
data_files = data_files,
|
|
|
|
|
|
|
|
|
|
package_dir = {'calculate.consolegui': "consolegui"},
|
|
|
|
|
packages = ['calculate.consolegui','calculate.consolegui.variables',
|
|
|
|
|
'calculate.consolegui.application'],
|
|
|
|
|
scripts = ['./scripts/cl-console-gui','./scripts/cl-update-checker'],
|
|
|
|
|
cmdclass={'cl_console_data': cl_console_data}
|
|
|
|
|
package_dir = {'calculate.consolegui': "pym/consolegui"},
|
|
|
|
|
packages = packages,
|
|
|
|
|
scripts = (glob('bin/*')),
|
|
|
|
|
cmdclass={'install_data': install_data}
|
|
|
|
|
)
|
|
|
|
|