icon-name follows program-name
so that derivative products don't need to replace binary image/icon files in the source (use ./waf configure --program-name=...)
This commit is contained in:
parent
e610916c26
commit
13e0db6914
Before Width: | Height: | Size: 9.4 KiB After Width: | Height: | Size: 9.4 KiB |
Before Width: | Height: | Size: 48 KiB After Width: | Height: | Size: 48 KiB |
@ -1 +0,0 @@
|
||||
IDI_ICON1 ICON DISCARDABLE "icons/ardour.ico"
|
@ -792,10 +792,11 @@ def build(bld):
|
||||
obj.install_path = bld.env['CONFDIR']
|
||||
|
||||
# Icons/Images
|
||||
lowercase_appname = Options.options.program_name.lower();
|
||||
bld.install_files(os.path.join (bld.env['DATADIR'], 'icons'), bld.path.ant_glob('icons/*.png'))
|
||||
bld.install_files(os.path.join (bld.env['DATADIR'], 'pixmaps'), bld.path.ant_glob('pixmaps/*.xpm'))
|
||||
bld.install_files(bld.env['DATADIR'], 'splash.png')
|
||||
bld.install_files(bld.env['DATADIR'], 'small-splash.png')
|
||||
bld.install_as(os.path.join (bld.env['DATADIR'], 'splash.png') , 'icons/' + lowercase_appname + '-splash.png')
|
||||
bld.install_as(os.path.join (bld.env['DATADIR'], 'small-splash.png') , 'icons/' + lowercase_appname + '-small-splash.png')
|
||||
bld.install_files(bld.env['DATADIR'], 'ArdourMono.ttf')
|
||||
|
||||
if bld.env['build_target'] == 'mingw':
|
||||
|
@ -591,8 +591,8 @@ cp ../../gtk2_ardour/*.colors $Etc
|
||||
cp ../../instant.xml $Shared/instant.xml
|
||||
cp -r ../../gtk2_ardour/icons $Shared
|
||||
cp -r ../../gtk2_ardour/pixmaps $Shared
|
||||
cp -r ../../gtk2_ardour/splash.png $Shared
|
||||
cp -r ../../gtk2_ardour/small-splash.png $Shared
|
||||
cp -r ../../gtk2_ardour/icons/${EXENAME}-splash.png ${Shared}/splash.png
|
||||
cp -r ../../gtk2_ardour/icons/${EXENAME}-small-splash.png ${Shared}/small-splash.png
|
||||
cp -r ../../gtk2_ardour/ArdourMono.ttf $Shared
|
||||
|
||||
#
|
||||
|
@ -24,6 +24,8 @@ WITH_LADSPA=1
|
||||
STRIP=1
|
||||
PRINT_SYSDEPS=
|
||||
WITH_NLS=
|
||||
LCNAME=ardour
|
||||
|
||||
: ${HARRISONCHANNELSTRIP=harrison_channelstrip}
|
||||
|
||||
. ../define_versions.sh
|
||||
@ -51,6 +53,7 @@ while [ $# -gt 0 ] ; do
|
||||
WITH_LADSPA=;
|
||||
STRIP= ;
|
||||
PRODUCT_PKG_DIR=Mixbus;
|
||||
LCNAME=mixbus ;
|
||||
APPNAME=Mixbus ;
|
||||
shift ;;
|
||||
--mixbus32c) MIXBUS=1;
|
||||
@ -61,6 +64,7 @@ while [ $# -gt 0 ] ; do
|
||||
SAE= ;
|
||||
WITH_LADSPA=;
|
||||
STRIP= ;
|
||||
LCNAME=mixbus32c ;
|
||||
PRODUCT_PKG_DIR=Mixbus32C;
|
||||
APPNAME=Mixbus32C-${major_version} ;
|
||||
major_version=""
|
||||
@ -486,8 +490,8 @@ cp ../../instant.xml $Resources/instant.xml
|
||||
cp -r ../../gtk2_ardour/icons $Resources
|
||||
cp -r ../../gtk2_ardour/pixmaps $Resources
|
||||
cp ../../gtk2_ardour/*.colors $Resources
|
||||
cp -R ../../gtk2_ardour/splash.png $Shared
|
||||
cp -R ../../gtk2_ardour/small-splash.png $Shared
|
||||
cp -R ../../gtk2_ardour/icons/${LCNAME}-splash.png ${Shared}/splash.png
|
||||
cp -R ../../gtk2_ardour/icons/${LCNAME}-small-splash.png ${Shared}/small-splash.png
|
||||
cp -R ../../gtk2_ardour/ArdourMono.ttf $Shared
|
||||
|
||||
# go through and recursively remove any .svn dirs in the bundle
|
||||
|
17
wscript
17
wscript
@ -611,6 +611,10 @@ int main() { return 0; }''',
|
||||
if Options.options.program_name.lower() == "mixbus":
|
||||
compiler_flags.append ('-DMIXBUS')
|
||||
|
||||
if Options.options.program_name.lower() == "mixbus32c":
|
||||
compiler_flags.append ('-DMIXBUS')
|
||||
compiler_flags.append ('-DMIXBUS32C')
|
||||
|
||||
compiler_flags.append ('-DPROGRAM_NAME="' + Options.options.program_name + '"')
|
||||
compiler_flags.append ('-DPROGRAM_VERSION="' + PROGRAM_VERSION + '"')
|
||||
|
||||
@ -633,6 +637,16 @@ int main() { return 0; }''',
|
||||
conf.env.append_value('CXXFLAGS', cxx_flags)
|
||||
conf.env.append_value('LINKFLAGS', linker_flags)
|
||||
|
||||
def create_resource_file(icon):
|
||||
try:
|
||||
text = 'IDI_ICON1 ICON DISCARDABLE "icons/' + icon + '.ico"\n'
|
||||
o = open('gtk2_ardour/windows_icon.rc', 'w')
|
||||
o.write(text)
|
||||
o.close()
|
||||
except IOError:
|
||||
print('Could not open gtk2_ardour/windows_icon.rc for writing\n')
|
||||
sys.exit(-1)
|
||||
|
||||
def is_tracks_build (conf):
|
||||
return conf.env['PROGRAM_NAME'] == 'Tracks Live'
|
||||
|
||||
@ -1214,6 +1228,9 @@ const char* const ardour_config_info = "\\n\\
|
||||
def build(bld):
|
||||
create_stored_revision()
|
||||
|
||||
if Options.options.dist_target == 'mingw' or Options.options.dist_target == 'msvc':
|
||||
create_resource_file(Options.options.program_name.lower())
|
||||
|
||||
# add directories that contain only headers, to workaround an issue with waf
|
||||
|
||||
if not bld.is_defined('USE_EXTERNAL_LIBS'):
|
||||
|
Loading…
Reference in New Issue
Block a user