1#!/usr/bin/env python
2# encoding: utf-8
3
4import re, os
5from waflib import TaskGen, Logs
6from waflib.Build import INSTALL, UNINSTALL
7
8scss_theme_files = [
9    'gx_head_Guitarix.scss',
10    'gx_head_Copper.scss',
11    'gx_head_Lavender.scss',
12    'gx_head_Sky.scss',
13    'gx_head_Olive.scss',
14    'gx_head_Hippie.scss',
15    'gx_head_Psycedelic.scss',
16    'gx_head_Grandma.scss',
17    'gx_head_Grungy_Sun_Dark.scss',
18    'gx_head_Grungy_Sun.scss',
19    'gx_head_Aluminium.scss',
20    'gx_head_Oak.scss',
21    'gx_head_Burl.scss',
22    'gx_head_White_Oak.scss',
23    'gx_head_Guitarix_Oak.scss',
24    'gx_head_Plain_Dark.scss',
25    'gx_head_Dark.scss',
26    'gx_head_Nebula.scss',
27    'gx_head_Camouflage.scss',
28    'gx_head_Orange.scss',
29    'gx_head_Rust.scss',
30    'gx_head_Gold.scss',
31    ]
32
33scss_additional_files = [
34    'minimal.scss',
35    ]
36
37gxstyle_files = [
38    'clear.css',
39    'background1.png',
40    'background2.png',
41    'live_wallpaper_aluminium.png',
42    'live_wallpaper_camouflage.png',
43    'live_wallpaper_copper.png',
44    'live_wallpaper_dark.png',
45    'live_wallpaper.png',
46    'live_wallpaper_guitarix_oak.png',
47    'live_wallpaper_lavender.png',
48    'live_wallpaper_oak.png',
49    'live_wallpaper_olive.png',
50    'live_wallpaper_orange.png',
51    'live_wallpaper_sky.png',
52    'live_wallpaper_white_oak.png',
53    'live_wallpaper_burl.png',
54    'live_wallpaper_psycedelic.png',
55    'live_wallpaper_hippie.png',
56    'live_wallpaper_grungy_sun.png',
57    'live_wallpaper_grungy_sun_dark.png',
58    'live_wallpaper_grandma.png',
59    'live_wallpaper_nebula.png',
60    'live_wallpaper_rust.png',
61    'live_wallpaper_gold.png',
62
63    'tactile_knob_large_151f.png',
64    'tactile_knob_small_99f.png',
65    'tactile_knob_medium_151f.png',
66    'tactile_wheel_101f.png',
67
68    'stereo.png',
69    'live_bypass.png',
70    'factory.png',
71    'live_mute.png',
72    'readonly.png',
73    'scratch.png',
74    'versiondiff.png',
75    'playhead.png',
76    'simplelevelslider.png',
77
78    'switch_on.png',
79    'switch_mid_off.png',
80    'switch_mid_on.png',
81    'switch_off.png',
82    'rack_expand.png',
83    'rack_shrink.png',
84    'rack_preset.png',
85    'insert.png',
86    'hslider.png',
87    'logo.png',
88    'logo_orange.png',
89    'logo_white.png',
90    'handle_left.png',
91    'handle_right.png',
92
93    # knobs
94    'knob_small.png',
95    'knob_small_r.png',
96    'knob_mid.png',
97    'knob_big.png',
98
99    ###COPPER THEME
100    'copper.png',
101
102    ###LAVENDER THEME
103    'lavender.png',
104
105    ###SKY THEME
106    'sky.png',
107
108    ###OLIVE THEME
109    'olive.png',
110
111    ###HIPPIE THEME
112    'hippie.png',
113    'hippie2.png',
114    'knob_small_hippie.png',
115    'knob_small_r_hippie.png',
116    'knob_mid_hippie.png',
117    'knob_big_hippie.png',
118
119    ###PSYCEDELIC THEME
120    'psycedelic.png',
121
122    ###GRANDMA THEME
123    'grandma.png',
124
125    ###GRUNGY SUN THEME
126    'grungy_sun_dark.png',
127    'grungy_sun_dark2.png',
128
129    ###GRUNGY SUN THEME
130    'grungy_sun.png',
131    'grungy_sun2.png',
132
133    ###ALUMINIUM THEME
134    'aluminium1.png',
135    'aluminium2.png',
136
137    ###OAK THEME
138    'oak1.png',
139    'oak2.png',
140
141    ###BURL THEME
142    'burl1.png',
143    'burl2.png',
144
145    ###WHITE OAK THEME
146    'oak_white.png',
147    #'oak2.png',
148
149    ###GUITARIX OAK THEME
150    'oak_green.png',
151    #'oak2.png',
152
153    ###DARK THEME
154    'dark.png',
155
156    ###NEBULA THEMA
157    'nebula.png',
158    'nebula2.png',
159
160    ###CAMOUFLAGE THEME
161    'camouflage.png',
162
163    ###ORANGE THEME
164    'orange.png',
165
166    ###RUST THEME
167    'rust.png',
168    'rust2.png',
169
170    ###GOLD THEME
171    'gold1.png',
172    'gold2.png',
173
174     ]
175
176def configure(conf):
177    conf.env.SASSC_ARGS = '-ltexpanded' if conf.options.debug else '-tcompressed'
178
179def build(bld):
180    if not bld.env.STANDALONE:
181        return
182    full_rcstyle_dir = True # set to use "guitarix --style-dir build/rcstyles"
183    features = []
184    if full_rcstyle_dir:
185        bld(features='subst',
186            source=gxstyle_files,
187            target=gxstyle_files,
188            is_copy=True,
189            install_path=bld.env.GX_STYLE_DIR)
190        features.append('generate_symlink_icons')
191    bld(name = 'scss',
192        features = features,
193        source = scss_theme_files,
194        proc_args = bld.env.SASSC_ARGS,
195        install_path=bld.env.GX_STYLE_DIR,
196        chmod=0o644)
197    bld(name = 'scss_add',
198        source = scss_additional_files,
199        proc_args = bld.env.SASSC_ARGS,
200        install_path=bld.env.GX_STYLE_DIR,
201        chmod=0o644)
202