windows application icon
authorRobin Gareus <robin@gareus.org>
Sun, 5 Oct 2014 00:12:25 +0000 (02:12 +0200)
committerRobin Gareus <robin@gareus.org>
Sun, 5 Oct 2014 00:12:25 +0000 (02:12 +0200)
gtk2_ardour/windows_icon.rc [new file with mode: 0644]
gtk2_ardour/wscript
tools/x-mingw.sh
wscript

diff --git a/gtk2_ardour/windows_icon.rc b/gtk2_ardour/windows_icon.rc
new file mode 100644 (file)
index 0000000..4fc17d0
--- /dev/null
@@ -0,0 +1 @@
+IDI_ICON1 ICON DISCARDABLE "icons/ardour.ico"
index e97248e658ce7d2a188c44f05be7359c507f60f6..e8888f92d2b94fc3392488d82cc34adf1d8b558d 100644 (file)
@@ -8,6 +8,7 @@ import sys
 import re
 import time
 from waflib.Task import Task
+from waflib.Tools import winres
 
 I18N_PACKAGE = 'gtk2_ardour3'
 
@@ -398,7 +399,10 @@ def build(bld):
         obj.target    = 'gtk2_ardour'
     else:
         # just the normal executable version of the GTK GUI
-        obj = bld (features = 'cxx c cxxprogram')
+        if bld.env['build_target'] == 'mingw':
+            obj = bld (features = 'cxx c cxxprogram winres')
+        else:
+            obj = bld (features = 'cxx c cxxprogram')
         obj.source    = gtk2_ardour_sources
         obj.target = 'ardour-' + str (bld.env['VERSION'])
         obj.includes = ['.']
@@ -438,6 +442,7 @@ def build(bld):
         obj.source += [ 'cocoacarbon.mm', 'bundle_env_cocoa.cc' ]
     elif bld.env['build_target'] == 'mingw':
         obj.source += [ 'bundle_env_mingw.cc' ]
+        obj.source += [ 'windows_icon.rc' ]
     else:
         obj.source += [ 'bundle_env_linux.cc' ]
 
index 3234a4df7c84081b6c610dd6982d9b82fe817297..082110f37a4c91368b1e6ffae8452198897d7dcd 100755 (executable)
@@ -546,6 +546,7 @@ export LD=${XPREFIX}-ld
 export NM=${XPREFIX}-nm
 export AS=${XPREFIX}-as
 export STRIP=${XPREFIX}-strip
+export WINRC=${XPREFIX}-windres
 export RANLIB=${XPREFIX}-ranlib
 export DLLTOOL=${XPREFIX}-dlltool
 
diff --git a/wscript b/wscript
index b0ed291ce00ffcf709f6fd0416331e466aebfa7a..68b6b5998c92904fdd72c8acf82c1fa61e95790b 100644 (file)
--- a/wscript
+++ b/wscript
@@ -7,6 +7,7 @@ import string
 import subprocess
 import sys
 import platform as PLATFORM
+from waflib.Tools import winres
 
 def fetch_git_revision ():
     cmd = "git describe HEAD"
@@ -508,6 +509,9 @@ def sub_config_and_use(conf, name, has_objects = True):
 def configure(conf):
     conf.load('compiler_c')
     conf.load('compiler_cxx')
+    if Options.options.dist_target == 'mingw':
+        conf.load('winres')
+
     conf.env['VERSION'] = VERSION
     conf.env['MAJOR'] = MAJOR
     conf.env['MINOR'] = MINOR