1
# Copyright (C) 2007-2008 www.stani.be
3
# This program is free software: you can redistribute it and/or modify
4
# it under the terms of the GNU General Public License as published by
5
# the Free Software Foundation, either version 3 of the License, or
6
# (at your option) any later version.
8
# This program is distributed in the hope that it will be useful,
9
# but WITHOUT ANY WARRANTY; without even the implied warranty of
10
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11
# GNU General Public License for more details.
13
# You should have received a copy of the GNU General Public License
14
# along with this program. If not, see http://www.gnu.org/licenses/
23
if __name__ == '__main__':
24
sys.path.insert(0, '..')
26
from lib.context import get_context, join, join_create
29
CONTEXT = get_context(app_name='phatch', base_source='phatch',
30
sys_prefix=sys.prefix)
32
CONTEXT['app_actionlists_path'] = join(CONTEXT['app_data_path'], 'actionlists')
33
CONTEXT['app_blender_path'] = join(CONTEXT['app_data_path'], 'blender')
34
CONTEXT['app_fonts_path'] = join(CONTEXT['app_data_path'], 'fonts')
37
CONTEXT['app_highlights_path'] = join(CONTEXT['app_images_path'], 'highlights')
38
CONTEXT['app_masks_path'] = join(CONTEXT['app_images_path'], 'masks')
41
CONTEXT['app_gui_path'] = join(CONTEXT['app_data_path'], 'gui')
42
CONTEXT['app_preview_path'] = join(CONTEXT['app_gui_path'], 'preview')
43
CONTEXT['app_preview_perspective_path'] = join(CONTEXT['app_preview_path'],
47
if CONTEXT['distribute'] == 'source':
48
CONTEXT['app_actions_path'] = join(CONTEXT['app_source_path'], 'actions')
50
CONTEXT['app_actions_path'] = join(CONTEXT['app_data_path'], 'actions')
53
CONTEXT['user_fonts_cache_path'] = join(CONTEXT['user_cache_path'],
55
CONTEXT['user_log_path'] = join(CONTEXT['user_cache_path'], 'log')
58
CONTEXT['user_settings_path'] = join(CONTEXT['user_config_path'],
61
# user data paths (warning they will be create if they don't exist)
62
CONTEXT['user_actions_path'] = join_create(CONTEXT['user_data_path'],
64
CONTEXT['user_actionlists_path'] = join_create(CONTEXT['user_data_path'],
66
CONTEXT['user_bin_path'] = join_create(CONTEXT['user_data_path'], 'bin')
67
CONTEXT['user_fonts_path'] = join_create(CONTEXT['user_data_path'], 'fonts')
68
CONTEXT['user_geek_path'] = join(CONTEXT['user_data_path'], 'geek.txt')
69
CONTEXT['user_highlights_path'] = join_create(CONTEXT['user_data_path'],
71
CONTEXT['user_masks_path'] = join_create(CONTEXT['user_data_path'], 'masks')
72
CONTEXT['user_watermarks_path'] = join_create(CONTEXT['user_data_path'],
76
if __name__ == '__main__':
78
pprint.pprint(CONTEXT)