tilemill-project / tilemill

TileMill is a modern map design studio
https://tilemill-project.github.io/tilemill/
BSD 3-Clause "New" or "Revised" License
3.11k stars 527 forks source link

Automating tilemill builds and moving to atom #2467

Open bsudekum opened 9 years ago

bsudekum commented 9 years ago

Automating builds for tilemill is a hard and involved process. Because of this, let's move the wrapper from topcube to atom. This will allow us to leverage previously written build processes that we've successfully used on projects like Atlas and Mapbox Studio.

Basic plan of attack:

  1. Get all 3 platforms supporting npm install tilemill
  2. Begin removing topcube and replacing it with atom
  3. Abstract mapbox-studio's build-atom.sh script into it's own repo, mapbox-build-app.
  4. Add repo to both projects
  5. Easy releases :tada:

This will allow releases of tilemill to be a more familiar/easy process.

/cc @springmeyer @yhahn

springmeyer commented 9 years ago

:100:

bsudekum commented 9 years ago

Get all 3 platforms supporting npm install tilemill

So far I have successfully npm installed tilemill from source with zero dependencies without any issues on mac and linux by removing topcube from the package.json. This is fine since we'll be removing it anyways and replacing it with atom.

Working on windows next.

springmeyer commented 9 years ago

Great, yes, all platforms, including windows should npm install cleanly with no external deps. Just avoid node v0.10.34 which broke https against amazon s3 and use 0.10.33 or greater. Tests should also all be passing on unix. Tests have never been ported to work on windows, but should be.

springmeyer commented 9 years ago

Tests have never been ported to work on windows, but should be.

To clarify, appveyor is passing on windows (https://ci.appveyor.com/project/Mapbox/tilemill) because currently we don't attempt to run the tests, but we need to.

bsudekum commented 9 years ago

working here: https://github.com/mapbox/tilemill/tree/atom

Ripped out topcube and got atom working today:

If you want to give it a go,

  1. download latest release of atom
  2. run ./scripts/vendor-node.sh
  3. run /path/to/atom path/to/tilemill
incanus commented 9 years ago

We don't use topcube on OS X.

https://github.com/mapbox/tilemill/tree/4ba78d473aab275ab9e3e17d5368cd40f1c6d151/platforms/osx

We've got some functionality like Notification Center integration for when renders/uploads are done, dock badging, App Nap compatibility so the machine doesn't go to sleep, Spotlight & QuickLook plugins for MBTiles, LetsMove integration, etc.

Not saying we can't lose them, but we should be aware of what we're cutting from current functionality.

bsudekum commented 9 years ago

@incanus yep, I think it's worth it for making the update process much much easier.

springmeyer commented 9 years ago

the other major loss is that the custom Mac app kills zombie processes when it starts. this should ideally be replaced with something.

bsudekum commented 9 years ago

Update

This week went really, builds are working on all platforms and publishing new builds almost works for all platforms. The internal guts is about as stable as master: very little has changed internally on the atom branch. Here is a backlog:

todo

Notable changes

cc @willwhite

bsudekum commented 9 years ago

OSX published builds are failing. Upon opening the app, a popup comes up saying it's damaged I think this a signing issue

This was a rather interesting bug. I ran codesign -vv TileMill.app/ to check out the cause of the issue on an invalid app. Results looks liked:

TileMill.app/: a sealed resource is missing or invalid
file missing: /Users/bobby/Downloads/foo/TileMill.app/Contents/Resources/app/node_modules/backbone/raw/._destroy.psd
file missing: /Users/bobby/Downloads/foo/TileMill.app/Contents/Resources/app/node_modules/backbone/test/._model.coffee
file missing: /Users/bobby/Downloads/foo/TileMill.app/Contents/Resources/app/node_modules/backbone/test/._sync.js
file missing: /Users/bobby/Downloads/foo/TileMill.app/Contents/Resources/app/node_modules/backbone/raw/._todos.psd
file missing: /Users/bobby/Downloads/foo/TileMill.app/Contents/Resources/app/node_modules/backbone/._.DS_Store
file missing: /Users/bobby/Downloads/foo/TileMill.app/Contents/Resources/app/node_modules/backbone/._LICENSE
file missing: /Users/bobby/Downloads/foo/TileMill.app/Contents/Resources/app/node_modules/backbone/test/vendor/._json2.js
file missing: /Users/bobby/Downloads/foo/TileMill.app/Contents/Resources/app/node_modules/backbone/raw/._background.psd
file missing: /Users/bobby/Downloads/foo/TileMill.app/Contents/Resources/app/node_modules/backbone/._.gitignore
file missing: /Users/bobby/Downloads/foo/TileMill.app/Contents/Resources/app/node_modules/backbone/._README
file missing: /Users/bobby/Downloads/foo/TileMill.app/Contents/Resources/app/node_modules/backbone/examples/todos/._todos.css
file missing: /Users/bobby/Downloads/foo/TileMill.app/Contents/Resources/app/node_modules/backbone/docs/._.DS_Store
file missing: /Users/bobby/Downloads/foo/TileMill.app/Contents/Resources/app/node_modules/backbone/test/._events.js
file missing: /Users/bobby/Downloads/foo/TileMill.app/Contents/Resources/app/node_modules/backbone/raw/._backbone.psd
file missing: /Users/bobby/Downloads/foo/TileMill.app/Contents/Resources/app/node_modules/backbone/docs/images/._backbone.png
file missing: /Users/bobby/Downloads/foo/TileMill.app/Contents/Resources/app/node_modules/backbone/raw/._arrows.psd

By removing these files from the creation process, the app builds and runs fine now.

incanus commented 9 years ago

Awesome, glad this solved it.