diff --git a/clean b/clean index bdab41a479..5f34ddd977 100755 --- a/clean +++ b/clean @@ -1,5 +1,5 @@ #!/bin/sh -appDir="$(cd "$(dirname "$0")"; pwd)" +crtDir="$(cd "$(dirname "$0")"; pwd)" -${appDir}/scripts/genericclean +${crtDir}/scripts/genericclean diff --git a/clean.bat b/clean.bat index 64112fe556..0cef7e37ec 100644 --- a/clean.bat +++ b/clean.bat @@ -1,5 +1,5 @@ @ECHO OFF -SET AppDir=%~dp0 +SET CrtDir=%~dp0 -CALL "%AppDir%scripts\genericclean" +CALL "%CrtDir%scripts\genericclean" diff --git a/cleanall b/cleanall index 999f4dd89c..0bf9dc3e7f 100755 --- a/cleanall +++ b/cleanall @@ -1,5 +1,5 @@ #!/bin/sh -appDir="$(cd "$(dirname "$0")"; pwd)" +crtDir="$(cd "$(dirname "$0")"; pwd)" -${appDir}/scripts/genericclean all +${crtDir}/scripts/genericclean all diff --git a/cleanall.bat b/cleanall.bat index fdf6bc73a3..f16661d36e 100644 --- a/cleanall.bat +++ b/cleanall.bat @@ -1,5 +1,5 @@ @ECHO OFF -SET AppDir=%~dp0 +SET CrtDir=%~dp0 -CALL "%AppDir%scripts\genericclean" all +CALL "%CrtDir%scripts\genericclean" all diff --git a/distrib/linux/application.in b/distrib/linux/application.in index fb81bfbccf..3b62275e6f 100755 --- a/distrib/linux/application.in +++ b/distrib/linux/application.in @@ -1,5 +1,5 @@ #!/bin/sh -appDir="$(cd "$(dirname "$0")"; pwd)" +crtDir="$(cd "$(dirname "$0")"; pwd)" -"${appDir}/bin/@CMAKE_PROJECT_NAME@" $* +"${crtDir}/bin/@CMAKE_PROJECT_NAME@" $* diff --git a/distrib/linux/jupyterconsole.in b/distrib/linux/jupyterconsole.in index d690acbfab..3b7a35d9bc 100755 --- a/distrib/linux/jupyterconsole.in +++ b/distrib/linux/jupyterconsole.in @@ -1,5 +1,5 @@ #!/bin/sh -appDir="$(cd "$(dirname "$0")"; pwd)" +crtDir="$(cd "$(dirname "$0")"; pwd)" -"${appDir}/runjupyter" console --kernel @CMAKE_PROJECT_NAME@ $* +"${crtDir}/runjupyter" console --kernel @CMAKE_PROJECT_NAME@ $* diff --git a/distrib/linux/jupyterlab b/distrib/linux/jupyterlab index 107abe3752..ee3dc367d5 100755 --- a/distrib/linux/jupyterlab +++ b/distrib/linux/jupyterlab @@ -1,5 +1,5 @@ #!/bin/sh -appDir="$(cd "$(dirname "$0")"; pwd)" +crtDir="$(cd "$(dirname "$0")"; pwd)" -"${appDir}/runjupyter" lab --ip 127.0.0.1 $* +"${crtDir}/runjupyter" lab --ip 127.0.0.1 $* diff --git a/distrib/linux/jupyternotebook b/distrib/linux/jupyternotebook index 4214a9e49c..0c7bb9e6e9 100755 --- a/distrib/linux/jupyternotebook +++ b/distrib/linux/jupyternotebook @@ -1,5 +1,5 @@ #!/bin/sh -appDir="$(cd "$(dirname "$0")"; pwd)" +crtDir="$(cd "$(dirname "$0")"; pwd)" -"${appDir}/runjupyter" notebook --ip 127.0.0.1 $* +"${crtDir}/runjupyter" notebook --ip 127.0.0.1 $* diff --git a/distrib/linux/pythonshell.in b/distrib/linux/pythonshell.in index 61c1611018..60042198c6 100755 --- a/distrib/linux/pythonshell.in +++ b/distrib/linux/pythonshell.in @@ -1,5 +1,5 @@ #!/bin/sh -appDir="$(cd "$(dirname "$0")"; pwd)" +crtDir="$(cd "$(dirname "$0")"; pwd)" -"${appDir}/bin/@CMAKE_PROJECT_NAME@" -c PythonShell $* +"${crtDir}/bin/@CMAKE_PROJECT_NAME@" -c PythonShell $* diff --git a/distrib/linux/runjupyter b/distrib/linux/runjupyter index 6073e2f504..e547fa3892 100755 --- a/distrib/linux/runjupyter +++ b/distrib/linux/runjupyter @@ -1,9 +1,9 @@ #!/bin/sh -appDir="$(cd "$(dirname "$0")"; pwd)" +crtDir="$(cd "$(dirname "$0")"; pwd)" -export PATH="${appDir}/bin":$PATH +export PATH="${crtDir}/bin":$PATH -"${appDir}/python/bin/python" "${appDir}/python/bin/set_python_path.py" "${appDir}/python" -s +"${crtDir}/python/bin/python" "${crtDir}/python/bin/set_python_path.py" "${crtDir}/python" -s -"${appDir}/python/bin/jupyter" $* +"${crtDir}/python/bin/jupyter" $* diff --git a/distrib/macos/application.in b/distrib/macos/application.in index 4729ab4d7b..9a4af42bef 100755 --- a/distrib/macos/application.in +++ b/distrib/macos/application.in @@ -1,5 +1,5 @@ #!/bin/sh -appDir="$(cd "$(dirname "$0")"; pwd)" +crtDir="$(cd "$(dirname "$0")"; pwd)" -"${appDir}/@CMAKE_PROJECT_NAME@.app/Contents/MacOS/@CMAKE_PROJECT_NAME@" $* +"${crtDir}/@CMAKE_PROJECT_NAME@.app/Contents/MacOS/@CMAKE_PROJECT_NAME@" $* diff --git a/distrib/macos/jupyterconsole.in b/distrib/macos/jupyterconsole.in index 5aaf750c75..b2d6f229dc 100755 --- a/distrib/macos/jupyterconsole.in +++ b/distrib/macos/jupyterconsole.in @@ -1,5 +1,5 @@ #!/bin/sh -appDir="$(cd "$(dirname "$0")"; pwd)" +crtDir="$(cd "$(dirname "$0")"; pwd)" -"${appDir}/@CMAKE_PROJECT_NAME@.app/Contents/Frameworks/Python/bin/runjupyter" console --kernel @CMAKE_PROJECT_NAME@ $* +"${crtDir}/@CMAKE_PROJECT_NAME@.app/Contents/Frameworks/Python/bin/runjupyter" console --kernel @CMAKE_PROJECT_NAME@ $* diff --git a/distrib/macos/jupyterlab.in b/distrib/macos/jupyterlab.in index d2f5100cef..bc555181b9 100755 --- a/distrib/macos/jupyterlab.in +++ b/distrib/macos/jupyterlab.in @@ -1,5 +1,5 @@ #!/bin/sh -appDir="$(cd "$(dirname "$0")"; pwd)" +crtDir="$(cd "$(dirname "$0")"; pwd)" -"${appDir}/@CMAKE_PROJECT_NAME@.app/Contents/Frameworks/Python/bin/runjupyter" lab --ip 127.0.0.1 $* +"${crtDir}/@CMAKE_PROJECT_NAME@.app/Contents/Frameworks/Python/bin/runjupyter" lab --ip 127.0.0.1 $* diff --git a/distrib/macos/jupyternotebook.in b/distrib/macos/jupyternotebook.in index 0403b014f0..a37687fb4f 100755 --- a/distrib/macos/jupyternotebook.in +++ b/distrib/macos/jupyternotebook.in @@ -1,5 +1,5 @@ #!/bin/sh -appDir="$(cd "$(dirname "$0")"; pwd)" +crtDir="$(cd "$(dirname "$0")"; pwd)" -"${appDir}/@CMAKE_PROJECT_NAME@.app/Contents/Frameworks/Python/bin/runjupyter" notebook --ip 127.0.0.1 $* +"${crtDir}/@CMAKE_PROJECT_NAME@.app/Contents/Frameworks/Python/bin/runjupyter" notebook --ip 127.0.0.1 $* diff --git a/distrib/macos/pythonshell.in b/distrib/macos/pythonshell.in index 63d991b45f..98b8d8ab19 100755 --- a/distrib/macos/pythonshell.in +++ b/distrib/macos/pythonshell.in @@ -1,5 +1,5 @@ #!/bin/sh -appDir="$(cd "$(dirname "$0")"; pwd)" +crtDir="$(cd "$(dirname "$0")"; pwd)" -"${appDir}/@CMAKE_PROJECT_NAME@.app/Contents/MacOS/@CMAKE_PROJECT_NAME@" -c PythonShell $* +"${crtDir}/@CMAKE_PROJECT_NAME@.app/Contents/MacOS/@CMAKE_PROJECT_NAME@" -c PythonShell $* diff --git a/distrib/macos/runjupyter b/distrib/macos/runjupyter index 409c43abc8..624949c660 100755 --- a/distrib/macos/runjupyter +++ b/distrib/macos/runjupyter @@ -1,9 +1,9 @@ #!/bin/sh -pythonBinDir="$(cd "$(dirname "$0")"; pwd)" +crtDir="$(cd "$(dirname "$0")"; pwd)" -export PATH=${pythonBinDir}/../../../MacOS:$PATH +export PATH=${crtDir}/../../../MacOS:$PATH -"${pythonBinDir}/python" "${pythonBinDir}/set_python_path.py" "${pythonBinDir}/.." -s +"${crtDir}/python" "${crtDir}/set_python_path.py" "${crtDir}/.." -s -"${pythonBinDir}/jupyter" $* +"${crtDir}/jupyter" $* diff --git a/distrib/windows/jupyterconsole.bat.in b/distrib/windows/jupyterconsole.bat.in index c9747a3391..fecd2210d6 100644 --- a/distrib/windows/jupyterconsole.bat.in +++ b/distrib/windows/jupyterconsole.bat.in @@ -2,6 +2,6 @@ TITLE Running the Jupyter Lab environment... -SET appDir=%~dp0 +SET CrtDir=%~dp0 -CALL "%appDir%runjupyter.bat" console --kernel ${CMAKE_PROJECT_NAME} %* +CALL "%CrtDir%runjupyter.bat" console --kernel ${CMAKE_PROJECT_NAME} %* diff --git a/distrib/windows/jupyterlab.bat b/distrib/windows/jupyterlab.bat index 58a52ccebf..ba996b1f2e 100644 --- a/distrib/windows/jupyterlab.bat +++ b/distrib/windows/jupyterlab.bat @@ -2,6 +2,6 @@ TITLE Running the Jupyter Lab environment... -SET appDir=%~dp0 +SET CrtDir=%~dp0 -CALL "%appDir%runjupyter.bat" lab --ip 127.0.0.1 %* +CALL "%CrtDir%runjupyter.bat" lab --ip 127.0.0.1 %* diff --git a/distrib/windows/jupyterlab.vbs b/distrib/windows/jupyterlab.vbs index c706cbfc10..4ba075f333 100644 --- a/distrib/windows/jupyterlab.vbs +++ b/distrib/windows/jupyterlab.vbs @@ -1,10 +1,10 @@ shell = CreateObject("WScript.Shell") -appDir = CreateObject("Scripting.FileSystemObject").GetParentFolderName(WScript.ScriptFullName) +crtDir = CreateObject("Scripting.FileSystemObject").GetParentFolderName(WScript.ScriptFullName) -updatePythonPath = """"&appDir&"\Python\bin\Python.exe"" """&appDir&"\Python\Scripts\set_python_path.py"" """&appDir&"\Python"" -s" +updatePythonPath = """"&crtDir&"\Python\bin\Python.exe"" """&crtDir&"\Python\Scripts\set_python_path.py"" """&crtDir&"\Python"" -s" shell.Run updatePythonPath, 0, True -cmd = """"&appDir&"\Python\bin\Python.exe"" """&appDir&"\Python\Scripts\start_jupyter.py"" lab --ip 127.0.0.1" +cmd = """"&crtDir&"\Python\bin\Python.exe"" """&crtDir&"\Python\Scripts\start_jupyter.py"" lab --ip 127.0.0.1" shell.Run cmd, 1, False diff --git a/distrib/windows/jupyternotebook.bat b/distrib/windows/jupyternotebook.bat index ed19c0f0dd..f5d585fc78 100644 --- a/distrib/windows/jupyternotebook.bat +++ b/distrib/windows/jupyternotebook.bat @@ -2,6 +2,6 @@ TITLE Running the Jupyter Notebook environment... -SET appDir=%~dp0 +SET CrtDir=%~dp0 -CALL "%appDir%runjupyter.bat" notebook --ip 127.0.0.1 %* +CALL "%CrtDir%runjupyter.bat" notebook --ip 127.0.0.1 %* diff --git a/distrib/windows/jupyternotebook.vbs b/distrib/windows/jupyternotebook.vbs index 7d5de85384..52a5930f7e 100644 --- a/distrib/windows/jupyternotebook.vbs +++ b/distrib/windows/jupyternotebook.vbs @@ -1,10 +1,10 @@ shell = CreateObject("WScript.Shell") -appDir = CreateObject("Scripting.FileSystemObject").GetParentFolderName(WScript.ScriptFullName) +crtDir = CreateObject("Scripting.FileSystemObject").GetParentFolderName(WScript.ScriptFullName) -updatePythonPath = """"&appDir&"\Python\bin\Python.exe"" """&appDir&"\Python\Scripts\set_python_path.py"" """&appDir&"\Python"" -s" +updatePythonPath = """"&crtDir&"\Python\bin\Python.exe"" """&crtDir&"\Python\Scripts\set_python_path.py"" """&crtDir&"\Python"" -s" shell.Run updatePythonPath, 0, True -cmd = """"&appDir&"\Python\bin\Python.exe"" """&appDir&"\Python\Scripts\start_jupyter.py"" notebook --ip 127.0.0.1" +cmd = """"&crtDir&"\Python\bin\Python.exe"" """&crtDir&"\Python\Scripts\start_jupyter.py"" notebook --ip 127.0.0.1" shell.Run cmd, 1, False diff --git a/distrib/windows/pythonshell.bat.in b/distrib/windows/pythonshell.bat.in index 7b4387848a..8a2859b680 100644 --- a/distrib/windows/pythonshell.bat.in +++ b/distrib/windows/pythonshell.bat.in @@ -1,5 +1,5 @@ @ECHO OFF -SET appDir=%~dp0 +SET CrtDir=%~dp0 -"%appDir%bin\${CMAKE_PROJECT_NAME}" -c PythonShell %* +"%CrtDir%bin\${CMAKE_PROJECT_NAME}" -c PythonShell %* diff --git a/distrib/windows/runjupyter.bat b/distrib/windows/runjupyter.bat index 42c1bb5f71..2c9e0ef4b1 100644 --- a/distrib/windows/runjupyter.bat +++ b/distrib/windows/runjupyter.bat @@ -2,8 +2,8 @@ TITLE Running the Jupyter environment... -SET appDir=%~dp0 +SET CrtDir=%~dp0 -"%appDir%Python\bin\Python.exe" "%appDir%Python\Scripts\set_python_path.py" "%appDir%Python" -s +"%CrtDir%Python\bin\Python.exe" "%CrtDir%Python\Scripts\set_python_path.py" "%CrtDir%Python" -s -"%appDir%Python\bin\Python.exe" "%appDir%Python\Scripts\start_jupyter.py" %* +"%CrtDir%Python\bin\Python.exe" "%CrtDir%Python\Scripts\start_jupyter.py" %* diff --git a/format b/format index f52d960560..cc4f331238 100755 --- a/format +++ b/format @@ -1,12 +1,12 @@ #!/bin/sh -appDir="$(cd "$(dirname "$0")"; pwd)" +crtDir="$(cd "$(dirname "$0")"; pwd)" -if [ -d "${appDir}/src" ]; then +if [ -d "${crtDir}/src" ]; then echo "\033[44;37;1mFormatting OpenCOR...\033[0m" if [ "`hash clang-format 2>&1`" = "" ]; then - for i in `find ${appDir}/src -name "*.cpp" -o -name "*.h" | sort | egrep -v "(3rdparty|\/ext\/|\/qzip)"`; do + for i in `find ${crtDir}/src -name "*.cpp" -o -name "*.h" | sort | egrep -v "(3rdparty|\/ext\/|\/qzip)"`; do echo "Formatting $i..." clang-format -i -style=file $i diff --git a/format.bat b/format.bat index 8da7f81bef..eb96134294 100644 --- a/format.bat +++ b/format.bat @@ -1,9 +1,9 @@ @ECHO OFF -SET AppDir=%~dp0 +SET CrtDir=%~dp0 SET OrigDir=%CD% -IF EXIST "%AppDir%src" ( +IF EXIST "%CrtDir%src" ( TITLE Formatting OpenCOR... FOR %%X IN (clang-format.exe) DO ( @@ -11,7 +11,7 @@ IF EXIST "%AppDir%src" ( ) IF DEFINED ClangFormatFound ( - CD "%AppDir%src" + CD "%CrtDir%src" FOR /R %%I IN (*.cpp *.h) DO ( ECHO.%%I | FINDSTR /V "3rdparty \ext\ \qzip">NUL && ( diff --git a/make b/make index 4de8be2380..01bd9ae4e7 100755 --- a/make +++ b/make @@ -1,5 +1,5 @@ #!/bin/sh -appDir="$(cd "$(dirname "$0")"; pwd)" +crtDir="$(cd "$(dirname "$0")"; pwd)" -${appDir}/scripts/genericmake Release $* +${crtDir}/scripts/genericmake Release $* diff --git a/make.bat b/make.bat index 456e47be5d..196582f27e 100644 --- a/make.bat +++ b/make.bat @@ -1,5 +1,5 @@ @ECHO OFF -SET AppDir=%~dp0 +SET CrtDir=%~dp0 -CALL "%AppDir%scripts\genericmake" Release %* +CALL "%CrtDir%scripts\genericmake" Release %* diff --git a/maketests b/maketests index a530fc0ac8..8bd5f5fc59 100755 --- a/maketests +++ b/maketests @@ -1,5 +1,5 @@ #!/bin/sh -appDir="$(cd "$(dirname "$0")"; pwd)" +crtDir="$(cd "$(dirname "$0")"; pwd)" -${appDir}/scripts/genericmake Tests $* +${crtDir}/scripts/genericmake Tests $* diff --git a/maketests.bat b/maketests.bat index f2290ee63d..09a24dfc18 100644 --- a/maketests.bat +++ b/maketests.bat @@ -1,5 +1,5 @@ @ECHO OFF -SET AppDir=%~dp0 +SET CrtDir=%~dp0 -CALL "%AppDir%scripts\genericmake" Tests %* +CALL "%CrtDir%scripts\genericmake" Tests %* diff --git a/package b/package index 2693420781..372235be5e 100755 --- a/package +++ b/package @@ -1,9 +1,9 @@ #!/bin/sh -appDir="$(cd "$(dirname "$0")"; pwd)" +crtDir="$(cd "$(dirname "$0")"; pwd)" -${appDir}/clean -${appDir}/make $* +${crtDir}/clean +${crtDir}/make $* exitCode=$? @@ -15,7 +15,7 @@ echo "\033[44;37;1mPackaging OpenCOR...\033[0m" origDir=`pwd` -cd ${appDir}/build +cd ${crtDir}/build if [ "`uname -s`" = "Linux" ]; then cpack diff --git a/package.bat b/package.bat index 71a13779f3..ee2ce3a867 100644 --- a/package.bat +++ b/package.bat @@ -2,10 +2,10 @@ SETLOCAL ENABLEDELAYEDEXPANSION -SET AppDir=%~dp0 +SET CrtDir=%~dp0 -CALL "%AppDir%clean" -CALL "%AppDir%make" %* +CALL "%CrtDir%clean" +CALL "%CrtDir%make" %* SET ExitCode=!ERRORLEVEL! @@ -14,7 +14,7 @@ IF !ExitCode! EQU 0 ( SET OrigDir=%CD% - CD "%AppDir%build" + CD "%CrtDir%build" cpack diff --git a/run b/run index 8f30df6017..dddfa9ea5a 100755 --- a/run +++ b/run @@ -2,12 +2,12 @@ echo "\033[44;37;1mRunning OpenCOR...\033[0m" -appDir="$(cd "$(dirname "$0")"; pwd)" +crtDir="$(cd "$(dirname "$0")"; pwd)" if [ "`uname -s`" = "Linux" ]; then - appExe=${appDir}/build/bin/OpenCOR + appExe=${crtDir}/build/bin/OpenCOR else - appExe=${appDir}/build/OpenCOR.app/Contents/MacOS/OpenCOR + appExe=${crtDir}/build/OpenCOR.app/Contents/MacOS/OpenCOR fi if [ -f ${appExe} ]; then diff --git a/run.vbs b/run.vbs index 631c165c82..5b2935f26e 100644 --- a/run.vbs +++ b/run.vbs @@ -1,13 +1,13 @@ -appExe = Left(Wscript.ScriptFullName, Len(Wscript.ScriptFullName)-Len(Wscript.ScriptName))&"build\bin\OpenCOR.exe" +AppExe = Left(Wscript.ScriptFullName, Len(Wscript.ScriptFullName)-Len(Wscript.ScriptName))&"build\bin\OpenCOR.exe" -If CreateObject("Scripting.FileSystemObject").FileExists(appExe) Then +If CreateObject("Scripting.FileSystemObject").FileExists(AppExe) Then args = "" For Each arg in WScript.Arguments args = args&" "&arg Next - cmd = """"&appExe&args&"""" + cmd = """"&AppExe&args&"""" CreateObject("WScript.Shell").Run cmd, 1, False Else diff --git a/runtests b/runtests index 52b42f93a2..34ce6057aa 100755 --- a/runtests +++ b/runtests @@ -2,12 +2,12 @@ echo "\033[44;37;1mRunning OpenCOR's tests...\033[0m" -appDir="$(cd "$(dirname "$0")"; pwd)" +crtDir="$(cd "$(dirname "$0")"; pwd)" if [ "`uname -s`" = "Linux" ]; then - OPENCOR_TESTS_EXE=${appDir}/build/bin/runtests + OPENCOR_TESTS_EXE=${crtDir}/build/bin/runtests else - OPENCOR_TESTS_EXE=${appDir}/build/OpenCOR.app/Contents/MacOS/runtests + OPENCOR_TESTS_EXE=${crtDir}/build/OpenCOR.app/Contents/MacOS/runtests fi if [ -f ${OPENCOR_TESTS_EXE} ]; then diff --git a/runtests.bat b/runtests.bat index fef0f9e33b..b929e06204 100644 --- a/runtests.bat +++ b/runtests.bat @@ -2,10 +2,10 @@ TITLE Running OpenCOR's tests... -SET appTestsExe=%~dp0build\bin\runtests.exe +SET AppTestsExe=%~dp0build\bin\runtests.exe -IF NOT EXIST %appTestsExe% ( +IF NOT EXIST %AppTestsExe% ( ECHO OpenCOR's tests must first be built before being run. ) ELSE ( - "%appTestsExe%" + "%AppTestsExe%" ) diff --git a/scripts/genericclean b/scripts/genericclean index c756b28364..9b1d819f6f 100755 --- a/scripts/genericclean +++ b/scripts/genericclean @@ -6,12 +6,12 @@ else echo "\033[44;37;1mCleaning OpenCOR...\033[0m" fi -appDir="$(cd "$(dirname "$0")"; pwd)"/.. +crtDir="$(cd "$(dirname "$0")"; pwd)" -rm -fr ${appDir}/build/.clang-tidy ${appDir}/build/.ninja* ${appDir}/build/* > /dev/null 2>&1 +rm -fr ${crtDir}/../build/.clang-tidy ${crtDir}/../build/.ninja* ${crtDir}/../build/* > /dev/null 2>&1 if [ "$1" = "all" ]; then - rm -fr ${appDir}/ext/* > /dev/null 2>&1 + rm -fr ${crtDir}/../ext/* > /dev/null 2>&1 fi echo "\033[42;37;1mAll done!\033[0m" diff --git a/scripts/genericclean.bat b/scripts/genericclean.bat index 6cae887147..f953207cff 100644 --- a/scripts/genericclean.bat +++ b/scripts/genericclean.bat @@ -6,11 +6,11 @@ IF "%1" == "all" ( TITLE Cleaning OpenCOR... ) -SET AppDir=%~dp0..\ +SET CrtDir=%~dp0 SET OrigDir=%CD% -IF EXIST "%AppDir%build" ( - CD "%AppDir%build" +IF EXIST "%CrtDir..\%build" ( + CD "%CrtDir..\%build" FOR %%I IN (*.*) DO ATTRIB -R "%%I" FOR /D %%I IN (*.*) DO RMDIR /S /Q "%%I" @@ -18,8 +18,8 @@ IF EXIST "%AppDir%build" ( ) IF "%1" == "all" ( - IF EXIST "%AppDir%ext" ( - CD "%AppDir%ext" + IF EXIST "%CrtDir..\%ext" ( + CD "%CrtDir..\%ext" FOR /D %%I IN (*.*) DO RMDIR /S /Q "%%I" FOR %%I IN (*.*) DO IF NOT "%%I" == ".gitignore" DEL /Q "%%I" diff --git a/scripts/genericmake b/scripts/genericmake index d479ee18dc..b7b8e109e9 100755 --- a/scripts/genericmake +++ b/scripts/genericmake @@ -1,8 +1,8 @@ #!/bin/sh -appDir="$(cd "$(dirname "$0")"; pwd)"/.. +crtDir="$(cd "$(dirname "$0")"; pwd)" -if [ -d "${appDir}/build" ]; then +if [ -d "${crtDir}/../build" ]; then cmakeBuildType=$1 if [ "$cmakeBuildType" = "Release" ]; then @@ -30,7 +30,7 @@ if [ -d "${appDir}/build" ]; then origDir=`pwd` - cd ${appDir}/build + cd ${crtDir}/../build cmake -G "$cmakeGenerator" -DCMAKE_BUILD_TYPE=$cmakeBuildType -DENABLE_TESTS=$enableTests .. diff --git a/scripts/genericmake.bat b/scripts/genericmake.bat index 0679d86d76..fdfc39ee22 100644 --- a/scripts/genericmake.bat +++ b/scripts/genericmake.bat @@ -1,8 +1,8 @@ SETLOCAL ENABLEDELAYEDEXPANSION -SET AppDir=%~dp0..\ +SET CrtDir=%~dp0 -IF EXIST "%AppDir%build" ( +IF EXIST "%CrtDir..\%build" ( SET CMakeBuildType=%1 IF "!CMakeBuildType!" == "Release" ( @@ -34,7 +34,7 @@ IF EXIST "%AppDir%build" ( SET OrigDir=%CD% - CD "%AppDir%build" + CD "%CrtDir..\%build" IF DEFINED NinjaFound ( SET CMakeGenerator=Ninja