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

./mach package #9918

Closed
paulrouget opened this issue Mar 8, 2016 · 12 comments
Closed

./mach package #9918

paulrouget opened this issue Mar 8, 2016 · 12 comments

Comments

@paulrouget
Copy link
Contributor

@paulrouget paulrouget commented Mar 8, 2016

We want to build a .app or a .dmg file on Mac. And zip files for Linux and Windows.

They will include the Servo binary, the resources folder, and a copy of browserhtml.

I think Jack is working on that.

@metajack
Copy link
Contributor

@metajack metajack commented Mar 8, 2016

I had a working prototype of this, which mainly involves creating a .app directory and moving stuff into the right places. If anyone else wants to work on this before I get back to it, I can post the Info.plist and steps I took.

@paulrouget
Copy link
Contributor Author

@paulrouget paulrouget commented Mar 21, 2016

If anyone else wants to work on this before I get back to it, I can post the Info.plist and steps I took.

Can you post this? I'm trying to get the miniaturize/maximize buttons to work, but it requires the app to be properly packaged.

@paulrouget
Copy link
Contributor Author

@paulrouget paulrouget commented Mar 29, 2016

@metajack
Copy link
Contributor

@metajack metajack commented Apr 4, 2016

I was roughly following this guide I found on how to build them:
http://stackoverflow.com/questions/1596945/building-osx-app-bundle

Note that we also need to copy resources into Servo.app as well. Here is my directory structure:

.
./Contents
./Contents/Info.plist
./Contents/MacOS
./Contents/MacOS/run-servo
./Contents/MacOS/servo
./Contents/Resources
./Contents/Resources/ahem
./Contents/Resources/ahem/Ahem.ps
./Contents/Resources/ahem/Ahem.sit
./Contents/Resources/ahem/AHEM____.TTF
./Contents/Resources/ahem/COPIED-FROM
./Contents/Resources/ahem/COPYING
./Contents/Resources/ahem/README
./Contents/Resources/ahem.css
./Contents/Resources/android_params
./Contents/Resources/badcert.html
./Contents/Resources/badcert.jpg
./Contents/Resources/cert-google-only
./Contents/Resources/certs
./Contents/Resources/failure.html
./Contents/Resources/hsts_preload.json
./Contents/Resources/iso-8859-8.css
./Contents/Resources/itried.jpg
./Contents/Resources/not-found.html
./Contents/Resources/prefs.json
./Contents/Resources/presentational-hints.css
./Contents/Resources/quirks-mode.css
./Contents/Resources/quotes.css
./Contents/Resources/rippy.png
./Contents/Resources/servo.css
./Contents/Resources/servo.icns
./Contents/Resources/shaders
./Contents/Resources/shaders/blend.fs.glsl
./Contents/Resources/shaders/blend.vs.glsl
./Contents/Resources/shaders/blit.fs.glsl
./Contents/Resources/shaders/blit.vs.glsl
./Contents/Resources/shaders/blur.fs.glsl
./Contents/Resources/shaders/blur.vs.glsl
./Contents/Resources/shaders/border.fs.glsl
./Contents/Resources/shaders/border.vs.glsl
./Contents/Resources/shaders/box_shadow.fs.glsl
./Contents/Resources/shaders/box_shadow.vs.glsl
./Contents/Resources/shaders/clear.fs.glsl
./Contents/Resources/shaders/clear.vs.glsl
./Contents/Resources/shaders/debug_color.fs.glsl
./Contents/Resources/shaders/debug_color.vs.glsl
./Contents/Resources/shaders/debug_font.fs.glsl
./Contents/Resources/shaders/debug_font.vs.glsl
./Contents/Resources/shaders/es2_common.fs.glsl
./Contents/Resources/shaders/es2_common.vs.glsl
./Contents/Resources/shaders/filter.fs.glsl
./Contents/Resources/shaders/filter.vs.glsl
./Contents/Resources/shaders/gl3_common.fs.glsl
./Contents/Resources/shaders/gl3_common.vs.glsl
./Contents/Resources/shaders/mask.fs.glsl
./Contents/Resources/shaders/mask.vs.glsl
./Contents/Resources/shaders/quad.fs.glsl
./Contents/Resources/shaders/quad.vs.glsl
./Contents/Resources/shaders/tile.fs.glsl
./Contents/Resources/shaders/tile.vs.glsl
./Contents/Resources/tumbeast.png
./Contents/Resources/user-agent-js
./Contents/Resources/user-agent-js/00.example.js
./Contents/Resources/user-agent.css

