From ad229dabdb6b052a5ae4c2f6cf98d392922915e8 Mon Sep 17 00:00:00 2001 From: bicarus-dev <202771338+bicarus-dev@users.noreply.github.com> Date: Mon, 27 Oct 2025 23:00:32 -0700 Subject: [PATCH] update build script (#407) ## Link to GitHub Issue, if one exists n/a ## Description of change Create a "full" version of the archive with api and extra binaries. The normal archive remains in place with just src and stubs. --- src/spice2x/build_all.sh | 13 ++++--------- src/spice2x/launcher/launcher.cpp | 4 ++++ src/spice2x/overlay/windows/config.cpp | 14 ++++++++++++-- 3 files changed, 20 insertions(+), 11 deletions(-) diff --git a/src/spice2x/build_all.sh b/src/spice2x/build_all.sh index 21f16c9..8ae9d28 100755 --- a/src/spice2x/build_all.sh +++ b/src/spice2x/build_all.sh @@ -49,7 +49,7 @@ BUILDDIR_64_RELEASE="./cmake-build-release-64" BUILDDIR_64_DEBUG="./cmake-build-debug-64" DEBUG=0 OUTDIR="./bin/spice2x" -OUTDIR_EXTRAS="./bin/spice2x_extras" +OUTDIR_EXTRAS="./bin/spice2x/extras" # disabled UPX since it tends to falsely trigger malware detection UPX_ENABLE=0 @@ -60,8 +60,8 @@ INCLUDE_SRC=1 DIST_ENABLE=1 DIST_FOLDER="./dist" DIST_NAME="spice2x-$(date +%y)-$(date +%m)-$(date +%d).zip" +DIST_NAME_EXTRAS="spice2x-$(date +%y)-$(date +%m)-$(date +%d)-full.zip" DIST_COMMENT=${DIST_NAME}$'\n'"$GIT_BRANCH - $GIT_HEAD"$'\nThank you for playing.' -DIST_NAME_EXTRAS="spice2x-$(date +%y)-$(date +%m)-$(date +%d)-extras.zip" TARGETS_32="spicetools_stubs_kbt spicetools_stubs_kld spicetools_cfg spicetools_cfg_linux spicetools_spice spicetools_spice_laa spicetools_spice_linux spicetools_stubs_cpusbxpkm" TARGETS_64="spicetools_stubs_kbt64 spicetools_stubs_kld64 spicetools_stubs_nvEncodeAPI64 spicetools_stubs_nvcuvid spicetools_stubs_nvcuda spicetools_spice64 spicetools_spice64_linux" @@ -231,14 +231,11 @@ fi # pack source files to output directory rm -rf ${OUTDIR}/src mkdir -p ${OUTDIR}/src -rm -rf ${OUTDIR_EXTRAS}/src -mkdir -p ${OUTDIR_EXTRAS}/src if ((INCLUDE_SRC > 0)) then echo "Generating source file archive..." git archive --format tar.gz --prefix=spice2x/ HEAD ./ > ${OUTDIR}/src/spice2x-${GIT_BRANCH}.tar.gz 2>/dev/null || \ echo "WARNING: Couldn't get git to create the archive. Is this a git repository?" - cp -r ${OUTDIR}/src/* ${OUTDIR_EXTRAS}/src fi # copy resources @@ -254,11 +251,9 @@ then mkdir -p ${DIST_FOLDER} rm -rf ${DIST_FOLDER}/${DIST_NAME} pushd ${OUTDIR}/.. > /dev/null - zip -qrXT9 $OLDPWD/${DIST_FOLDER}/${DIST_NAME} spice2x -z <<< "$DIST_COMMENT" - popd > /dev/null + zip -qrXT9 $OLDPWD/${DIST_FOLDER}/${DIST_NAME} spice2x -x "spice2x/extras/*" -z <<< "$DIST_COMMENT" echo "Building extras..." - pushd ${OUTDIR_EXTRAS}/.. > /dev/null - zip -qrXT9 $OLDPWD/${DIST_FOLDER}/${DIST_NAME_EXTRAS} spice2x_extras -z <<< "$DIST_COMMENT" + zip -qrXT9 $OLDPWD/${DIST_FOLDER}/${DIST_NAME_EXTRAS} spice2x -z <<< "$DIST_COMMENT" popd > /dev/null fi diff --git a/src/spice2x/launcher/launcher.cpp b/src/spice2x/launcher/launcher.cpp index 952d1f6..2935439 100644 --- a/src/spice2x/launcher/launcher.cpp +++ b/src/spice2x/launcher/launcher.cpp @@ -1226,6 +1226,10 @@ int main_implementation(int argc, char *argv[]) { log_info("launcher", "{}", VERSION_STRING); + // note: distribution of modified version of this software without providing source is GPLv3 license violation. + log_info("launcher", "spice2x is free & open source; if you paid money for it, you got scammed"); + log_info("launcher", "visit https://spice2x.github.io to download the latest version for free"); + // log command line arguments std::ostringstream arguments; for (auto &root_option : options) { diff --git a/src/spice2x/overlay/windows/config.cpp b/src/spice2x/overlay/windows/config.cpp index 9b874f5..91be1cf 100644 --- a/src/spice2x/overlay/windows/config.cpp +++ b/src/spice2x/overlay/windows/config.cpp @@ -556,9 +556,16 @@ namespace overlay::windows { } // disclaimer + // note: distribution of modified version of this software without providing source is GPLv3 license violation. ImGui::TextColored( ImVec4(1, 0.5f, 0.5f, 1.f), - "Do NOT stream or upload game data anywhere public! Support arcades when you can. Thanks."); + "spice2x is free & open source; if you paid money for it, you got scammed."); + if (cfg::CONFIGURATOR_STANDALONE) { + ImGui::SameLine(); + if (ImGui::TextLink(PROJECT_URL)) { + launch_shell(PROJECT_URL); + } + } } void Config::build_buttons(const std::string &name, std::vector