diff --git a/src/bin/clapper-app/meson.build b/src/bin/clapper-app/meson.build index c63b5bb2..83f3946c 100644 --- a/src/bin/clapper-app/meson.build +++ b/src/bin/clapper-app/meson.build @@ -94,6 +94,7 @@ if is_windows clapperapp_deps += winmm_dep clapperapp_c_args += ['-DHAVE_WIN_TIME_API'] endif + subdir('windows') endif executable( diff --git a/src/bin/clapper-app/windows/clapper.exe.manifest b/src/bin/clapper-app/windows/clapper.exe.manifest new file mode 100644 index 00000000..0f4c5895 --- /dev/null +++ b/src/bin/clapper-app/windows/clapper.exe.manifest @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + true + + + diff --git a/src/bin/clapper-app/windows/clapper.ico b/src/bin/clapper-app/windows/clapper.ico new file mode 100644 index 00000000..61199159 Binary files /dev/null and b/src/bin/clapper-app/windows/clapper.ico differ diff --git a/src/bin/clapper-app/windows/clapper.rc.in b/src/bin/clapper-app/windows/clapper.rc.in new file mode 100644 index 00000000..037e077e --- /dev/null +++ b/src/bin/clapper-app/windows/clapper.rc.in @@ -0,0 +1,56 @@ +/* Clapper Application + * Copyright (C) 2024 Rafał Dzięgiel + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#include + +#define VER_CLAPPERVERSION @VER_CLAPPERVERSION@ +#define VER_NONE 0x0L + +MAIN_ICON ICON "clapper.ico" + +VS_VERSION_INFO VERSIONINFO +FILEVERSION VER_CLAPPERVERSION +PRODUCTVERSION VER_CLAPPERVERSION +FILEFLAGSMASK VS_FFI_FILEFLAGSMASK +FILEFLAGS VER_NONE +FILEOS VOS__WINDOWS32 +FILETYPE VFT_APP +FILESUBTYPE VER_NONE +BEGIN + BLOCK "StringFileInfo" + BEGIN + BLOCK "040904E4" + BEGIN + VALUE "CompanyName", "Rafostar" + VALUE "FileDescription", @CLAPPER_APP_NAME@ + VALUE "FileVersion", @PACKAGE_VERSION@ + VALUE "InternalName", @PACKAGE@ + VALUE "LegalCopyright", "Copyright (C) Rafal Dziegiel" + VALUE "OriginalFilename", @CLAPPER_EXE@ + VALUE "ProductName", @CLAPPER_APP_NAME@ + VALUE "ProductVersion", @PACKAGE_VERSION@ + END + END + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0x409, 1252 + END +END + +#ifdef __MINGW32__ +CREATEPROCESS_MANIFEST_RESOURCE_ID RT_MANIFEST "clapper.exe.manifest" +#endif diff --git a/src/bin/clapper-app/windows/meson.build b/src/bin/clapper-app/windows/meson.build new file mode 100644 index 00000000..14bccb92 --- /dev/null +++ b/src/bin/clapper-app/windows/meson.build @@ -0,0 +1,20 @@ +rc_conf = configuration_data() +rc_conf.set('VER_CLAPPERVERSION', clapper_version.replace('.', ',') + ',0') +rc_conf.set_quoted('PACKAGE', meson.project_name()) +rc_conf.set_quoted('PACKAGE_VERSION', meson.project_version()) +rc_conf.set_quoted('PACKAGE_ORIGIN', 'https://github.com/Rafostar/clapper') +rc_conf.set_quoted('CLAPPER_APP_NAME', 'Clapper') +rc_conf.set_quoted('CLAPPER_EXE', meson.project_name() + '.exe') + +clapperapp_rc = configure_file( + input: 'clapper.rc.in', + output: 'clapper.rc', + configuration: rc_conf, +) + +windres = find_program('windres', required: true) +clapperapp_sources += custom_target('clapper.o', + input: clapperapp_rc, + output: 'clapper.o', + command: [windres, '-I', '@CURRENT_SOURCE_DIR@', '-o', '@OUTPUT@', '@INPUT@'] +)