Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1q7iVm-00062p-S3 for pgsql-hackers@arkaria.postgresql.org; Fri, 09 Jun 2023 20:15:06 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1q7iVk-0004vS-Px for pgsql-hackers@arkaria.postgresql.org; Fri, 09 Jun 2023 20:15:04 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1q7iVk-0004ua-9Y for pgsql-hackers@lists.postgresql.org; Fri, 09 Jun 2023 20:15:04 +0000 Received: from mail-yw1-x1129.google.com ([2607:f8b0:4864:20::1129]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1q7iVh-0018XA-5w for pgsql-hackers@postgresql.org; Fri, 09 Jun 2023 20:15:02 +0000 Received: by mail-yw1-x1129.google.com with SMTP id 00721157ae682-565aa2cc428so20870687b3.1 for ; Fri, 09 Jun 2023 13:15:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=leadboat.com; s=google; t=1686341700; x=1688933700; h=user-agent:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=3b2sIM+DbO6uA/n0SuyEYujhTIOuV6xArx6UsEIf/3w=; b=gF6uFJW2m66ohgSx0onPXzw0mdLs8hzPnsnDjRekJDnB7KsbmizF09VRBAzFmC0zVu wvh/Os3XgXrkmquyjTSfhQ58n91hA5nn/1BeRu0R2+rkD/zuBzx4jfitKbomXk2xfHsl u2HGvo+P9L5XuqM5duQLSLOvjxj+vQAp227pc= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1686341700; x=1688933700; h=user-agent:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=3b2sIM+DbO6uA/n0SuyEYujhTIOuV6xArx6UsEIf/3w=; b=js6N8D+VdiDIv/ws7LqDeP3bpvGsz628EsureQwl0ej6RRbu+fHyI1S7gk6riVd/EE i+jgzyKMpvjQDdOc/h1DnR6D05yd7ni2S2U/WkfgfTqXIZRX/Uu77DP8NnfcWAQBXyvQ 1/pgQWuU0wp91Tc2zH2UBDIZUfTky5BWmz0h0JqQCuVmzn0Ta9swK+Q83eWikWlZBT8t 4JcNRm6Dr+p1+LyWwbtVzqeSucJUrXggHi6afsjpSieBPXzX7RQQDqtGu+PkfgSBgZIb y2Yr2YhugnIigGHAu6k018kXOSVUWKwm0Gxj+dWA1utTm9b25qg7qIMGeZ6g0lIg6EvI xe9g== X-Gm-Message-State: AC+VfDwnqSc0xJxhzS5zp++0Nf8XUgW75ZYEH+e5+0R+968TCknIRvU1 +DtBBANWNxCjOGMZO9Fj66VQpA== X-Google-Smtp-Source: ACHHUZ6E18MlLmIprWE/YeGOMoyiwOs6MpL16ApO4SM3H/9Ua8JSobYnjTkwh7br9JEpn6WDtquAWQ== X-Received: by 2002:a0d:d697:0:b0:55a:1f2:ef6 with SMTP id y145-20020a0dd697000000b0055a01f20ef6mr2197339ywd.9.1686341699801; Fri, 09 Jun 2023 13:14:59 -0700 (PDT) Received: from rfd.leadboat.com ([2600:1702:a20:5750::2e]) by smtp.gmail.com with ESMTPSA id x204-20020a81a0d5000000b00565de196516sm811083ywg.32.2023.06.09.13.14.58 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 09 Jun 2023 13:14:58 -0700 (PDT) Date: Fri, 9 Jun 2023 13:14:55 -0700 From: Noah Misch To: Andres Freund , Magnus Hagander Cc: pgsql-hackers@postgresql.org Subject: Re: win32ver data in meson-built postgres.exe Message-ID: <20230609201455.GB1431998@rfd.leadboat.com> References: <20230607231407.GC1334487@rfd.leadboat.com> <20230607234726.gqvydjl6qamoyq2k@awork3.anarazel.de> <20230608014507.GD1334487@rfd.leadboat.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="OgqxwSJOaUobr8KG" Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/1.5.24 (2015-08-30) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --OgqxwSJOaUobr8KG Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit On Thu, Jun 08, 2023 at 01:10:00PM +0200, Magnus Hagander wrote: > On Thu, Jun 8, 2023 at 3:45 AM Noah Misch wrote: > > On Wed, Jun 07, 2023 at 04:47:26PM -0700, Andres Freund wrote: > > > On 2023-06-07 16:14:07 -0700, Noah Misch wrote: > > > > postgres.exe is icon-free. > > > > > > We could also just change that. > > > > I would be +1 for that (only if done for all build systems). Showing the > > elephant in task manager feels better than showing the generic-exe icon. > > I think this decision goes back all the way to the ancient times, and > the argument was then "user should not use the postgres.exe file when > clicking around" sort of. Back then, task manager didn't show the icon > at all, regardless. It does now, so I'm +1 to add the icon (in all the > build systems). That sounds good, and it's the attached one-byte change. That also simplifies the Meson fix; new version attached. --OgqxwSJOaUobr8KG Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="icon-postgres.exe-v1.patch" Author: Noah Misch Commit: Noah Misch Give postgres.exe the icon of other executables. We had left it icon-free since users won't achieve much by opening it from Windows Explorer. Subsequent to that decision, Task Manager started to show the icon. That shifts the balance in favor of attaching the icon, so do so. No back-patch, but make this late addition to v16. Reviewed by FIXME. Discussion: https://postgr.es/m/FIXME diff --git a/src/backend/Makefile b/src/backend/Makefile index e4bf0fe..3c42003 100644 --- a/src/backend/Makefile +++ b/src/backend/Makefile @@ -10,8 +10,7 @@ #------------------------------------------------------------------------- PGFILEDESC = "PostgreSQL Server" -# This is a daemon process, which is why it is not labeled as an executable -#PGAPPICON=win32 +PGAPPICON=win32 subdir = src/backend top_builddir = ../.. --OgqxwSJOaUobr8KG Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="win32ver-backend-meson-v2.patch" Author: Noah Misch Commit: Noah Misch Add win32ver data to meson-built postgres.exe. As in the older build systems, the resources object is not an input to postgres.def. Reviewed by FIXME. Discussion: https://postgr.es/m/FIXME diff --git a/src/backend/meson.build b/src/backend/meson.build index ccfc382..88a35e9 100644 --- a/src/backend/meson.build +++ b/src/backend/meson.build @@ -5,6 +5,7 @@ backend_sources = [] backend_link_with = [pgport_srv, common_srv] generated_backend_sources = [] +post_export_backend_sources = [] subdir('access') subdir('archive') @@ -133,8 +134,15 @@ if dtrace.found() and host_system != 'darwin' ) endif +if host_system == 'windows' + post_export_backend_sources += rc_bin_gen.process(win32ver_rc, extra_args: [ + '--NAME', 'postgres', + '--FILEDESC', 'PostgreSQL Server',]) +endif + postgres = executable('postgres', backend_input, + sources: post_export_backend_sources, objects: backend_objs, link_args: backend_link_args, link_with: backend_link_with, --OgqxwSJOaUobr8KG--