Skip to content

Commit

Permalink
Fix build script for ubuntu/windows
Browse files Browse the repository at this point in the history
  • Loading branch information
sol-vin committed Jun 19, 2024
1 parent 4af0bb2 commit ee3eeab
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion rsrc/build-examples/build.cr
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,13 @@ FileUtils.cd("examples") do
FileUtils.cd(path) do
`shards install`

output = `crystal build --release -s -p -t -o ../_build/#{path.basename} ./src/#{path.basename}.cr --link-flags --subsystem,windows`
windows = ""

{% if flag?(:windows) %}
windows = "--subsystem:windows"
{% end %}

output = `crystal build --release -s -p -t -o ../_build/#{path.basename} ./src/#{path.basename}.cr --link-flags #{windows}`

file = "../_build/#{name}"
{% if flag?(:windows) %}
Expand Down

0 comments on commit ee3eeab

Please sign in to comment.