File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -54,7 +54,7 @@ cp "${EXECUTABLE}" "${INSTALL_TARGET}/bin/${EXECUTABLE_NAME}"
5454if [ " $IS_WINDOWS " = true ]; then
5555 # use ldd to copy dependencies from msys2 into the bin dir
5656 ldd " ${EXECUTABLE} " | grep " clang" | awk ' NF == 4 { system("cp " $3 " ' " ${INSTALL_TARGET} /bin/" ' ") }'
57- else
57+ fi
5858
5959# Assets (Images, icons, language files)...
6060cp -r " ${SOURCE_DIRECTORY} /static/assets/." " ${INSTALL_TARGET} /assets"
@@ -71,7 +71,15 @@ if [ "$NOLINK" = false ]; then
7171 # Dont create a symlink on windows or if NOLINK is true
7272 ln -s " ./bin/${EXECUTABLE_NAME} " " ${INSTALL_TARGET} /${EXECUTABLE_NAME} "
7373 else
74- # Instead create a shortcut on windows
75- powershell -Command " New-Item -ItemType SymbolicLink -Path '${INSTALL_TARGET} /${EXECUTABLE_NAME} ' -Target './bin/${EXECUTABLE_NAME} '"
74+ # Convert to Windows path
75+ WIN_INSTALL_TARGET=$( cygpath -w " ${INSTALL_TARGET} " )
76+
77+ powershell -Command "
78+ \$ WshShell = New-Object -ComObject WScript.Shell;
79+ \$ Shortcut = \$ WshShell.CreateShortcut('${WIN_INSTALL_TARGET} \\ ${EXECUTABLE_NAME} .lnk');
80+ \$ Shortcut.TargetPath = '.\\ bin\\ ${EXECUTABLE_NAME} ';
81+ \$ Shortcut.WorkingDirectory = '${WIN_INSTALL_TARGET} ';
82+ \$ Shortcut.Save();
83+ "
7684 fi
7785fi
You can’t perform that action at this time.
0 commit comments