From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by master.gitmailbox.com (Postfix) with ESMTP id 1F63940C66 for ; Sun, 7 Aug 2022 15:13:24 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id BD57F68B6EF; Sun, 7 Aug 2022 18:13:05 +0300 (EEST) Received: from btbn.de (btbn.de [136.243.74.85]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id E3BAA68B680 for ; Sun, 7 Aug 2022 18:12:57 +0300 (EEST) Received: from [authenticated] by btbn.de (Postfix) with ESMTPSA id 7C30F2DD9F1; Sun, 7 Aug 2022 17:12:57 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rothenpieler.org; s=mail; t=1659885177; bh=COdCzOGB0XRHWHIUec4Ro1hY0c2KTpcB2IuRDnXL1g0=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=hVEeB8PsH4jWmWEKO0xMiv967b4Ztd7fD04X6+IOHdDCgu3EeCCFLPiti/I/Viq8g s9ePxP4cd95g/N1oVKKpJhxKN4O2HODwipfRHlVNaLa9J+Be2F96pnRimHtb6HqJ++ lvYj05G5HS1s8u8NgeMaXtPFF5iEU3XRkE4cP50hmKvHIbNBEMechU9pW0Fulqrypl OptCOVickCytaCegAMAutKLP+3M3iscZUhaapilNtPZtCN8wejL4tppBK1g1/69oPT DnrOiJyENLB7iaTDl2aLPRH0XsGS3UN3UtFeuJvJ5CKgJn3M5t79/QQmZM6aawpR6K osHnjAz5roydA== From: Timo Rothenpieler To: ffmpeg-devel@ffmpeg.org Date: Sun, 7 Aug 2022 17:12:48 +0200 Message-Id: <20220807151248.15182-3-timo@rothenpieler.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220807151248.15182-1-timo@rothenpieler.org> References: <20220807151248.15182-1-timo@rothenpieler.org> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 3/3] compat: add msvc windres wrapper X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: FFmpeg development discussions and patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: FFmpeg development discussions and patches Cc: Timo Rothenpieler Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: This is by no means a complete wrapper. It's only designed to fit the usecase ffmpegs build system has. --- compat/windows/mswindres | 32 ++++++++++++++++++++++++++++++++ configure | 2 ++ 2 files changed, 34 insertions(+) create mode 100755 compat/windows/mswindres diff --git a/compat/windows/mswindres b/compat/windows/mswindres new file mode 100755 index 0000000000..450525a33e --- /dev/null +++ b/compat/windows/mswindres @@ -0,0 +1,32 @@ +#!/bin/sh + +if [ "$1" = "--version" ]; then + rc.exe /? + exit $? +fi + +if [ $# -lt 2 ]; then + echo "Usage: mswindres [-I/include/path ...] [-DSOME_DEFINE ...] [-o output.o] input.rc [output.o]" >&2 + exit 0 +fi + +EXTRA_OPTS="/nologo" + +while [ $# -gt 2 ]; do + case $1 in + -D*) EXTRA_OPTS="$EXTRA_OPTS /d$(echo $1 | sed -e "s/^..//" -e "s/ /\\\\ /g")" ;; + -I*) EXTRA_OPTS="$EXTRA_OPTS /i$(echo $1 | sed -e "s/^..//" -e "s/ /\\\\ /g")" ;; + -o) OPT_OUT="$2"; shift ;; + esac + shift +done + +IN="$1" +if [ -z "$OPT_OUT" ]; then + OUT="$2" +else + OUT="$OPT_OUT" +fi + +eval set -- $EXTRA_OPTS +rc.exe "$@" /fo "$OUT" "$IN" diff --git a/configure b/configure index 09fbe66e9b..6761d0cb32 100755 --- a/configure +++ b/configure @@ -4369,6 +4369,7 @@ case "$toolchain" in die "Unsupported MSVC version (2013 or newer required)" fi ld_default="$source_path/compat/windows/mslink" + windres_default="$source_path/compat/windows/mswindres" nm_default="dumpbin.exe -symbols" ar_default="lib.exe" case "${arch:-$arch_default}" in @@ -5619,6 +5620,7 @@ case $target_os in # Cannot build both shared and static libs with MSVC or icl. disable static fi + ! enabled small && test_cmd $windres --version && enable gnu_windres enabled x86_32 && check_ldflags -LARGEADDRESSAWARE shlibdir_default="$bindir_default" SLIBPREF="" -- 2.34.1 _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".