Merged in leoheck/flatcam/linux-script-path-fix (pull request #304)
Fix linux script path
This commit is contained in:
9
Makefile
9
Makefile
@@ -14,10 +14,19 @@ ASSEST_PATH = assets/linux
|
|||||||
INSTALL_PATH = /usr/share/flatcam-beta
|
INSTALL_PATH = /usr/share/flatcam-beta
|
||||||
APPS_PATH = /usr/share/applications
|
APPS_PATH = /usr/share/applications
|
||||||
|
|
||||||
|
MIN_PY3_MINOR_VERSION := 5
|
||||||
|
PY3_MINOR_VERSION := $(shell python3 --version | cut -d'.' -f2)
|
||||||
|
|
||||||
|
ifneq ($(MIN_PY3_MINOR_VERSION), $(firstword $(sort $(PY3_MINOR_VERSION) $(MIN_PY3_MINOR_VERSION))))
|
||||||
|
$(info Current python version is 3.$(PY3_MINOR_VERSION))
|
||||||
|
$(error You must have at least 3.$(MIN_PY3_MINOR_VERSION) installed)
|
||||||
|
endif
|
||||||
|
|
||||||
install:
|
install:
|
||||||
ifeq ($(USER_ID), 0)
|
ifeq ($(USER_ID), 0)
|
||||||
@ echo "Installing it system-wide"
|
@ echo "Installing it system-wide"
|
||||||
cp -rf $(LOCAL_PATH) $(INSTALL_PATH)
|
cp -rf $(LOCAL_PATH) $(INSTALL_PATH)
|
||||||
|
@ sed -i "s|python_script_path=.*|python_script_path=$(INSTALL_PATH)|g" $(INSTALL_PATH)/assets/linux/flatcam-beta
|
||||||
ln -sf $(INSTALL_PATH)/assets/linux/flatcam-beta /usr/local/bin
|
ln -sf $(INSTALL_PATH)/assets/linux/flatcam-beta /usr/local/bin
|
||||||
cp -f $(ASSEST_PATH)/flatcam-beta.desktop $(APPS_PATH)
|
cp -f $(ASSEST_PATH)/flatcam-beta.desktop $(APPS_PATH)
|
||||||
@ sed -i "s|Exec=.*|Exec=$(INSTALL_PATH)/$(ASSEST_PATH)/flatcam-beta|g" $(APPS_PATH)/flatcam-beta.desktop
|
@ sed -i "s|Exec=.*|Exec=$(INSTALL_PATH)/$(ASSEST_PATH)/flatcam-beta|g" $(APPS_PATH)/flatcam-beta.desktop
|
||||||
|
|||||||
@@ -1,10 +1,5 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
current_path=$(dirname $0)
|
script_path=$(readlink -f $0)
|
||||||
cd $current_path
|
python_script_path=$(dirname $script_path)/../../
|
||||||
current_path=$(pwd)
|
python3 $python_script_path/FlatCAM.py $*
|
||||||
cd -
|
|
||||||
|
|
||||||
script_path=$(dirname $current_path)
|
|
||||||
|
|
||||||
python3 $script_path/FlatCAM.py $*
|
|
||||||
|
|||||||
Reference in New Issue
Block a user