Skip to content

Commit

Permalink
introduced ruby23 for osx (to avoid some crash found on sierra).
Browse files Browse the repository at this point in the history
  • Loading branch information
KojiNakamaru committed May 26, 2017
1 parent ed17857 commit 0d27bf5
Show file tree
Hide file tree
Showing 18 changed files with 229 additions and 117 deletions.
25 changes: 12 additions & 13 deletions INSTALL.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,32 +8,31 @@ themselves are built under build/{osx,win}/runtime.

### Mac OS X

1. Install gcc (https://github.com/kennethreitz/osx-gcc-installer/) if
you don't have any (such as those come with Xcode).
2. Install rvm (https://rvm.io/rvm/install/).
1. Install Xcode and its command line tools.
2. Install Homebrew (https://brew.sh/).
3. Follow the steps below:

rvm install 1.9.3
rvm 1.9.3
brew install rbenv ruby-build
rbenv install 2.3.4
bundle install --no-cache

### Mac OS X (JRuby)

1. Install rvm (https://rvm.io/rvm/install/).
2. Follow the steps below:
1. Install Xcode and its command line tools.
2. Install Homebrew (https://brew.sh/).
3. Follow the steps below:

rvm install jruby
rvm jruby
brew install rbenv ruby-build
rbenv install jruby-1.7.26
bundle install --no-cache

### Linux

1. Install gcc
2. Install rvm (https://rvm.io/rvm/install/).
2. Install rbenv and ruby-build (cf. https://github.com/rbenv/rbenv#readme, https://github.com/rbenv/ruby-build#readme).
3. Follow the steps below:

rvm install 1.9.3
rvm 1.9.3
rbenv install 2.3.4
bundle install --no-cache

### Windows
Expand Down Expand Up @@ -230,7 +229,7 @@ vendor/cache/libxml-ruby-\*.gem
(https://github.com/KojiNakamaru/libxml-ruby/tree/develop) is utilized
to accelerate parsing xml data. This is a variant of the original
libxml-ruby-\*.gem to be built for both Windows MinGW ruby and Mac
OS X rvm ruby.
OS X rbenv ruby.

### ActionCompiler

Expand Down
14 changes: 7 additions & 7 deletions build/osx/LWFS/.a/start-remote.sh
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
#!/bin/bash

BASE=`dirname "$0"`
BASE="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"

# ruby environment
RBH="$BASE/ruby19"
export PATH="$RBH/bin:$RBH/lib/ruby/gems/1.9.1/bin:/usr/bin:/bin:/usr/sbin:/sbin"
RBH="$BASE/ruby23"
export PATH="$RBH/bin:/usr/bin:/bin:/usr/sbin:/sbin"
if [ -n "$DYLD_LIBRARY_PATH" ]; then
export DYLD_LIBRARY_PATH="$RBH/lib:$DYLD_LIBRARY_PATH"
else
export DYLD_LIBRARY_PATH="$RBH/lib"
fi
export RUBYOPT='-Ku'
export RUBYLIB="$RBH/lib/ruby/1.9.1:$RBH/lib/ruby/1.9.1/i386-darwin10.8.0"
export GEM_HOME="$RBH/gems"
export GEM_PATH="$RBH/gems:$RBH/lib/ruby/1.9.1"
export RUBYLIB="$RBH/lib/ruby/2.3.0:$RBH/lib/ruby/2.3.0/i386-darwin10.8.0"
export GEM_HOME="$RBH/lib/ruby/gems/2.3.0"
export GEM_PATH="$RBH/lib/ruby/gems/2.3.0:$RBH/lib/ruby/2.3.0"
unset IRBRC
unset MAGLEV_HOME
unset RBXOPT
Expand All @@ -33,4 +33,4 @@ fi
# app
cd "$BASE/lwfs"
#ruby lwfs.rb
ruby "$RBH/gems/bin/rackup" lwfs.ru
ruby "$RBH/bin/rackup" lwfs.ru
14 changes: 7 additions & 7 deletions build/osx/LWFS/.a/start.sh
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
#!/bin/bash

BASE=`dirname "$0"`
BASE="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"

# ruby environment
RBH="$BASE/ruby19"
export PATH="$RBH/bin:$RBH/lib/ruby/gems/1.9.1/bin:/usr/bin:/bin:/usr/sbin:/sbin"
RBH="$BASE/ruby23"
export PATH="$RBH/bin:/usr/bin:/bin:/usr/sbin:/sbin"
if [ -n "$DYLD_LIBRARY_PATH" ]; then
export DYLD_LIBRARY_PATH="$RBH/lib:$DYLD_LIBRARY_PATH"
else
export DYLD_LIBRARY_PATH="$RBH/lib"
fi
export RUBYOPT='-Ku'
export RUBYLIB="$RBH/lib/ruby/1.9.1:$RBH/lib/ruby/1.9.1/i386-darwin10.8.0"
export GEM_HOME="$RBH/gems"
export GEM_PATH="$RBH/gems:$RBH/lib/ruby/1.9.1"
export RUBYLIB="$RBH/lib/ruby/2.3.0:$RBH/lib/ruby/2.3.0/i386-darwin10.8.0"
export GEM_HOME="$RBH/lib/ruby/gems/2.3.0"
export GEM_PATH="$RBH/lib/ruby/gems/2.3.0:$RBH/lib/ruby/2.3.0"
unset IRBRC
unset MAGLEV_HOME
unset RBXOPT
Expand All @@ -33,4 +33,4 @@ fi
# app
cd "$BASE/lwfs"
#ruby lwfs.rb
ruby "$RBH/gems/bin/rackup" lwfs.ru
ruby "$RBH/bin/rackup" lwfs.ru
4 changes: 2 additions & 2 deletions build/osx/Makefile
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
build: testtag clean
mkdir -p tmp/LWFS
cp -a LWFS tmp/LWFS/LWFS
cp -a README*.txt *.app tmp/LWFS
unzip -q ruby19.zip -d tmp/LWFS/LWFS/.a
cp -a README*.txt *.app fix-file-permissions tmp/LWFS
unzip -q ruby23.zip -d tmp/LWFS/LWFS/.a
mkdir -p tmp/LWFS/LWFS/.a/lwfs
cp -a ../../{lib,lwfs.rb,lwfs.ru,lwfs.conf,tmpl} tmp/LWFS/LWFS/.a/lwfs
find tmp/LWFS -name '.git*' -print0 | xargs -0 rm -rf
Expand Down
46 changes: 37 additions & 9 deletions build/osx/README.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,21 +7,49 @@
Installation
============

1. Open stop.app. This will stop any running LWFS instance.
2. Remove previously installed LWFS applications.
3. Copy this folder onto your drive, such as under /Application.
1. Right-click fix-file-permissions and select "Open." Select "OK" for
the followin dialog:

"fix-file-permissions" is from an unidentified developer. Are you
sure you want to open it?

The terminal then opens and fix-file-permissions starts. Close the
terminal once the following message is displayed:

Process completed

2. Open stop.app. This will stop any running LWFS instance.

3. Remove previously installed LWFS applications.

4. Copy this folder onto your drive, such as under /Application.


Note on recent OS X
-------------------

Note on recent OS X.
------------------
Recent OS X requires an apple script downloaded "to be signed," but
start.app and stop.app here are not signed. For now after extracting
LWFS*.zip, please execute below on the terminal:
start.app and stop.app here are not signed so the following message
will be displayed if we try to open start.app, for example:

xattr -d -r com.apple.quarantine LWFS
"start" is damaged and can't be opened. You should move it to the
Trash.

The above fix-file-permissions fixes this issue by adjusting file
attributes.

Start/Stop LWFS
===============

* Open start.app to start LWFS.
* Open start.app or start-remote.app. This starts LWFS and open a
browser.

* If you open start.app, the browser will connect to the web server
that LWFS invokes on the local PC. You can work even if you are
offline.

* If you open start-remote.app, the browser will connect to the
common remote web server. You can easily share conversion results
with others.

* Open stop.app to stop LWFS.
41 changes: 32 additions & 9 deletions build/osx/README_ja.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,23 +7,46 @@
インストール
==========

1. stop.appを開きます。これで現在動作しているLWFSが停止します。
2. 前にインストールしたLWFSを削除します。
3. このフォルダを例えば/Applicationの下にコピーします。
1. fix-file-permissionsを右クリックして「開く」を選びます。

"fix-file-permissions"の開発元は未確認です。開いてもよろしいですか?

と表示されたら、OKを押します。すると、ターミナルが開いて
fix-file-permissionsが起動します。

プロセスが完了しました

と表示されたらターミナルを閉じます。

2. stop.appを開きます。これで現在動作しているLWFSが停止します。

3. 前にインストールしたLWFSを削除します。

4. このフォルダを/Applicationなどの下にコピーします。

最近のOS Xについて
----------------

最近のOS Xは、ダウンロードされたアップルスクリプトについて、”署名されて
いる"ことを要求しますが、ここにあるstart.appおよびstop.appは署名されて
いません。当面はLWFS*.zipを展開した後、次のコマンドをターミナルで実行し
てください。
最近のOS Xは、ダウンロードされたアップルスクリプトについて、”署名され
ている"ことを要求しますが、ここにあるstart.appおよびstop.appは署名され
ておらず、実行しようとすると

"start"は壊れているため開けません。"ゴミ箱"に入れる必要があります。

xattr -d -r com.apple.quarantine LWFS
というように表示され、実行できません。上記のfix-file-permissionsは、こ
の問題を解決するため、ファイルの属性を調整するものです。


LWFSの開始/停止
==============

* start.appを開くとLWFSが開始します。
* start.app/start-remote.appのいずれかを開くとLWFSが開始し、ブラウザが
開きます。

* start.appの場合は、ローカルなPC上でLWFSが立ち上げるウェブサーバに
繋がります。ネットワークにつながっていない状態でも作業が可能です。

* start-remote.appの場合は、共通のリモートサーバに繋がります。複数人
で変換結果を確認するのに便利です。

* stop.appを開くとLWFSが停止します。
5 changes: 5 additions & 0 deletions build/osx/fix-file-permissions
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/bin/bash
export PATH=/usr/bin:/bin:/usr/sbin:/sbin
cd "$(dirname "${BASH_SOURCE[0]}")"
xattr -d -r com.apple.metadata:kMDItemWhereFroms .
xattr -d -r com.apple.quarantine .
Binary file renamed build/osx/ruby19.zip → build/osx/ruby23.zip
Binary file not shown.
Loading

0 comments on commit 0d27bf5

Please sign in to comment.