From 79cca854bc7b59a6c0473521911d09853243c249 Mon Sep 17 00:00:00 2001 From: Rafal Kupiec Date: Thu, 14 Dec 2023 16:15:35 +0100 Subject: [PATCH] Get rid of windres wrapper and temporarily disable pipeline for this branch --- .../{build.yml => build.yml.DISABLE} | 0 build-linux.sh | 2 +- tools/windres.c | 558 ------------------ 3 files changed, 1 insertion(+), 559 deletions(-) rename .github/workflows/{build.yml => build.yml.DISABLE} (100%) delete mode 100644 tools/windres.c diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml.DISABLE similarity index 100% rename from .github/workflows/build.yml rename to .github/workflows/build.yml.DISABLE diff --git a/build-linux.sh b/build-linux.sh index 3ebcc16..9c19d34 100755 --- a/build-linux.sh +++ b/build-linux.sh @@ -519,7 +519,7 @@ xtchain_build() for EXEC in dlltool ld objdump; do ln -sf ../${GENERIC}/bin/${EXEC}-wrapper ${BINDIR}/bin/${ARCH}-w64-mingw32-${EXEC} done - for EXEC in bin2c exetool windres xtcspecc; do + for EXEC in bin2c exetool xtcspecc; do if [ ! -e ${BINDIR}/bin/${EXEC} ]; then gcc ${WRKDIR}/tools/${EXEC}.c -o ${BINDIR}/bin/${EXEC} fi diff --git a/tools/windres.c b/tools/windres.c deleted file mode 100644 index 7a07360..0000000 --- a/tools/windres.c +++ /dev/null @@ -1,558 +0,0 @@ -/** - * PROJECT: XTchain - * LICENSE: See COPYING.md in the top level directory - * FILE: tools/windres.c - * DESCRIPTION: WINDRES compatible interface to LLVM - * DEVELOPERS: Josh de Kock - * Martin Storsjo - * Rafal Kupiec - */ - -#include "xtchain.h" - -#define WINDRES_VERSION "1.0" - -#ifndef DEFAULT_TARGET -#define DEFAULT_TARGET "x86_64-w64-mingw32" -#endif - -#include - -#define _tspawnvp_escape _spawnvp - -#include -#include - -#define _P_WAIT 0 - -static -int -_spawnvp(int mode, - const char *filename, - const char * const *argv) -{ - pid_t pid; - - if(!(pid = fork())) - { - execvp(filename, (char **) argv); - perror(filename); - exit(1); - } - - int stat = 0; - - if(waitpid(pid, &stat, 0) == -1) - { - return -1; - } - - if(WIFEXITED(stat)) - { - return WEXITSTATUS(stat); - } - errno = EIO; - - return -1; -} - -static -const -char *unescape_cpp(const char *str) -{ - char *out = strdup(str); - int len = strlen(str); - int i, outpos = 0; - - for(i = 0; i < len - 1; i++) - { - if(str[i] == '\\' && str[i + 1] == '"') - { - continue; - } - out[outpos++] = str[i]; - } - - while(i < len) - { - out[outpos++] = str[i++]; - } - - out[outpos++] = '\0'; - - return out; -} - -static -void print_version(void) -{ - printf("XTchain windres (GNU windres compatible) %s\n", WINDRES_VERSION); - exit(0); -} - -static -void print_help(void) -{ - printf( - "usage: llvm-windres