From nobody Mon Feb 9 22:20:07 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=nongnu.org ARC-Seal: i=1; a=rsa-sha256; t=1667207747; cv=none; d=zohomail.com; s=zohoarc; b=BrW4xn/5B2xI7j+K6i4iZC4aISPdFdjZvv1fa0MQfXcH8zFVQL4we2+bqcFJ6TVr7F+zL5GE4RvkhicOh6rZH2ztU7cZAd7I5sgj/k2MYtAd2E9HQNSFrZ4/S3ngWS+3kUCEaES8Kg43R+3iWnwPwLAozkoKP9nx3iq6gkiplJY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1667207747; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:References:Sender:Subject:To; bh=KjRNc8y6eJ3od/Yqk2NPDEWlSQMbZw4QKN89G2DfOMg=; b=KdH+o6bkVq+CH+kw74vS8aiaR/Q5Eq9+2FXWzC45SJXrxqYaNtWWOX8jy1jIFs7ceZN3xy8fpAkODmotPLmOjO8G1XffRRGo1S6aufsRxamKFIfmPqwK4w0OEwxxxp2KE2+XvFb6032+Jj+JnvVBA6ROPEJ+9IKYJLwG0K5DO2w= ARC-Authentication-Results: i=1; mx.zohomail.com; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1667207747101634.8514308557269; Mon, 31 Oct 2022 02:15:47 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1opQsI-0004Zh-Tf; Mon, 31 Oct 2022 05:14:30 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1opQsG-0004Z0-Vb for qemu-devel@nongnu.org; Mon, 31 Oct 2022 05:14:28 -0400 Received: from mail.weilnetz.de ([37.120.169.71] helo=mail.v2201612906741603.powersrv.de) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1opQsF-0000Gx-GJ for qemu-devel@nongnu.org; Mon, 31 Oct 2022 05:14:28 -0400 Received: from qemu.weilnetz.de (qemu.weilnetz.de [188.68.58.204]) by mail.v2201612906741603.powersrv.de (Postfix) with ESMTP id 4E40BDA10FC; Mon, 31 Oct 2022 10:14:26 +0100 (CET) Received: by qemu.weilnetz.de (Postfix, from userid 1000) id 4ABE146001C; Mon, 31 Oct 2022 10:14:26 +0100 (CET) To: qemu-devel@nongnu.org Cc: Bin Meng , =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Stefan Weil Subject: [PULL 2/4] scripts/nsis.py: Fix destination directory name when invoked on Windows Date: Mon, 31 Oct 2022 10:14:04 +0100 Message-Id: <20221031091406.382872-3-sw@weilnetz.de> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20221031091406.382872-1-sw@weilnetz.de> References: <20221031091406.382872-1-sw@weilnetz.de> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=37.120.169.71; envelope-from=stefan@weilnetz.de; helo=mail.v2201612906741603.powersrv.de X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "Qemu-devel" Reply-to: Stefan Weil From: Stefan Weil via Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZM-MESSAGEID: 1667207749131100003 From: Bin Meng "make installer" on Windows fails with the following message: Traceback (most recent call last): File "G:\msys64\home\foo\git\qemu\scripts\nsis.py", line 89, in main() File "G:\msys64\home\foo\git\qemu\scripts\nsis.py", line 34, in main with open( OSError: [Errno 22] Invalid argument: 'R:/Temp/tmpw83xhjquG:/msys64/qemu/system-emulations.nsh' ninja: build stopped: subcommand failed. Use os.path.splitdrive() to form a canonical path without the drive letter on Windows. This works with cross-build on Linux too. Fixes: 8adfeba953e0 ("meson: add NSIS building") Signed-off-by: Bin Meng Message-Id: <20220908132817.1831008-3-bmeng.cn@gmail.com> Reviewed-by: Marc-Andr=C3=A9 Lureau Reviewed-by: Philippe Mathieu-Daud=C3=A9 Tested-by: Stefan Weil Signed-off-by: Stefan Weil --- scripts/nsis.py | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/scripts/nsis.py b/scripts/nsis.py index bbb41d9386..baa6ef9594 100644 --- a/scripts/nsis.py +++ b/scripts/nsis.py @@ -28,16 +28,18 @@ def main(): parser.add_argument("nsisargs", nargs=3D"*") args =3D parser.parse_args() =20 + # canonicalize the Windows native prefix path + prefix =3D os.path.splitdrive(args.prefix)[1] destdir =3D tempfile.mkdtemp() try: subprocess.run(["make", "install", "DESTDIR=3D" + destdir]) with open( - os.path.join(destdir + args.prefix, "system-emulations.nsh"), = "w" + os.path.join(destdir + prefix, "system-emulations.nsh"), "w" ) as nsh, open( - os.path.join(destdir + args.prefix, "system-mui-text.nsh"), "w" + os.path.join(destdir + prefix, "system-mui-text.nsh"), "w" ) as muinsh: for exe in sorted(glob.glob( - os.path.join(destdir + args.prefix, "qemu-system-*.exe") + os.path.join(destdir + prefix, "qemu-system-*.exe") )): exe =3D os.path.basename(exe) arch =3D exe[12:-4] @@ -61,7 +63,7 @@ def main(): !insertmacro MUI_DESCRIPTION_TEXT ${{Section_{0}}} "{1}" """.format(arch, desc)) =20 - for exe in glob.glob(os.path.join(destdir + args.prefix, "*.exe")): + for exe in glob.glob(os.path.join(destdir + prefix, "*.exe")): signcode(exe) =20 makensis =3D [ @@ -69,7 +71,7 @@ def main(): "-V2", "-NOCD", "-DSRCDIR=3D" + args.srcdir, - "-DBINDIR=3D" + destdir + args.prefix, + "-DBINDIR=3D" + destdir + prefix, ] dlldir =3D "w32" if args.cpu =3D=3D "x86_64": --=20 2.30.2