# Mac OS X
### Setup development environment
1. Install xcode
1.
Install macports
Modify file `/opt/local/share/macports/Tcl/port1.0/portconfigure.tcl`, change the line
~~~
default configure.ldflags {-L${prefix}/lib}
~~~
to
~~~
default configure.ldflags {"-L${prefix}/lib -Xlinker -headerpad_max_install_names"}
~~~
1.
Install following libraries and tools using `port`
~~~
autoconf,intltool,automake, pkgconfig,libtool,glib2,ossp-uuid,libevent,vala,openssl, git-core
~~~
1.
Install python
~~~
port install python27
port select python python27
export PATH=/opt/local/Library/Frameworks/Python.framework/Versions/2.7/bin:$PATH
~~~
Then download and install pip from [http://pypi.python.org/pypi/pip](http://pypi.python.org/pypi/pip)
1.
Set pkg config environment
~~~
export PKG_CONFIG_PATH=/opt/local/lib/pkgconfig:/usr/local/lib/pkgconfig
~~~
### Compiling libsearpc
Download [libsearpc](https://github.com/haiwen/libsearpc), then:
~~~
./autogen.sh
LDFLAGS="-Xlinker -headerpad_max_install_names" ./configure
make
sudo make install
~~~
### Compiling ccnet
Download [ccnet](https://github.com/haiwen/ccnet), then:
~~~
./autogen.sh
CFLAGS="-Wall" LDFLAGS="-L/opt/local/lib -Xlinker -headerpad_max_install_names" ./configure
make
sudo make install
~~~
### Compiling seafile
1. Download [seafile](https://github.com/haiwen/seafile)
1.
Install python libs and tools
~~~
sudo pip-2.7 install py2app web.py mako simplejson
~~~
1.
Compile
~~~
./autogen.sh
LDFLAGS="-L/opt/local/lib -Xlinker -headerpad_max_install_names -framework CoreServices" ./configure
make
sudo make install
~~~
### Packaging
1.
seafileweb. First setup python path:
~~~
export PYTHONPATH=.:/usr/local/lib/python2.7/site-packages
~~~
This path is where pyccnet and pysearpc installed.
~~~
./setupmac.sh web
~~~
This will generate `seafileweb.app`, and copy it to `gui/mac/seafile`
1.
ccnet, seaf-daemon:
~~~
./setupmac.sh dylib
~~~
This will copy ccnet, seaf-daemon and other libraries to gui/mac/seafile, and use `install_name_tool` to modify the library paths in ccnet, seaf-daemon.
1.
Compile seafile.app:
~~~
./setupmac.sh 10.6 or ./setupmac.sh 10.7
~~~
After compiling, it will copy seafile.app to `${top_dir}/../seafile-${VERSION}`. You can also compiling seafile.app in xcode.
1.
Go to seafile-${VERSION} and see if it can run correctly.
1.
Construct dmg using dropdmg. Use `dmg-backgroud.jpg` as dmg background, add link of `/Application` to seafile-${VERSION}, then packaging seafile-${VERSION} to seafile-${VERSION}.dmg.
### Problem you may encounter
1. If `install_name_tool` reports "malformed object" "unknown load command", It may be the version of xcode command line tools incompatible with `install_name_tool`.
1. If xcode can't find glib, Corrects xcode's "build settings/search paths/header search".
- 介紹
- 概览
- Seafile 组件
- 研发路线图
- 常见问题解答
- 修改日志
- 我要参与
- Linux 下部署 Seafile 服务器
- 部署 Seafile 服务器(使用 SQLite)
- 部署 Seafile 服务器(使用 MySQL)
- Nginx 下配置 Seahub
- Nginx 下启用 Https
- Apache 下配置 Seahub
- Apache 下启用 Https
- Seafile LDAP 配置
- 开机启动 Seafile
- 防火墙设置
- Logrotate 管理系统日志
- 使用 Memcached
- 使用 NAT
- 非根域名下部署 Seahub
- 从 SQLite 迁移至 MySQL
- 安装常见问题
- 升级
- Windows 下部署 Seafile 服务器
- 下载安装 Windows 版 Seafile 服务器
- 安装 Seafile 为 Windows 服务
- 所用端口说明
- 升级
- 从 Windows 迁移到 Linux
- 垃圾回收
- 部署 Seafile 专业版服务器
- 下载安装 Seafile 专业版服务器
- 从社区版迁移至专业版
- 升级
- Amazon S3 下安装
- OpenStackSwift 下安装
- Ceph 下安装
- 配置选项
- 文件搜索说明
- 集群部署
- 集群中启用搜索和后台服务
- NFS 下集群安装
- 常见问题解答
- 软件许可协议
- 服务器个性化配置
- ccnet.conf
- seafile.conf
- seahub_settings.py
- 发送邮件提醒
- 个性化邮件提醒
- 用户管理
- 存储容量与文件上传/下载大小限制
- 自定义 Web
- 管理员手册
- 账户管理
- 日志
- 备份与恢复
- Seafile FSCK
- Seafile GC
- WebDAV 和 FUSE 扩展
- WebDAV 扩展
- FUSE 扩展
- 安全选项
- 安全特性
- 日志和审计
- 开发文档
- 编译 Seafile
- Linux
- Windows
- Max OS X
- Server
- 开发环境
- 编程规范
- Web API
- Python API
- 数据模型
- 服务器组件
- 同步算法