RetroShare / RSNewWebUI

30 stars 20 forks source link

Fix build webui on macos platfrom #91

Closed defnax closed 8 months ago

defnax commented 8 months ago

@thunder2 on macos go dir up with /../../webui-srcdoes not work

on linux and macos using go up with ../ https://askubuntu.com/questions/703698/how-do-i-navigate-up-one-directory-from-the-terminal https://smallbusiness.chron.com/previous-directory-mac-terminal-49989.html

thunder2 commented 8 months ago

This dosn't work winth MSYS2 and maybe with linux too. $(readlink -f $(dirname $0)) has no trailing slash The result is now "/retroshare-webui/webui-src/make-src../../webui" but "/retroshare-webui/webui-src/make-src/../../webui" (slash before ..) is needed

defnax commented 8 months ago

but on macos compile it gets issue to buld webui, i need to edit manually the build.sh. for macos there can be used if def or something? the cmake compile uses the build.sh and then i get the first error there with the path

thunder2 commented 8 months ago

Can you check the result of $(readlink -f $(dirname $0)). On MSYS2 and linux its the current directory. Change the script like this

#!/bin/bash

# create webfiles from sources at compile time (works without npm/node.js)

echo "### Starting WebUI build ###"

echo "---"
echo $(readlink -f $(dirname $0))
echo "---"
exit 1

src=$(readlink -f $(dirname $0))../../webui-src
defnax commented 8 months ago

Can you check the result of $(readlink -f $(dirname $0)). On MSYS2 and linux its the current directory. Change the script like this

#!/bin/bash

# create webfiles from sources at compile time (works without npm/node.js)

echo "### Starting WebUI build ###"

echo "---"
echo $(readlink -f $(dirname $0))
echo "---"
exit 1

src=$(readlink -f $(dirname $0))../../webui-src

thx i will test tonight

defnax commented 8 months ago

i get this

Untitled 2

thunder2 commented 8 months ago

The readlink -f doesn't work on your macOS version. On stackoverflow I read, that it is supported on macOS 12.3.

defnax commented 8 months ago

The readlink -f doesn't work on your macOS version. On stackoverflow I read, that it is supported on macOS 12.3. ah ok,.i has macos 10.13 and 10.15 (VM) theni i can live with it, now most people have newer macos versions