LoginSignup
2
0

More than 5 years have passed since last update.

F#でどこでもビルド〜、みたいな

Last updated at Posted at 2019-03-21

Summary

スクリプトファイル(fsx)をビルドする

つまりはexeファイルを作る

どこでも同じexeファイルをつくる

たとえば、自分のパソコンとかトラビスとか

結論

noframeworkでいく

こんな感じ


function create_exe_file () {

    local corlib="packages/NETStandard.Library/build/netstandard2.0/ref/mscorlib.dll"
    local runtime="packages/NETStandard.Library/build/netstandard2.0/ref/System.Runtime.dll"
    local netstandard="packages/NETStandard.Library/build/netstandard2.0/ref/netstandard.dll"
    local fsharpCore="packages/FSharp.Core/lib/net45/FSharp.Core.dll"


    local arr=(
        "${FSX_PATH}"
        --nologo
        --simpleresolution
        --out:./bin/$(basename "${FSX_PATH}" .fsx).exe
        --noframework
        --reference:$corlib
        --reference:$runtime
        --reference:$netstandard
        --reference:$fsharpCore
        ### ===== enable print debug =====
        # --define:DEBUG
        ### ===== crete debug symbol file (.mdb) =====
        # --debug+
        # --optimize-
    )
    fsharpc "${arr[@]}"
}

ポイント

fsharp.coreが揃えばなんとかなる(かも)

2
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
0