Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
  • Aug 08 01:16
    SMTStuck opened #972
  • Aug 05 04:34
    RickStrahl commented #971
  • Aug 04 22:12
    madmax1242 opened #971
  • Aug 02 22:35
    RickStrahl closed #970
  • Aug 02 22:35
    RickStrahl commented #970
  • Aug 02 21:05
    msd reopened #970
  • Aug 02 21:05
    msd closed #970
  • Aug 02 21:05
    msd commented #970
  • Aug 02 18:14
    msd opened #970
  • Jul 19 16:52
    RickStrahl closed #969
  • Jul 18 17:59

    RickStrahl on main

    Update Changelog.md (compare)

  • Jul 15 22:37
    RickStrahl commented #969
  • Jul 15 22:18
    RickStrahl labeled #969
  • Jul 15 22:18
    RickStrahl assigned #969
  • Jul 14 09:51
    rowtoripo opened #969
  • Jul 13 22:32
    RickStrahl closed #968
  • Jul 13 22:32
    RickStrahl commented #968
  • Jul 12 17:47
    GregFuhrmanTT commented #968
  • Jul 12 16:20
    RickStrahl commented #968
  • Jul 12 16:18
    RickStrahl commented #968
Rick Strahl
@RickStrahl
Do I even need that if I push up the files embedded in there?
blob
Gary Ewan Park
@gep13
Since you are embedding, and due to the fact that you are a known maintainer for your own packages, the verify.txt and checksums are not required.
Ideally, there would still be a license file in the chocolatey package though
Rick Strahl
@RickStrahl
Ah Ok.
adding license.txt and removing verify.txt.
Anything I need to do with the uninstall file (other than remove comments). It seems to work without any changes made.
Gary Ewan Park
@gep13
If the literally have nothing in the chocolateyinstall.ps1 file, then simply omit that, and as a result, you won't need the chocolateyuninstall.ps1 file either
Rick Strahl
@RickStrahl
Does that even need to be there? Chocolatey will just wipe out the folder right?
Yeah that's what I thought because the contents of that file wouldn't work anyway. Cool. Less is good :-)
Gary Ewan Park
@gep13
Yip, if it is an embedded package, with just contents, Chocolatey will wipe out the folder on uninstallation. It is only if you do additional steps in the install.ps1 file, that you would need to undo these in the uninstall.ps1
Rick Strahl
@RickStrahl
Can i omit the chocolateyinstall.ps1 file too then?
Gary Ewan Park
@gep13
If the literally have nothing in the chocolateyinstall.ps1 file, then simply omit that
Rick Strahl
@RickStrahl
FWIW, I haven't been able to find the docs on any of this. It may be there but I can't find the docs for an embedded install.
Gary Ewan Park
@gep13
:point_up:
@RickStrahl see my comment in the issue :-)
Rick Strahl
@RickStrahl
Not that it matters so much now :-)
Rick Strahl
@RickStrahl
So, there's nothing much left of my build script now that I don't need all these files:
# Script builds a Chocolatey Package and tests it locally
# 
#  Assumes: Uses latest release out of Pre-release folder
#           Release has been checked in to GitHub Repo
#   Builds: ChocolateyInstall.ps1 file with download URL and sha256 embedded

cd "$PSScriptRoot" 

remove-item ".\tools" -recurse -force

# $sourceFolder = "..\Distribution" 
# $file = "$sourceFolder\MarkdownMonster.exe"
# write-host $file

# $sha = get-filehash -path "$file" -Algorithm SHA256  | select -ExpandProperty "Hash"
# write-host $sha

robocopy $sourceFolder .\tools /MIR
copy ..\license.txt .\tools\license.txt

#empty install file - we just have content no code
#$filetext = ""
#out-file -filepath .\tools\chocolateyinstall.ps1 -inputobject $filetext

# uninstall script
# copy chocolateyuninstall.ps1 .\tools

#$filetext = @"
#MarkdownMonster.exe
#Sha256: $sha
#"@
# out-file -filepath .\tools\verify.txt -inputobject $filetext

del *.nupkg

# Create .nupkg from .nuspec
choco pack

choco uninstall "MarkdownMonster.Portable"

choco install "MarkdownMonster.Portable" -fdv -y  -s ".\"
Thanks for your help.
As a nice side effect I looked a lot closer at running the portable version and found a few more little things that weren't working right that got fixed (like missing icons) and a few other UI quiks.
:+1:
Gary Ewan Park
@gep13
you know, if you wanted, you could embed the exe into this package as well: https://chocolatey.org/packages/MarkdownMonster rather than first downloading it as well, that would also save the need for the checksums :-D
Rick Strahl
@RickStrahl
So I pushed it up markdownmonster.portable
It looks like it made it but choco push is totally hung.
I remember this happened with the previous version as well. Console is dead I have to shut it down.
blob
eventually returned. It says it's timed out, but the package is up on choco.
Rick Strahl
@RickStrahl
The checksums aren't a big problem since those are auto-generated as part of the build process and embedded into the choco script. Main thing I don't like is that the upload takes a while and apparently hangs a lot of the time.
Rick Strahl
@RickStrahl
Hmmm... so looks like the uninstall isn't working:
blob
Gary Ewan Park
@gep13
hmm, that looks like a question for @ferventcoder
any ideas Rob?
Rick Strahl
@RickStrahl
Looks like the uninstall is looking in some odd folders for uninstall. There's no uninstall.ps1 (or install for that matter).
The question is why is it looking in the lib-bkp folder.
Gary Ewan Park
@gep13
during the uninstallation process, Chocolatey moves items into that folder, so that if something goes wrong, it can recover the installation.
Rob Reynolds
@ferventcoder

:point_up: January 15, 2017 3:34 AM

Yip, if it is an embedded package, with just contents, Chocolatey will wipe out the folder on uninstallation

Chocolatey is a tad bit smarter than that. On uninstall it removes all unchanged files and leaves files that have changed. If you uninstall with force, it will wipe all files, including files created and user changed files. Same goes for upgrade.

@RickStrahl @gep13 chocolatey/choco#1139 for the uninstall issue - it looks like something was running and locking the folder, so when it moves the files to lib-bkp and later attempts to delete them, it fails because the locked files are now there.
Rob Reynolds
@ferventcoder
It should not cause a failure, only warnings. However it looks like in this case it may not have had the ability to create the copies back in the actual lib directory so it considered it a failure.
:point_up: January 15, 2017 4:26 AM for the push hang. I push up 7MB and don't run into this very often. Let me see if maintenance can clear this up.
Rob Reynolds
@ferventcoder
@RickStrahl I just performed maintenance on Chocolatey.org. It's coming back up now. I'd be curious to know if you are still running into hangups after this.
Rick Strahl
@RickStrahl
@ferventcoder Yeah I saw the error message, but I checked and I made sure there was nothing running or any explorer folders open in the folder structure which made that puzzling.
@ferventcoder I did run from a local folder install for testing though - not sure if that would make a difference. I give it another try now after reboot.
Rick Strahl
@RickStrahl
@ferventcoder So I tried a few things here and I notice that everything works from an elevated command prompt. But from a non elevated prompt it doesn't work. Left unelevated, right elevated.
blob
This is a portable install and shouldn't need any admin rights to install. No admin tag in the nuspec.
@ferventcoder @gep13 Shouldn't I be able to install from a non-elevated prompt with this portable install?
Rob Reynolds
@ferventcoder
If you have installed choco to a directory other than the default, then yes