Skip to content

Commit 2874c23

Browse files
committed
wscript: set PROGRAM_NAME in env early, not as set_compiler_flags side effect
1 parent 1e843a3 commit 2874c23

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

wscript

+4-4
Original file line numberDiff line numberDiff line change
@@ -817,8 +817,6 @@ int main() { return 0; }''',
817817
compiler_flags.append ('-DPROGRAM_NAME="' + Options.options.program_name + '"')
818818
compiler_flags.append ('-DPROGRAM_VERSION="' + PROGRAM_VERSION + '"')
819819

820-
conf.env['PROGRAM_NAME'] = Options.options.program_name
821-
822820
if opt.debug:
823821
conf.env.append_value('CFLAGS', debug_flags)
824822
conf.env.append_value('CXXFLAGS', debug_flags)
@@ -839,9 +837,9 @@ int main() { return 0; }''',
839837
conf.env.append_value('CXXFLAGS', cxx_flags)
840838
conf.env.append_value('LINKFLAGS', linker_flags)
841839

842-
def create_resource_file(icon):
840+
def create_resource_file(name):
843841
try:
844-
text = 'IDI_ICON1 ICON DISCARDABLE "icons/' + icon + '.ico"\n'
842+
text = 'IDI_ICON1 ICON DISCARDABLE "icons/' + name + '.ico"\n'
845843
o = open('gtk2_ardour/windows_icon.rc', 'w')
846844
o.write(text)
847845
o.close()
@@ -1018,6 +1016,8 @@ def configure(conf):
10181016
if itstool != "itstool" or version[0] < "2":
10191017
conf.fatal("--freedesktop requires itstool > 2.0.0 to translate files.")
10201018

1019+
conf.env['PROGRAM_NAME'] = Options.options.program_name or 'Ardour'
1020+
10211021
conf.env['VERSION'] = VERSION
10221022
conf.env['MAJOR'] = MAJOR
10231023
conf.env['MINOR'] = MINOR

0 commit comments

Comments
 (0)