forked from inkle/ink
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build_release.command
executable file
·23 lines (18 loc) · 1.45 KB
/
build_release.command
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
cd "`dirname "$0"`"
# Build the release code
xbuild /p:Configuration=Release ink.sln
# Create folders
mkdir -p ReleaseBinary
# Windows: Simply zip up inklecate.exe, Newtonsoft.Json.dll and the runtime together
# We rely on a compatible version of .NET being installed on Windows
zip --junk-paths ReleaseBinary/inklecate_windows.zip inklecate/bin/Release/Newtonsoft.Json.dll inklecate/bin/Release/inklecate.exe ink-engine-dll/bin/Release/ink-engine.dll
# Mac: Make a native binary that includes the mono runtime
# Prepare to bundle up compiled binary
export PATH=/Library/Frameworks/Mono.framework/Commands:$PATH
export AS="as -arch i386"
export CC="cc -arch i386 -framework CoreFoundation -lobjc -liconv"
# "Bundles in addition support a –static flag. The –static flag causes mkbundle to generate a static executable that statically links the Mono runtime. Be advised that this option will trigger the LGPL requirement that you still distribute the independent pieces to your user so he can manually upgrade his Mono runtime if he chooses to do so. Alternatively, you can obtain a proprietary license of Mono by contacting Xamarin."
# http://www.mono-project.com/archived/guiderunning_mono_applications/
mkbundle ./inklecate/bin/Release/inklecate.exe --deps --static -o ./ReleaseBinary/inklecate ./ink-engine-runtime/Newtonsoft.Json.dll
zip --junk-paths ReleaseBinary/inklecate_mac.zip ReleaseBinary/inklecate ink-engine-dll/bin/Release/ink-engine.dll
rm ReleaseBinary/inklecate