
我有一個包含 3 個目錄(bin、demo 和 resources)的專案。我有一個由 pyinstaller 創建的 exe 檔案(這是 GUI 腳本),其中包含指向其他兩個資料夾(演示和來源)中的一些檔案的連結。我只想創建一個快捷方式,從與演示和來源資料夾位於同一資料夾中的快捷方式啟動 exe 檔案。
我不確定我應該使用符號連結還是硬連結所以請告訴我是否錯了
這裡是文件樹:
|
|__bin
| __exe file
|
|__demo
| __[file needed for the exe file ...]
|__sources
| __......Other files
|
|__{exe file} the shortcut i want to create
我嘗試過ln file.exe ../fileshortcut
,但點擊後沒有彈出任何內容。
答案1
使用符號連結嘗試一下:
cd 到您的演示目錄中
ln -s ../bin/file.exe fileshortcut
您應該能夠點擊您的連結。也要確保您的 file.exe 是可執行的。
chmod +x file.exe