From 7aeb3ab967b56c5489780dec1d2dad16c54c1c26 Mon Sep 17 00:00:00 2001 From: "H. Utku Maden" Date: Thu, 13 Jun 2024 20:57:08 +0300 Subject: [PATCH] Rebrand as ReFuel. --- Dockerfile | 12 ++--- cmake/linux-arm.cmake | 2 +- cmake/linux-arm64.cmake | 2 +- cmake/linux-x64.cmake | 2 +- cmake/linux-x86.cmake | 2 +- cmake/osx-arm64.cmake | 2 +- cmake/osx-x64.cmake | 2 +- cmake/win-x64.cmake | 2 +- cmake/win-x86.cmake | 2 +- include/quik_common.h | 52 ------------------- include/rf_common.h | 54 ++++++++++++++++++++ sh/bashrc.sh | 4 +- sh/{quik_build_native.sh => build_native.sh} | 2 +- sh/publish.sh | 20 ++++++-- 14 files changed, 87 insertions(+), 73 deletions(-) delete mode 100644 include/quik_common.h create mode 100644 include/rf_common.h rename sh/{quik_build_native.sh => build_native.sh} (95%) diff --git a/Dockerfile b/Dockerfile index 19f8bff..fe7441c 100644 --- a/Dockerfile +++ b/Dockerfile @@ -64,18 +64,18 @@ RUN echo docker_cross_compiler > /etc/hostname # Setup interactive shell. # Setup sudo. Remove password prompt for group "wheel". - RUN echo "%wheel ALL=(ALL) NOPASSWD: ALL" > /etc/sudoers.d/quik_sudo_conf + RUN echo "%wheel ALL=(ALL) NOPASSWD: ALL" > /etc/sudoers.d/refuel_sudo_conf # Create a default user and switch. - RUN adduser --comment "" --disabled-password quik + RUN adduser --comment "" --disabled-password refuel RUN addgroup wheel - RUN usermod -aG wheel quik - USER quik - WORKDIR /home/quik + RUN usermod -aG wheel refuel + USER refuel + WORKDIR /home/refuel # Copy bashrc RUN cp /etc/bash.bashrc ~/.bashrc - COPY sh/bashrc.sh /home/quik/.bashrc + COPY sh/bashrc.sh /home/refuel/.bashrc # Execute an interactive shell. CMD bash diff --git a/cmake/linux-arm.cmake b/cmake/linux-arm.cmake index a973557..a5651bb 100644 --- a/cmake/linux-arm.cmake +++ b/cmake/linux-arm.cmake @@ -1,4 +1,4 @@ -# QUIK Toolchain file for Linux-arm systems. +# ReFuel Toolchain file for Linux-arm systems. # Copyright (C) 2023 set(CMAKE_SYSTEM_NAME Linux) diff --git a/cmake/linux-arm64.cmake b/cmake/linux-arm64.cmake index 5008591..378c9b8 100644 --- a/cmake/linux-arm64.cmake +++ b/cmake/linux-arm64.cmake @@ -1,4 +1,4 @@ -# QUIK Toolchain file for Linux-arm64 (aarch64) systems. +# ReFuel Toolchain file for Linux-arm64 (aarch64) systems. # Copyright (C) 2023 set(CMAKE_SYSTEM_NAME Linux) diff --git a/cmake/linux-x64.cmake b/cmake/linux-x64.cmake index 1366483..913664b 100644 --- a/cmake/linux-x64.cmake +++ b/cmake/linux-x64.cmake @@ -1,4 +1,4 @@ -# QUIK Toolchain file for Linux-x64 (amd64) systems. +# ReFuel Toolchain file for Linux-x64 (amd64) systems. # Copyright (C) 2023 set(CMAKE_SYSTEM_NAME Linux) diff --git a/cmake/linux-x86.cmake b/cmake/linux-x86.cmake index 2f2a27b..9ad5b01 100644 --- a/cmake/linux-x86.cmake +++ b/cmake/linux-x86.cmake @@ -1,4 +1,4 @@ -# QUIK Toolchain file for Linux-x86 (i386) systems. +# ReFuel Toolchain file for Linux-x86 (i386) systems. # Copyright (C) 2023 set(CMAKE_SYSTEM_NAME Linux) diff --git a/cmake/osx-arm64.cmake b/cmake/osx-arm64.cmake index b708f77..9ff796d 100644 --- a/cmake/osx-arm64.cmake +++ b/cmake/osx-arm64.cmake @@ -1,4 +1,4 @@ -# QUIK Toolchain file for OSX-ARM64 systems. +# ReFuel Toolchain file for OSX-ARM64 systems. # Copyright (C) 2024 set(CMAKE_SYSTEM_NAME OSX) diff --git a/cmake/osx-x64.cmake b/cmake/osx-x64.cmake index 5af58d8..4b7026e 100644 --- a/cmake/osx-x64.cmake +++ b/cmake/osx-x64.cmake @@ -1,4 +1,4 @@ -# QUIK Toolchain file for OSX-ARM64 systems. +# ReFuel Toolchain file for OSX-ARM64 systems. # Copyright (C) 2024 set(CMAKE_SYSTEM_NAME OSX) diff --git a/cmake/win-x64.cmake b/cmake/win-x64.cmake index 7224a0d..c0e8c8e 100644 --- a/cmake/win-x64.cmake +++ b/cmake/win-x64.cmake @@ -1,4 +1,4 @@ -# QUIK Toolchain file for Windows-x64 systems. +# ReFuel Toolchain file for Windows-x64 systems. # Copyright (C) 2023 set(CMAKE_SYSTEM_NAME Windows) diff --git a/cmake/win-x86.cmake b/cmake/win-x86.cmake index 1808cc4..ad70d98 100644 --- a/cmake/win-x86.cmake +++ b/cmake/win-x86.cmake @@ -1,4 +1,4 @@ -# QUIK Toolchain file for Windows-x86 systems. +# ReFuel Toolchain file for Windows-x86 systems. # Copyright (C) 2023 set(CMAKE_SYSTEM_NAME Windows) diff --git a/include/quik_common.h b/include/quik_common.h deleted file mode 100644 index 055f48c..0000000 --- a/include/quik_common.h +++ /dev/null @@ -1,52 +0,0 @@ -#ifndef _QUIK_COMMON_H_ -#define _QUIK_COMMON_H_ - -#include "stdlib.h" - -#if __GNUC__ || _MSC_VER - #define __QUIK_FUNCTION__ __FUNCTION__ -#else - #define __QUIK_FUNCTION__ NULL -#endif - -#if WIN32 || _MSC_VER > 0 || __MINGW__ - #define QEXTERN __declspec(dllexport) -#else - #define QEXTERN -#endif - -/** - * @brief Callback for failed assert function for QUIK redist libraries. - * @param[in] expr The expression that failed. - * @param[in] file The failing file (if available) - * @param[in] line The failing line number (if available) - * @param[in] func The failing function (if available) -*/ -typedef void (*quik_failed_assert_cb_t)(const char *expr, const char *file, int line, const char* func); - -#define DECLARE_ASSERT_CB(NAME) \ - QEXTERN quik_failed_assert_cb_t NAME##_failed_assert -#define DECLARE_ASSERT_STORE(NAME) \ - QEXTERN void NAME##_failed_assert_store(quik_failed_assert_cb_t cb) - -#define DEFINE_ASSERT_CB(NAME) \ - quik_failed_assert_cb_t NAME##_failed_assert -#define DEFINE_ASSERT_STORE(NAME) \ - void NAME##_failed_assert_store(quik_failed_assert_cb_t cb) { \ - NAME##_failed_assert = cb != NULL ? cb : quik_default_assert; \ - } - -#define QUIK_DECLARE_LIB(NAME) \ - DECLARE_ASSERT_CB(NAME); \ - DECLARE_ASSERT_STORE(NAME); - -#define QUIK_DEFINE_LIB(NAME) \ - DEFINE_ASSERT_CB(NAME); \ - DEFINE_ASSERT_STORE(NAME); - -inline static void quik_default_assert(const char *expr, const char *file, int line, const char *function) -{ - abort(); -} - -#endif diff --git a/include/rf_common.h b/include/rf_common.h new file mode 100644 index 0000000..a076da1 --- /dev/null +++ b/include/rf_common.h @@ -0,0 +1,54 @@ +#ifndef _REFUEL_COMMON_H_ +#define _REFUEL_COMMON_H_ + +#include "stdlib.h" +#include "stdio.h" + +#if __GNUC__ || _MSC_VER + #define __REFUEL_FUNCTION__ __FUNCTION__ +#else + #define __REFUEL_FUNCTION__ NULL +#endif + +#if WIN32 || _MSC_VER > 0 || __MINGW__ + #define RFEXTERN __declspec(dllexport) +#else + #define RFEXTERN +#endif + +/** + * @brief Callback for failed assert function for QUIK redist libraries. + * @param[in] expr The expression that failed. + * @param[in] file The failing file (if available) + * @param[in] line The failing line number (if available) + * @param[in] func The failing function (if available) +*/ +typedef void (*rf_failed_assert_cb_t)(const char *expr, const char *file, int line, const char* func); + +#define DECLARE_ASSERT_CB(NAME) \ + RFEXTERN rf_failed_assert_cb_t NAME##_failed_assert +#define DECLARE_ASSERT_STORE(NAME) \ + RFEXTERN void NAME##_failed_assert_store(rf_failed_assert_cb_t cb) + +#define DEFINE_ASSERT_CB(NAME) \ + rf_failed_assert_cb_t NAME##_failed_assert +#define DEFINE_ASSERT_STORE(NAME) \ + void NAME##_failed_assert_store(rf_failed_assert_cb_t cb) { \ + NAME##_failed_assert = cb != NULL ? cb : rf_default_assert; \ + } + +#define REFUEL_DECLARE_LIB(NAME) \ + DECLARE_ASSERT_CB(NAME); \ + DECLARE_ASSERT_STORE(NAME); + +#define REFUEL_DEFINE_LIB(NAME) \ + DEFINE_ASSERT_CB(NAME); \ + DEFINE_ASSERT_STORE(NAME); + +inline static void rf_default_assert(const char *expr, const char *file, int line, const char *function) +{ + fprintf(stderr, "Assert failed at %s:%d in %s()\n %s", file, line, function, expr); + abort(); +} + +#endif diff --git a/sh/bashrc.sh b/sh/bashrc.sh index 7bafa63..5b52cef 100644 --- a/sh/bashrc.sh +++ b/sh/bashrc.sh @@ -1,5 +1,5 @@ source $HOME/src/sh/init.sh -echo QUIK Project Copyright \(C\) 2023 +echo ReFuel Project - Copyright \(C\) 2023 echo -echo This is an interactive shell for QUIK build image. +echo This is an interactive shell for ReFuel build image. echo SuperUser \(su/sudo\) commands are enabled without a password. Beware. diff --git a/sh/quik_build_native.sh b/sh/build_native.sh similarity index 95% rename from sh/quik_build_native.sh rename to sh/build_native.sh index ca6cf16..cf1dbf7 100644 --- a/sh/quik_build_native.sh +++ b/sh/build_native.sh @@ -26,7 +26,7 @@ fi if [ -z "$CMAKE_DIR"] then - CMAKE_DIR="$SRC/Quik.Common/cmake" + CMAKE_DIR="$SRC/docker-cross-compiler/cmake" fi for ARCH in $ARCHS; do diff --git a/sh/publish.sh b/sh/publish.sh index 40d69d0..90ba63c 100644 --- a/sh/publish.sh +++ b/sh/publish.sh @@ -4,15 +4,27 @@ then $1 = $(dirname "$0") fi -if [ -z "$QUIK_API_KEY" ] +if [ -z "$NUGET_API_KEY" ] then echo "Please define QUIK_API_KEY" exit 1 fi +if [ -z "$NUGET_USER_NAME" ] +then + echo "Please define NUGET_USER_NAME" + exit 1 +fi + +if [ -z "$NUGET_INDEX" ] +then + echo "Please define NUGET_INDEX" + exit 1 +fi + cd $1 dotnet nuget add source \ - -n QUIK -u themixedupstuff -p "$QUIK_API_KEY" \ + -n ReFuel -u "$NUGET_USER_NAME" -p "$NUGET_API_KEY" \ --store-password-in-clear-text \ - https://git.mixedup.dev/api/packages/QUIK/nuget/index.json -dotnet nuget push -s QUIK bin/*/*.nupkg + "$NUGET_INDEX" +dotnet nuget push -s ReFuel bin/*/*.nupkg