Skip to content

Commit 81bfdd8

Browse files
committed
Fixed deploy script.
1 parent 6de774f commit 81bfdd8

1 file changed

Lines changed: 8 additions & 2 deletions

File tree

scripts/deploy.sh

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ cp "${EXECUTABLE}" "${INSTALL_TARGET}/bin/${EXECUTABLE_NAME}"
5454
if [ "$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)...
6060
cp -r "${SOURCE_DIRECTORY}/static/assets/." "${INSTALL_TARGET}/assets"
@@ -72,6 +72,12 @@ if [ "$NOLINK" = false ]; then
7272
ln -s "./bin/${EXECUTABLE_NAME}" "${INSTALL_TARGET}/${EXECUTABLE_NAME}"
7373
else
7474
# Instead create a shortcut on windows
75-
powershell -Command "New-Item -ItemType SymbolicLink -Path '${INSTALL_TARGET}/${EXECUTABLE_NAME}' -Target './bin/${EXECUTABLE_NAME}'"
75+
powershell -Command "
76+
\$WshShell = New-Object -ComObject WScript.Shell;
77+
\$Shortcut = \$WshShell.CreateShortcut(\"${INSTALL_TARGET}\\${EXECUTABLE_NAME}.lnk\");
78+
\$Shortcut.TargetPath = '.\\bin\\${EXECUTABLE_NAME}';
79+
\$Shortcut.WorkingDirectory = \"${INSTALL_TARGET}\";
80+
\$Shortcut.Save();
81+
"
7682
fi
7783
fi

0 commit comments

Comments
 (0)