Skip to content

./mach package #9918

Closed
Closed

Description

@paulrouget

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.

Activity

  1. metajack commented on Mar 8, 2016

    @metajack
    Collaborator

    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.

  2. paulrouget commented on Mar 21, 2016

    @paulrouget
    ContributorAuthor

    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.

  3. paulrouget commented on Mar 29, 2016

    @paulrouget
    ContributorAuthor
  4. metajack commented on Apr 4, 2016

    @metajack
    Collaborator

    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.

  5. metajack commented on Apr 4, 2016

    @metajack
    Collaborator

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

    @paulrouget let me know if you need anything else.

  6. larsbergstrom commented on Apr 5, 2016

    @larsbergstrom
    Contributor

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

  7. paulrouget commented on May 17, 2016

    @paulrouget
    ContributorAuthor

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

  8. added 3 commits that reference this issue on May 27, 2016
  9. paulrouget commented on Jun 21, 2016

    @paulrouget
    ContributorAuthor

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

  10. cbrewster commented on Jun 28, 2016

    @cbrewster
    Contributor

    I am working on the mac app bundle packager.

  11. metajack commented on Jun 28, 2016

    @metajack
    Collaborator

    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.

  12. paulrouget commented on Jul 26, 2016

    @paulrouget
    ContributorAuthor

    Can this be closed now?

  13. added a commit that references this issue on Aug 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions