Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Installer shortcuts do not work #904

Closed
GeekJosh opened this issue Dec 16, 2016 · 2 comments
Closed

Installer shortcuts do not work #904

GeekJosh opened this issue Dec 16, 2016 · 2 comments

Comments

@GeekJosh
Copy link

GeekJosh commented Dec 16, 2016

After installing with the Squirrel generated setup.exe, my app is successfully installed to %localappdata%\appname\version

However, a copy of the exe (and an additional exe in the package) is placed in %localappdata%\appname, and this is the exe that the shortcut points to.

If I manually run the exe in the version folder, the app works as expected.

What am I doing wrong?

I'm using a VS build script and nuspec file to generate releases at build

<Target Name="AfterBuild" Condition=" '$(Configuration)' == 'Release'">
    <GetAssemblyIdentity AssemblyFiles="$(TargetPath)">
      <Output TaskParameter="Assemblies" ItemName="myAssemblyInfo" />
    </GetAssemblyIdentity>
    <Exec Command="nuget pack appname.nuspec -Version %(myAssemblyInfo.Version) -Properties Configuration=Release -OutputDirectory $(OutDir) -BasePath $(OutDir)" />
    <Exec Command="squirrel --releasify $(OutDir)appname.%(myAssemblyInfo.Version).nupkg" />
  </Target>
<?xml version="1.0" encoding="utf-8"?>
<package xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd">
  <metadata>
    <id>appname</id>
    <!-- version will be replaced by MSBuild -->
    <version>0.0.0</version>
    <title>appname</title>
    <authors>company</authors>
    <description>appname</description>
    <requireLicenseAcceptance>false</requireLicenseAcceptance>
    <copyright>Copyright 2016</copyright>
    <dependencies />
  </metadata>
  <files>
    <file src="*.*" target="lib\net45\" exclude="*.pdb;*.nupkg;*.vshost.*"/>
    <file src="**\*.*" target="lib\net45\"  exclude="*.pdb;*.nupkg;*.vshost.*"/>
  </files>
</package>

EDIT: further investigation reveals that my app does start but crashes. This appears to be due to the exe being started outside the program folder (although the shortcut's "Start In" parameter is set). I realize this is outside the scope of being a Squirrel issue now, but I have to imagine I'm not the only one who's come across this problem whilst using Squirrel. Does anybody know how to solve this (or even where to start looking)?

EDIT2: closing this issue as it's misleading

@aasiddiq
Copy link

aasiddiq commented Jan 1, 2017

@GeekJosh I have a similar issue. Did you get a resolution for this? It would be great if you share it.

@GeekJosh
Copy link
Author

@goldsmit409 check your system's event log - if you see an error entry for your app that mentions BEX, then I believe it's because the latest version of squirrel/nuget doesn't support revision numbers in your version number. I adapted the demo script to build my app with 3 part version numbers and this solved the issue.

#905 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants