Skip to content
This repository has been archived by the owner on May 21, 2019. It is now read-only.

homebrew #350

Closed
gristel opened this issue May 22, 2016 · 11 comments
Closed

homebrew #350

gristel opened this issue May 22, 2016 · 11 comments
Labels

Comments

@gristel
Copy link

gristel commented May 22, 2016

Hi all.
I'm very curious to try black-screen. It's awesome to see that somebody took the initiative to make something as interesting as this 👍
I was wondering if installing with brew cask will be implemented?
And also: what's the best way of knowing there's a new release?
Thanks!

@Nnubes256
Copy link

Look at my comment at #175 for a temporal Cask you can use to install 0.0.2.

@kevinastone
Copy link

@Nnubes256 can you PR that into cask?

@gristel
Copy link
Author

gristel commented May 22, 2016

@Nnubes256 thanks!

@vlad-shatskyi
Copy link
Contributor

That would be a very nice contribution, @Nnubes256. Without fixing the version to 0.0.2, of course.

@Nnubes256
Copy link

The problem here is that Cask only works on releases, not on sources. A workaround here to continue using Cask would be to make nightly/weekly builds, and make Cask skip the SHA256 verification for these.

Cask can also account for software that auto-updates itself with the auto_updates stanza, so an external auto-updater could actually work here(see atom for example).

Otherwise, the only way around is to make a Homebrew formulae that compiles directly from source.

@Nnubes256
Copy link

Currently the farthest I got with Homebrew is this:

require "language/node"

class BlackScreen < Formula
  # * Description shouldn't start with an indefinite article (A)
  desc "Terminal emulator for the 21st century."
  homepage "https://github.com/shockone/black-screen"
  url "https://github.com/shockone/black-screen/archive/v0.0.2.tar.gz"
  sha256 "f894a731998eb805563a92ee25db0a613251e62a50d360112ede0f7a8bccd10d"
  head "https://github.com/shockone/black-screen.git"

  depends_on "node" => :build

  def install
    system "npm", "install", *Language::Node.local_npm_install_args
    system "npm", "run", "package"
  end

  test do
    system "npm", "test"
  end
end

Which fails on npm run package with this log:

2016-05-23 11:56:14 +0200

npm
run
package


> [email protected] package /private/tmp/black-screen-20160523-30257-150esyl/black-screen-0.0.2
> gulp build && electron-packager . "$npm_package_productName" --overwrite --platform=darwin --arch=x64 --version=$npm_package_electronVersion --out='/Applications' --icon='./icon.icns' --asar=true

(node:30856) fs: re-evaluating native module sources is not supported. If you are using the graceful-fs module, please update it to a more recent version.
[11:56:15] Using gulpfile /private/tmp/black-screen-20160523-30257-150esyl/black-screen-0.0.2/gulpfile.js
[11:56:15] Starting 'typescript'...
[11:56:15] Starting 'sass'...
[11:56:15] Starting 'copy-html'...
[11:56:15] 'typescript' errored after 73 ms
[11:56:15] Error: Command `tsc` failed with exit code ENOENT
    at exports._errnoException (util.js:953:11)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:182:32)
    at onErrorNT (internal/child_process.js:348:16)
    at _combinedTickCallback (internal/process/next_tick.js:74:11)
    at process._tickCallback (internal/process/next_tick.js:98:9)
[11:56:15] Finished 'copy-html' after 21 ms
[11:56:15] gulp-notify: [Black Screen Watcher] SCSS has been compiled.
[11:56:15] Finished 'sass' after 341 ms

npm ERR! Darwin 15.2.0
npm ERR! argv "/usr/local/Cellar/node/6.2.0/bin/node" "/usr/local/opt/node/libexec/npm/bin/npm" "run" "package"
npm ERR! node v6.2.0
npm ERR! npm  v3.8.9
npm ERR! code ELIFECYCLE
npm ERR! [email protected] package: `gulp build && electron-packager . "$npm_package_productName" --overwrite --platform=darwin --arch=x64 --version=$npm_package_electronVersion --out='/Applications' --icon='./icon.icns' --asar=true`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the [email protected] package script 'gulp build && electron-packager . "$npm_package_productName" --overwrite --platform=darwin --arch=x64 --version=$npm_package_electronVersion --out='/Applications' --icon='./icon.icns' --asar=true'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the black-screen package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     gulp build && electron-packager . "$npm_package_productName" --overwrite --platform=darwin --arch=x64 --version=$npm_package_electronVersion --out='/Applications' --icon='./icon.icns' --asar=true
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs black-screen
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls black-screen
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     /private/tmp/black-screen-20160523-30257-150esyl/black-screen-0.0.2/npm-debug.log