Here is the content of run-servo:

#!/bin/bash
echo "${0%/*}/servo"
exec "${0%/*}/servo" -w -b --pref dom.mozbrowser.enable --resources-path "${0%/*}/../Resources" https://browserhtml.github.io/browserhtml/index.html

And here's my Info.plist:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleGetInfoString</key>
<string>Servo</string>
<key>CFBundleExecutable</key>
<string>run-servo</string>
<key>CFBundleIdentifier</key>
<string>org.servo.Servo22</string>
<key>CFBundleName</key>
<string>Servo</string>
<key>CFBundleIconFile</key>
<string>servo.icns</string>
<key>CFBundleShortVersionString</key>
<string>0.0.1</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>NSHighResolutionCapable</key>
<true/>
<key>NSPrincipalClass</key>
<string>NSApplication</string>
</dict>
</plist>

Note that repeatedly running this would make it stop working until I changed CFBundleIdentifier (which is why it has a number after it). the launch daemon seems to cache a bunch of info and wasn't happy with something I was doing. I never did find a total solution for that and just kept working around it by changing the bundle id.

@metajack
Copy link
Contributor

@metajack metajack commented Apr 4, 2016

Here's servo.icns as well.
servo-icns.zip

@paulrouget let me know if you need anything else.

@larsbergstrom
Copy link
Contributor

@larsbergstrom larsbergstrom commented Apr 5, 2016

@edunham The ./mach package command should be incorporated into the Servo nightly planning discussion we were just having :-)

@paulrouget
Copy link
Contributor Author

@paulrouget paulrouget commented May 17, 2016

Note: Glutin might overwrite CFBundleName. See servo/glutin#88

@aneeshusa aneeshusa mentioned this issue May 25, 2016
3 of 5 tasks complete
bors-servo added a commit that referenced this issue May 27, 2016
…brubeck

Fix Android APK building (packaging)

Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data:
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy --faster` does not report any errors
- [ ] These changes help with #10339.

Either:
- [x] There are tests for these changes (android-nightly builder) OR
- [ ] These changes do not require tests because _____

Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process.

I missed this syntax error during my review, and we don't check that
packaging succeeds in regular build suite, but only as a Nightly build.

@larsbergstrom should we run the packaging as part of the regular build? I think it is important that this continue to stay working, especially with #9918. In that case, the only difference with the nightly builder is whether or not to upload to S3.

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/11406)
<!-- Reviewable:end -->
bors-servo added a commit that referenced this issue Jun 2, 2016
Start on Mach package

Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data:
- [ ] `./mach build -d` does not report any errors
  - these changes don't touch anything that mach build touches>
- [ ] `./mach test-tidy --faster` does not report any errors
  - Tidy errors on some dependencies that I think we'll need for real `package` but aren't using for android
- [X] These changes address #9918 (github issue number if applicable).

Either:
- [ ] There are tests for these changes OR
- [x] These changes do not require tests because I don't think Mach has tests yet?

Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process.

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/11210)
<!-- Reviewable:end -->
bors-servo added a commit that referenced this issue Jun 6, 2016
Start on Mach package

Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data:
- [ ] `./mach build -d` does not report any errors
  - these changes don't touch anything that mach build touches>
- [ ] `./mach test-tidy --faster` does not report any errors
  - Tidy errors on some dependencies that I think we'll need for real `package` but aren't using for android
- [X] These changes address #9918 (github issue number if applicable).

Either:
- [ ] There are tests for these changes OR
- [x] These changes do not require tests because I don't think Mach has tests yet?

Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process.

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/11210)
<!-- Reviewable:end -->
@paulrouget
Copy link
Contributor Author

@paulrouget paulrouget commented Jun 21, 2016

P3 -> P1. We will need to that if we want to release a developer preview of Servo + bhtml.

@cbrewster
Copy link
Member

@cbrewster cbrewster commented Jun 28, 2016

I am working on the mac app bundle packager.

@metajack
Copy link
Contributor

@metajack metajack commented Jun 28, 2016

Just a note. I have most of a .msi installer working. I'll put up a branch tomorrow, but currently stuck on what to do about the fontconfig configuration.

@metajack
Copy link
Contributor

@metajack metajack commented Jun 28, 2016

@paulrouget
Copy link
Contributor Author

@paulrouget paulrouget commented Jul 26, 2016

Can this be closed now?

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

Successfully merging a pull request may close this issue.

None yet
5 participants
You can’t perform that action at this time.