wulkano / Aperture

Record the screen on macOS
MIT License
1.23k stars 111 forks source link

Distribute as binary #19

Closed StefMa closed 7 years ago

StefMa commented 7 years ago

Hey 👋 ,

i'm very new in this topic (which node packages and stuff). But it is possible to distribute a binary of aperture instead of the source code?

The Problem

Currently we have to run it on a macOS machine (or at least on a machine which support swift and xcodebuild) because we compile the swift code at [npm|yarn] install time.

I'm currently experimenting with BitBucket Pipelines which doesn't support macOS builds ATM. Which means I can't use my app with aperture it :(

So it would be great if you can distribute binarys! 👍

Thank you 👨

sindresorhus commented 7 years ago

Yes, that's on my todo list. PR welcome if you need it now though. Not sure why it didn't do this from the start.

StefMa commented 7 years ago

Cool. Would be great if we have this "feature" soon 😇

I would do that PR. But I have no idea how to do it 🙁 maybe you can send me some links or suggestions how to do it?!

StefMa commented 7 years ago

I really tried to found something, but it seems that npm can't publish and distribute binarys... -> https://github.com/npm/npm/issues/8585

So the only solution is to build it on a mac, upload it anywhere, and write a script which downloads the binary and link in the right folder 😮 Really?! 😮

StefMa commented 7 years ago

As mentioned in #21 the only change to make this happen is to change form postinstall to prepublish... Currently I don't know if its working. But I'm working https://github.com/StefMa/aperture.js/tree/feature/binary this.

@sindresorhus the main swift binary should be included in git now, right?

StefMa commented 7 years ago

After a quick look into the npm publish documentation maybe it is better to ignore swift/main in .gitignore but creating a empty .npmingore, so that swift/main is included in the published package but not in git ... 👍

sindresorhus commented 7 years ago

The best solution would be to explicitly list the files to be included with the "files" property in package.json. And still have it ignored by Git.