HOMEBREW_VERSION: 0.9.9
ORIGIN: https://github.com/Homebrew/brew.git
HEAD: 375efe09455218d9929e41f16317074ccdf50f2a
Last commit: 25 hours ago
Core tap ORIGIN: https://github.com/Homebrew/homebrew-core
Core tap HEAD: 3766fa11e7b1fe847343f77a671da4c2930ad9c2
Core tap last commit: 19 hours ago
HOMEBREW_PREFIX: /usr/local
HOMEBREW_REPOSITORY: /usr/local
HOMEBREW_CELLAR: /usr/local/Cellar
HOMEBREW_BOTTLE_DOMAIN: https://homebrew.bintray.com
CPU: 8-core 64-bit haswell
GCC-4.2: build 0
Clang: 7.3 build 703
Perl: /usr/bin/perl
Python: /usr/bin/python
Ruby: /usr/bin/ruby => /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby
Java: 1.8.0_45
System Ruby: 2.0.0-p645
OS X: 10.11.2-x86_64
Xcode: 7.3.1
CLT: 7.3.1.0.1.1461711523
X11: 2.7.8 => /opt/X11

HOMEBREW_CC: clang
HOMEBREW_CXX: clang++
SDKROOT: /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk
MAKEFLAGS: -j8
CMAKE_PREFIX_PATH: /usr/local
CMAKE_INCLUDE_PATH: /usr/include/libxml2:/System/Library/Frameworks/OpenGL.framework/Versions/Current/Headers
CMAKE_LIBRARY_PATH: /System/Library/Frameworks/OpenGL.framework/Versions/Current/Libraries
MACOSX_DEPLOYMENT_TARGET: 10.11
PKG_CONFIG_LIBDIR: /usr/lib/pkgconfig:/usr/local/Library/ENV/pkgconfig/10.11
ACLOCAL_PATH: /usr/local/share/aclocal
PATH: /usr/local/opt/node/libexec/npm/bin:/usr/local/Library/ENV/4.3:/usr/local/opt/node/bin:/usr/bin:/bin:/usr/sbin:/sbin

@Nnubes256
Copy link

@kevinastone Maybe when 0.0.3 releases, or when we start getting nightly/weekly builds, whatever happens first. I agree with @ShockOne in that 0.0.2 is simply not ready for Caskroom distribution.

@Nnubes256
Copy link

Just found out that the error I'm experiencing was fixed by 0bb5629, which is not on stable, so...

First working Formula:

require "language/node"

class BlackScreen < Formula
  # * Description shouldn't start with an indefinite article (A)
  desc "Terminal emulator for the 21st century."
  homepage "https://github.com/shockone/black-screen"

  # Building fails on 0.0.2 because gulp fails executing tsc.
  # Fixed on commit 0bb5629, but not on stable yet, so disabling stable until then.
  #url "https://github.com/shockone/black-screen/archive/v0.0.2.tar.gz"
  #sha256 "f894a731998eb805563a92ee25db0a613251e62a50d360112ede0f7a8bccd10d"
  head "https://github.com/shockone/black-screen.git"

  depends_on "node" => :build
  depends_on :python => :build # Native modules

  def install
    system "npm", "install", *Language::Node.local_npm_install_args
    # HACK better have Homebrew track the app bundles instead of simply copying them to /Applications
    system "npm", "run", "compile"
    system "node_modules/.bin/electron-packager",
             ".",
             "Black Screen",
             "--overwrite",
             "--platform=darwin",
             "--arch=x64",
             "--version=1.1.1", # HACK also is this
             "--icon=./icon.icns",
             "--asar=true"
    prefix.install "Black Screen-darwin-x64/Black Screen.app"
  end

  test do
    system "npm", "test"
  end
end

To install:
$ brew install --HEAD black-screen && brew linkapps black-screen

To uninstall:
$ brew unlinkapps black-screen && brew uninstall black-screen

@vlad-shatskyi
Copy link
Contributor

Opened a PR into Homebrew Homebrew/homebrew-cask#21531

@Nnubes256 Nnubes256 mentioned this issue May 29, 2016
Closed
5 tasks
@Nnubes256
Copy link

Nnubes256 commented May 29, 2016

🎉 Aaand merged! #77, #175 and this issue can now be closed(also, checkmarking on #55 and #63).

@vlad-shatskyi
Copy link
Contributor

brew cask install black-screen.

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

No branches or pull requests

4 participants