Skip to content

Commit

Permalink
create desktop shortcut
Browse files Browse the repository at this point in the history
  • Loading branch information
Arslan-Siraj committed Nov 26, 2024
1 parent eac74e8 commit 59b0053
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion .github/workflows/test-win-exe-w-embed-py.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -86,9 +86,14 @@ jobs:
echo ' </Directory>' >> streamlit_exe.wxs
echo ' <Feature Id="MainFeature" Title="Main Application" Level="1">' >> streamlit_exe.wxs
echo ' <ComponentGroupRef Id="StreamlitExeFiles" />' >> streamlit_exe.wxs
echo ' <ComponentRef Id="DesktopShortcutComponent" />' >> streamlit_exe.wxs
echo ' </Feature>' >> streamlit_exe.wxs
echo ' <Component Id="DesktopShortcutComponent" Guid="3597b243-9180-4d0b-b105-30d8b0d1a334" Directory="DesktopFolder">' >> streamlit_exe.wxs
echo ' <Shortcut Id="DesktopShortcut" Name="OpenMS-StreamlitTemplateApp" Description="Launch ${{ env.APP_NAME }}" Target="[INSTALLFOLDER]OpenMS-StreamlitTemplateApp.bat" WorkingDirectory="INSTALLFOLDER"/>' >> streamlit_exe.wxs
echo ' <RegistryValue Root="HKCU" Key="Software\\[Manufacturer]\\[ProductName]" Name="DesktopShortcut" Type="integer" Value="1" KeyPath="yes" />' >> streamlit_exe.wxs
echo ' </Component>' >> streamlit_exe.wxs
echo ' <CustomAction Id="ReadMeFile" Directory="INSTALLFOLDER" Execute="deferred" Return="check"' >> streamlit_exe.wxs
echo ' ExeCommand="cmd.exe /c echo This is readme &gt; [INSTALLFOLDER]Readme.txt" />' >> streamlit_exe.wxs
echo ' ExeCommand="cmd.exe /c echo Launch the ${{ env.APP_NAME }} by double-clicking the ${{ env.APP_NAME }}.bat file &gt; [INSTALLFOLDER]Readme.txt" />' >> streamlit_exe.wxs
echo ' <CustomAction Id="CreateBatFile" Directory="INSTALLFOLDER" Execute="deferred" Return="check"' >> streamlit_exe.wxs
echo ' ExeCommand="cmd.exe /c echo @echo off &gt; [INSTALLFOLDER]temp.bat &amp;&amp; echo [INSTALLFOLDER]python-${{ env.PYTHON_VERSION }}\\python.exe -m streamlit run [INSTALLFOLDER]app.py local &gt;&gt; [INSTALLFOLDER]${{ env.APP_NAME }}.bat" />' >> streamlit_exe.wxs
echo ' <CustomAction Id="RunBatchFile" Directory="INSTALLFOLDER" Execute="deferred" Return="asyncNoWait"' >> streamlit_exe.wxs
Expand Down

0 comments on commit 59b0053

Please sign in to comment.