Skip to content

Commit

Permalink
Modify build scripts.
Browse files Browse the repository at this point in the history
  • Loading branch information
n-yoda committed May 14, 2013
1 parent 58edc9b commit 6ad8523
Show file tree
Hide file tree
Showing 15 changed files with 33 additions and 14 deletions.
2 changes: 1 addition & 1 deletion build/Packager/Assets/Editor/Packager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public class Packager
public static void Export()
{
AssetDatabase.ExportPackage(
new string[]{"Assets/Plugins"},
new string[]{"Assets/Plugins", "Assets/WebPlayerTemplates"},
"unity-webview.unitypackage",
ExportPackageOptions.Recurse);
}
Expand Down
Binary file removed build/Packager/ProjectSettings/AudioManager.asset
Binary file not shown.
Binary file removed build/Packager/ProjectSettings/DynamicsManager.asset
Binary file not shown.
Binary file not shown.
Binary file removed build/Packager/ProjectSettings/EditorSettings.asset
Binary file not shown.
Binary file removed build/Packager/ProjectSettings/InputManager.asset
Binary file not shown.
Binary file removed build/Packager/ProjectSettings/NavMeshLayers.asset
Binary file not shown.
Binary file removed build/Packager/ProjectSettings/NetworkManager.asset
Binary file not shown.
Binary file removed build/Packager/ProjectSettings/ProjectSettings.asset
Binary file not shown.
Binary file removed build/Packager/ProjectSettings/QualitySettings.asset
Binary file not shown.
Binary file removed build/Packager/ProjectSettings/TagManager.asset
Binary file not shown.
Binary file removed build/Packager/ProjectSettings/TimeManager.asset
Binary file not shown.
41 changes: 30 additions & 11 deletions build/Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -21,27 +21,44 @@
require 'fileutils'

UNITY="/Applications/Unity/Unity.app/Contents"
SRCDIR="../plugins"
DSTDIR="Packager/Assets/Plugins"

SRCS=%W|
CNT = 2
SRCDIR = Array.new(CNT);
DSTDIR = Array.new(CNT);
SRCS = Array.new(CNT);

SRCDIR[0]="../plugins"
DSTDIR[0]="Packager/Assets/Plugins"
SRCS[0]=%W|
WebViewObject.cs
iOS/WebView.mm
|

DSTDIR[1]="Packager/Assets/WebPlayerTemplates"
SRCDIR[1]="../WebPlayerTemplates"
SRCS[1]=%W|
unity-webview/index.html
unity-webview/thumbnail.png
unity-webview/unity-webview.js
|

task :default => ["build"]

desc "build"
task :build do
FileUtils.rm_rf DSTDIR
FileUtils.mkdir_p DSTDIR
SRCS.each do |src|
dstdir = "#{DSTDIR}/#{File.dirname(src)}"
FileUtils.mkdir_p dstdir
FileUtils.cp "#{SRCDIR}/#{src}", dstdir, {:preserve => true}
DSTDIR.each do |dir|
FileUtils.rm_rf dir
FileUtils.mkdir_p dir
end
CNT.times do |i|
SRCS[i].each do |src|
dstdir = "#{DSTDIR[i]}/#{File.dirname(src)}"
FileUtils.mkdir_p dstdir
FileUtils.cp "#{SRCDIR[i]}/#{src}", dstdir, {:preserve => true}
end
end
["Android", "Mac"].each do |t|
Dir.chdir("#{SRCDIR}/#{t}") do
Dir.chdir("#{SRCDIR[0]}/#{t}") do
system "./install.sh"
end
end
Expand All @@ -61,5 +78,7 @@ end

desc "clean"
task :clean do
FileUtils.rm_rf DSTDIR
DSTDIR.each do |dir|
FileUtils.rm_rf dir
end
end
Binary file modified dist/unity-webview.unitypackage
Binary file not shown.
4 changes: 2 additions & 2 deletions plugins/Mac/install.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/bin/sh
DSTDIR="../../build/Packager/Assets/Plugins"
rm -rf DerivedData
xcodebuild -scheme WebView -configuration Release build
xcodebuild -scheme WebView -configuration Release build CONFIGURATION_BUILD_DIR='DerivedData'
mkdir -p $DSTDIR
cp -r DerivedData/WebView/Build/Products/Release/WebView.bundle $DSTDIR
cp -r DerivedData/WebView.bundle $DSTDIR
rm -rf DerivedData

0 comments on commit 6ad8523

Please sign in to comment.