Skip to content

Display and control your Android device

Add icon to scrcpy.exe

Romain Vimontcfcbc2ac2186
diff --git a/app/meson.build b/app/meson.build
index 3916b098..4c0e909d 100644
--- a/app/meson.build
+++ b/app/meson.build
@@ -49,9 +49,11 @@ conf.set('_XOPEN_SOURCE', '700')
conf.set('_GNU_SOURCE', true)
if host_machine.system() == 'windows'
+ windows = import('windows')
src += [
'src/sys/win/file.c',
'src/sys/win/process.c',
+ windows.compile_resources('scrcpy-windows.rc'),
]
conf.set('_WIN32_WINNT', '0x0600')
conf.set('WINVER', '0x0600')
diff --git a/app/scrcpy-windows.rc b/app/scrcpy-windows.rc
new file mode 100644
index 00000000..0dadc84c
--- /dev/null
+++ b/app/scrcpy-windows.rc
@@ -0,0 +1 @@
+0 ICON "../data/icon.ico"
diff --git a/cross_win32.txt b/cross_win32.txt
index 4db17be7..41ec3078 100644
--- a/cross_win32.txt
+++ b/cross_win32.txt
@@ -7,6 +7,7 @@ cpp = 'i686-w64-mingw32-g++'
ar = 'i686-w64-mingw32-ar'
strip = 'i686-w64-mingw32-strip'
pkgconfig = 'i686-w64-mingw32-pkg-config'
+windres = 'i686-w64-mingw32-windres'
[host_machine]
system = 'windows'
diff --git a/cross_win64.txt b/cross_win64.txt
index d03f0272..2565330b 100644
--- a/cross_win64.txt
+++ b/cross_win64.txt
@@ -7,6 +7,7 @@ cpp = 'x86_64-w64-mingw32-g++'
ar = 'x86_64-w64-mingw32-ar'
strip = 'x86_64-w64-mingw32-strip'
pkgconfig = 'x86_64-w64-mingw32-pkg-config'
+windres = 'x86_64-w64-mingw32-windres'
[host_machine]
system = 'windows'
diff --git a/data/icon.ico b/data/icon.ico
new file mode 100644
index 00000000..b3238778
Binary files /dev/null and b/data/icon.ico differ