From f7be9e7a4c3dfbb393de59e0e23edb10af670a7b Mon Sep 17 00:00:00 2001 From: Dan Rosser Date: Mon, 13 Jan 2025 22:50:14 +1100 Subject: [PATCH 1/2] chmod fixes windows --- .gitattributes | 19 +++++++++++++++++++ scripts/vs/build_cmdline.sh | 22 ---------------------- scripts/vs/build_frontend.sh | 4 +++- scripts/vs/ci_cmd_package.sh | 1 + scripts/vs/ci_frontend_package.sh | 6 +++--- 5 files changed, 26 insertions(+), 26 deletions(-) diff --git a/.gitattributes b/.gitattributes index 176a458f..c9c3be9a 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1 +1,20 @@ * text=auto +# Explicitly declare text files to normalize +*.cpp text +*.h text +*.mm text + +# Files with CRLF line endings for Windows +*.sln text eol=crlf +*.vcxproj* text eol=crlf +.appveyor.yml text eol=crlf +*.bat text eol=crlf +*.props text eol=crlf +*.filters text eol=crlf + +# Files with LF line endings for Unix-like systems +*.sh text eol=lf + +# Binary files (no EOL normalization) +*.png binary +*.jpg binary \ No newline at end of file diff --git a/scripts/vs/build_cmdline.sh b/scripts/vs/build_cmdline.sh index 36c8ae46..c3036d06 100755 --- a/scripts/vs/build_cmdline.sh +++ b/scripts/vs/build_cmdline.sh @@ -6,56 +6,34 @@ PG_DIR="$( cd "$( dirname "${SCRIPT_DIR}/../../" )" && pwd )" OF_DIR="$( cd "$( dirname "${PG_DIR}/../../../" )" && pwd )" - echo "CURRENT_DIR: ${CURRENT_DIR}" echo "SCRIPT_DIR: ${SCRIPT_DIR}" echo "PG_DIR: ${PG_DIR}" echo "====== OF_DIR: ${OF_DIR}" - -echo "====== " -# Compile commandline tool cd ${PG_DIR} cd commandLine - echo "Building openFrameworks commandLine PG - VS" - if [ -z "${PLATFORM+x}" ]; then PLATFORM=x64 fi - if [ -z "${TOOLSET+x}" ]; then TOOLSET=v143 fi - if [ -z "${CONFIGURATION+x}" ]; then CONFIGURATION=${CONFIGURATION:-Release} fi - - -pwd -ls - - - CURRENT="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" - - -# Check if msbuild is available in PATH if command -v msbuild &> /dev/null; then echo "msbuild is available, use it directly" msbuild "commandLine.vcxproj" //p:configuration=${CONFIGURATION} //p:platform=${PLATFORM} //p:PlatformToolset=${TOOLSET} else echo "msbuild is not available, use the specified path" - #VS_BASE_PATH="/c/Program Files/Microsoft Visual Studio/2022/Community" - #MSBUILD_PATH="${VS_BASE_PATH}/MSBuild/Current/Bin/MSBuild.exe" - MSBUILD_PATH="C:\\Program Files\\Microsoft Visual Studio\\2022\\Community\\MSBuild\\Current\\Bin\\MSBuild.exe" MSSTRING="//p:configuration=${CONFIGURATION} //p:platform=${PLATFORM} //p:PlatformToolset=${TOOLSET}" "${MSBUILD_PATH}" commandLine.sln ${MSSTRING} - fi ret=$? diff --git a/scripts/vs/build_frontend.sh b/scripts/vs/build_frontend.sh index 856e7d7a..65316d4a 100755 --- a/scripts/vs/build_frontend.sh +++ b/scripts/vs/build_frontend.sh @@ -36,6 +36,7 @@ if [ -f "$SOURCE_FILE" ]; then cp "$SOURCE_FILE" "$DESTINATION_PATH/projectGenerator.exe" . "${SCRIPT_DIR}/secure.sh" secure "$DESTINATION_PATH/projectGenerator.exe" projectGenerator.pkl + chmod +x $DESTINATION_PATH/projectGenerator.exe echo "projectGenerator.exe File copied successfully." else # File does not exist @@ -52,7 +53,8 @@ npm run echo "====== run" . "${SCRIPT_DIR}/secure.sh" -secure "${_DIR}/projectGenerator.exe" projectGenerator.pkl +secure "${DESTINATION_PATH}/projectGenerator.exe" projectGenerator.pkl +chmod +x $DESTINATION_PATH/projectGenerator.exe # if [ "${BUILD_TEST}" == 1 ]; then npm run start:prod diff --git a/scripts/vs/ci_cmd_package.sh b/scripts/vs/ci_cmd_package.sh index 1bdc4d1c..d30851d2 100755 --- a/scripts/vs/ci_cmd_package.sh +++ b/scripts/vs/ci_cmd_package.sh @@ -37,6 +37,7 @@ if [ -f "$SOURCE_FILE" ]; then cp "$SOURCE_FILE" "$DESTINATION_PATH/projectGenerator.exe" . "${SCRIPT_DIR}/secure.sh" secure "$DESTINATION_PATH/projectGenerator.exe" projectGenerator.pkl + chmod +x $DESTINATION_PATH/projectGenerator.exe echo "projectGenerator.exe File copied successfully." else # File does not exist diff --git a/scripts/vs/ci_frontend_package.sh b/scripts/vs/ci_frontend_package.sh index bb4cda52..7694f3a9 100755 --- a/scripts/vs/ci_frontend_package.sh +++ b/scripts/vs/ci_frontend_package.sh @@ -21,11 +21,11 @@ if [ -d "win-unpacked" ]; then cd "win-unpacked" - _DIR=$(pwd) + DIR=$(pwd) . "${SCRIPT_DIR}/secure.sh" - secure "{_DIR}/projectGenerator.exe" projectGenerator.pkl - + secure "${DIR}/projectGenerator.exe" projectGenerator.pkl + chmod +x ${DIR}/projectGenerator.exe zip -r "../projectGenerator-vs-gui.zip" "." pwd ls From 88dde80c5b7410713960e8f37a0d0a415b168770 Mon Sep 17 00:00:00 2001 From: Dan Rosser Date: Mon, 13 Jan 2025 22:59:12 +1100 Subject: [PATCH 2/2] Set executable permissions for all .sh files --- scripts/vs/build_dev_frontend.sh | 0 1 file changed, 0 insertions(+), 0 deletions(-) mode change 100644 => 100755 scripts/vs/build_dev_frontend.sh diff --git a/scripts/vs/build_dev_frontend.sh b/scripts/vs/build_dev_frontend.sh old mode 100644 new mode 100755