From nobody Mon Feb 9 09:34:39 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; 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=gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1662643892; cv=none; d=zohomail.com; s=zohoarc; b=CAreYnaDyFyMrmIPcoZCzn7O8LA6VqAglHI+PogL1dVADdw+pGbFRPPJHVDixhw5exTaTmJ8DCHiH3ghkbbS4hKsYYN3FsjJ7J356ydSXJfmvH7aZj/i+ik0EtpsiwIMKg1T7byXMWQgbBnhq3MancLCY/0tZiXA9hj25x/jRD8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1662643892; h=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:References:Sender:Subject:To; bh=zkVLGjem6wSZCZmhICiJtuczZUPqP8zkVJzeqrMRh7k=; b=UM6LEY9+lpysdqd2Se819qzW5qRwCLZQZf+hJ5a5MZEuY4oysXWIo7DD6+r7R1i+SBHhfK7ESOsCrEBP5fsTIPWrQSMeL6xaru5TYuPRxdjWTy57bs66Nh7VNt0BvVdWCcmlit8lF7p1HEsphw5nyJdlHhVK3sCAhrJg3+zT7HM= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; 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 1662643892377211.90993519688027; Thu, 8 Sep 2022 06:31:32 -0700 (PDT) Received: from localhost ([::1]:33644 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oWHcw-0007Hw-RT for importer@patchew.org; Thu, 08 Sep 2022 09:31:30 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:41334) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oWHa3-0004TM-Rb for qemu-devel@nongnu.org; Thu, 08 Sep 2022 09:28:32 -0400 Received: from mail-pl1-x62c.google.com ([2607:f8b0:4864:20::62c]:40526) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oWHa2-0002aX-69 for qemu-devel@nongnu.org; Thu, 08 Sep 2022 09:28:31 -0400 Received: by mail-pl1-x62c.google.com with SMTP id b21so4948797plz.7 for ; Thu, 08 Sep 2022 06:28:29 -0700 (PDT) Received: from ubuntu.. (144.168.56.201.16clouds.com. [144.168.56.201]) by smtp.gmail.com with ESMTPSA id r8-20020a170902be0800b001755ac7dd0asm1731693pls.290.2022.09.08.06.28.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 08 Sep 2022 06:28:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date; bh=zkVLGjem6wSZCZmhICiJtuczZUPqP8zkVJzeqrMRh7k=; b=NELC95h8i/tRnhGiNTjjRNRTfL2jkxAPvhLLxO02FO0ur3cLdAGs8f4O8UzSc9MG8z JYMDQlhuG9/NQP2hlW9UK0lUOj9BQ/Otb7a7cjqo/b6PZWCAHLSq24ipLqCm+DFt9mgt gJWC1/RQdT1Xh+R5Nsv8T5eMg5uSId6hirp3RsL+DcEz1eOCzfGvqlfftnixoCdD2HVl mOMoEF71Yl5RxBpzantMJRSFP2dkTRmAvzXSBEfQMyBi794Lhp5FoISc6Mvj4KCYRPeh oShWJBJ/w2is/K5M3Pr7MxQbB6zKfBxXVW1Cxvq83l5wL6l+P5T3LZ2yPMa9aD19qQ89 jXdA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date; bh=zkVLGjem6wSZCZmhICiJtuczZUPqP8zkVJzeqrMRh7k=; b=nwQGvZWxDTT+ChsmyCNzGAJplHa/cpYngbU57izpZ6cY5oWqzdeF8ktMwv0+ncG34j Qz5UT8EK+cBK2+9HrNebV8+Ety7fABcYnA/8ObZOWhu6wC8d+N07D85F0W18iPAjoNFS n0xeKZFrmnSdgAOzw7BVQcSbWvN73kV5JUYSzdFH9wI/sv5laaUxllP05cwdJY1Pppit uZPFew4P3K9vKxDqEQrHkKgKeen+fe2t7MJaFcKqY7AsvzXQ5KnAPepeADTYVmdN/w2o iC3FFgi4a1eCzo/QNIp3eZ/zrdMZSwADaqgm8A1wsC5xGLRTauqQWUGOqTOLO94HAC+s USHA== X-Gm-Message-State: ACgBeo0N9f689F2+d4yWfyzj1eJwwbEEil7yO5EeE+pY68buysJE6KdU EfzlMeAsCtN0ixPP1QlH1YtGVmkbXeo= X-Google-Smtp-Source: AA6agR4L1z3mTifhI0QgbLaqu2dbwkEIMPePvorNqctY/Vpenz168BSTW91tQQbTzGEMnO4Y+j2btg== X-Received: by 2002:a17:902:dac2:b0:172:5f2a:f30 with SMTP id q2-20020a170902dac200b001725f2a0f30mr8798142plx.167.1662643708027; Thu, 08 Sep 2022 06:28:28 -0700 (PDT) From: Bin Meng To: qemu-devel@nongnu.org Cc: Bin Meng , Cleber Rosa , John Snow Subject: [PATCH 2/7] scripts/nsis.py: Fix destination directory name when invoked on Windows Date: Thu, 8 Sep 2022 21:28:12 +0800 Message-Id: <20220908132817.1831008-3-bmeng.cn@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220908132817.1831008-1-bmeng.cn@gmail.com> References: <20220908132817.1831008-1-bmeng.cn@gmail.com> MIME-Version: 1.0 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=2607:f8b0:4864:20::62c; envelope-from=bmeng.cn@gmail.com; helo=mail-pl1-x62c.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 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: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @gmail.com) X-ZM-MESSAGEID: 1662643892933100001 Content-Type: text/plain; charset="utf-8" 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 Reviewed-by: Marc-Andr=C3=A9 Lureau Reviewed-by: Philippe Mathieu-Daud=C3=A9 Tested-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.34.1