Skip to content

Commit

Permalink
Updated installation script
Browse files Browse the repository at this point in the history
  • Loading branch information
bialger committed Aug 2, 2024
1 parent 59d7258 commit 51c6652
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -66,9 +66,19 @@ if (cmake -S . -B "$CMAKE_PROJECT_DIR" -DCMAKE_BUILD_TYPE=Release -G "Unix Makef

exit 0
elif (cd "$CMAKE_PROJECT_DIR" && "./$PROJECT_NAME$EXEC_EXTENSION" -h >/dev/null 2>/dev/null); then
echo "Congratulations! $PROJECT_NAME was compiled successfully. But it is impossible to create a link to it - run it from $CMAKE_BUILD_DIR as .\\$PROJECT_NAME$EXEC_EXTENSION"
rm -f "$EXEC_LINK_PATH"
rm -rf "$HOME/${PROJECT_NAME:?}"
echo "Congratulations! $PROJECT_NAME was compiled successfully."
echo "Because of Windows-specific limitations, it is not possible to create a link to it."
echo "You can run it from $HOME/$PROJECT_NAME as .\\$PROJECT_NAME$EXEC_EXTENSION"
echo "Or you can run CMD.EXE with administrative privileges and type: "
echo 'mklink "%userprofile%\weather-forecast.exe" "%userprofile%\weather-forecast\weather-forecast.exe"'
echo ''
cd "$CMAKE_PROJECT_DIR" && "./$PROJECT_NAME$EXEC_EXTENSION" -h
mkdir "$HOME/$PROJECT_NAME"
cp "$CMAKE_PROJECT_DIR/$PROJECT_NAME$EXEC_EXTENSION" "$HOME/$PROJECT_NAME/$PROJECT_NAME$EXEC_EXTENSION"
# ALso copy all *dll files like following:
# cp -r "$CMAKE_PROJECT_DIR/liblib.dll" "$HOME/$PROJECT_NAME/liblib.dll"
cd "$HOME/$PROJECT_NAME" && "./$PROJECT_NAME$EXEC_EXTENSION" -h
exit 0
else
echo 'Oops! Could not execute the program.'
Expand Down

0 comments on commit 51c6652

Please sign in to comment.