stable #3

Merged
themixedupstuff merged 4 commits from stable into master 2024-06-13 19:58:34 +02:00
14 changed files with 87 additions and 73 deletions
Showing only changes of commit 4107bf9df4 - Show all commits

@ -64,18 +64,18 @@ RUN echo docker_cross_compiler > /etc/hostname
# Setup interactive shell. # Setup interactive shell.
# Setup sudo. Remove password prompt for group "wheel". # 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. # Create a default user and switch.
RUN adduser --comment "" --disabled-password quik RUN adduser --comment "" --disabled-password refuel
RUN addgroup wheel RUN addgroup wheel
RUN usermod -aG wheel quik RUN usermod -aG wheel refuel
USER quik USER refuel
WORKDIR /home/quik WORKDIR /home/refuel
# Copy bashrc # Copy bashrc
RUN cp /etc/bash.bashrc ~/.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. # Execute an interactive shell.
CMD bash CMD bash

@ -1,4 +1,4 @@
# QUIK Toolchain file for Linux-arm systems. # ReFuel Toolchain file for Linux-arm systems.
# Copyright (C) 2023 # Copyright (C) 2023
set(CMAKE_SYSTEM_NAME Linux) set(CMAKE_SYSTEM_NAME Linux)

@ -1,4 +1,4 @@
# QUIK Toolchain file for Linux-arm64 (aarch64) systems. # ReFuel Toolchain file for Linux-arm64 (aarch64) systems.
# Copyright (C) 2023 # Copyright (C) 2023
set(CMAKE_SYSTEM_NAME Linux) set(CMAKE_SYSTEM_NAME Linux)

@ -1,4 +1,4 @@
# QUIK Toolchain file for Linux-x64 (amd64) systems. # ReFuel Toolchain file for Linux-x64 (amd64) systems.
# Copyright (C) 2023 # Copyright (C) 2023
set(CMAKE_SYSTEM_NAME Linux) set(CMAKE_SYSTEM_NAME Linux)

@ -1,4 +1,4 @@
# QUIK Toolchain file for Linux-x86 (i386) systems. # ReFuel Toolchain file for Linux-x86 (i386) systems.
# Copyright (C) 2023 # Copyright (C) 2023
set(CMAKE_SYSTEM_NAME Linux) set(CMAKE_SYSTEM_NAME Linux)

@ -1,4 +1,4 @@
# QUIK Toolchain file for OSX-ARM64 systems. # ReFuel Toolchain file for OSX-ARM64 systems.
# Copyright (C) 2024 # Copyright (C) 2024
set(CMAKE_SYSTEM_NAME OSX) set(CMAKE_SYSTEM_NAME OSX)

@ -1,4 +1,4 @@
# QUIK Toolchain file for OSX-ARM64 systems. # ReFuel Toolchain file for OSX-ARM64 systems.
# Copyright (C) 2024 # Copyright (C) 2024
set(CMAKE_SYSTEM_NAME OSX) set(CMAKE_SYSTEM_NAME OSX)

@ -1,4 +1,4 @@
# QUIK Toolchain file for Windows-x64 systems. # ReFuel Toolchain file for Windows-x64 systems.
# Copyright (C) 2023 # Copyright (C) 2023
set(CMAKE_SYSTEM_NAME Windows) set(CMAKE_SYSTEM_NAME Windows)

@ -1,4 +1,4 @@
# QUIK Toolchain file for Windows-x86 systems. # ReFuel Toolchain file for Windows-x86 systems.
# Copyright (C) 2023 # Copyright (C) 2023
set(CMAKE_SYSTEM_NAME Windows) set(CMAKE_SYSTEM_NAME Windows)

@ -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

54
include/rf_common.h Normal file

@ -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

@ -1,5 +1,5 @@
source $HOME/src/sh/init.sh source $HOME/src/sh/init.sh
echo QUIK Project Copyright \(C\) 2023 echo ReFuel Project - Copyright \(C\) 2023
echo 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. echo SuperUser \(su/sudo\) commands are enabled without a password. Beware.

@ -26,7 +26,7 @@ fi
if [ -z "$CMAKE_DIR"] if [ -z "$CMAKE_DIR"]
then then
CMAKE_DIR="$SRC/Quik.Common/cmake" CMAKE_DIR="$SRC/docker-cross-compiler/cmake"
fi fi
for ARCH in $ARCHS; do for ARCH in $ARCHS; do

@ -4,15 +4,27 @@ then
$1 = $(dirname "$0") $1 = $(dirname "$0")
fi fi
if [ -z "$QUIK_API_KEY" ] if [ -z "$NUGET_API_KEY" ]
then then
echo "Please define QUIK_API_KEY" echo "Please define QUIK_API_KEY"
exit 1 exit 1
fi 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 cd $1
dotnet nuget add source \ 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 \ --store-password-in-clear-text \
https://git.mixedup.dev/api/packages/QUIK/nuget/index.json "$NUGET_INDEX"
dotnet nuget push -s QUIK bin/*/*.nupkg dotnet nuget push -s ReFuel bin/*/*.nupkg