forked from HeliumProject/Engine
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpremake4.lua
91 lines (70 loc) · 3.56 KB
/
premake4.lua
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
require "Helium"
function PublishBundle( bin )
if os.get() == "windows" then
os.execute("robocopy /njs /nfl /ndl /nc /ns /np /MIR \"Editor\\Icons\\Helium\" \"Bin\\Debug\\Icons\" *.png")
os.execute("robocopy /njs /nfl /ndl /nc /ns /np /MIR \"Editor\\Icons\\Helium\" \"Bin\\Intermediate\\Icons\" *.png")
os.execute("robocopy /njs /nfl /ndl /nc /ns /np /MIR \"Editor\\Icons\\Helium\" \"Bin\\Profile\\Icons\" *.png")
os.execute("robocopy /njs /nfl /ndl /nc /ns /np /MIR \"Editor\\Icons\\Helium\" \"Bin\\Release\\Icons\" *.png")
else
os.execute("mkdir -p Bin/Debug/" .. Helium.GetBundleResourcePath() .. "Icons/")
os.execute("mkdir -p Bin/Intermediate/" .. Helium.GetBundleResourcePath() .. "Icons/")
os.execute("mkdir -p Bin/Profile/" .. Helium.GetBundleResourcePath() .. "Icons/")
os.execute("mkdir -p Bin/Release/" .. Helium.GetBundleResourcePath() .. "Icons/")
os.execute("rsync -a --delete Editor/Icons/Helium/ Bin/Debug/" .. Helium.GetBundleResourcePath() .. "Icons/ --filter='+ */' --filter '+ *.png' --filter='- *'")
os.execute("rsync -a --delete Editor/Icons/Helium/ Bin/Intermediate/" .. Helium.GetBundleResourcePath() .. "Icons/ --filter='+ */' --filter '+ *.png' --filter='- *'")
os.execute("rsync -a --delete Editor/Icons/Helium/ Bin/Profile/" .. Helium.GetBundleResourcePath() .. "Icons/ --filter='+ */' --filter '+ *.png' --filter='- *'")
os.execute("rsync -a --delete Editor/Icons/Helium/ Bin/Release/" .. Helium.GetBundleResourcePath() .. "Icons/ --filter='+ */' --filter '+ *.png' --filter='- *'")
end
if os.get() == "macosx" then
os.copyfile( "Editor/Icons/Helium.icns", "Bin/Debug/" .. Helium.GetBundleResourcePath() )
os.copyfile( "Editor/Icons/Helium.icns", "Bin/Intermediate/" .. Helium.GetBundleResourcePath() )
os.copyfile( "Editor/Icons/Helium.icns", "Bin/Profile/" .. Helium.GetBundleResourcePath() )
os.copyfile( "Editor/Icons/Helium.icns", "Bin/Release/" .. Helium.GetBundleResourcePath() )
os.copyfile( "Info.plist", "Bin/Debug/" .. Helium.GetBundleConfigPath() )
os.copyfile( "Info.plist", "Bin/Intermediate/" .. Helium.GetBundleConfigPath() )
os.copyfile( "Info.plist", "Bin/Profile/" .. Helium.GetBundleConfigPath() )
os.copyfile( "Info.plist", "Bin/Release/" .. Helium.GetBundleConfigPath() )
end
end
-- Select renderer. If no explicit choice of renderer, select by OS.
newoption {
trigger = "gfxapi",
value = "API",
description = "Choose a particular 3D API for rendering",
allowed = {
{ "opengl", "OpenGL" },
{ "direct3d", "Direct3D (Windows only)" },
{ "none", "No Renderer" }
}
}
if not _OPTIONS[ "gfxapi" ] then
if os.get() == "windows" then
_OPTIONS[ "gfxapi" ] = "direct3d"
else
_OPTIONS[ "gfxapi" ] = "opengl"
end
end
-- Do nothing if there is no action (--help, etc...)
if _ACTION then
if _ACTION ~= "clean" then
PublishBundle()
end
solution "Helium"
startproject "Helium-Tools-Editor"
Helium.DoBasicSolutionSettings()
objdir( "Build" )
configuration "Debug"
targetdir( "Bin/Debug/" .. Helium.GetBundleExecutablePath() )
libdirs { "Bin/Debug/" .. Helium.GetBundleExecutablePath() }
configuration "Intermediate"
targetdir( "Bin/Intermediate/" .. Helium.GetBundleExecutablePath() )
libdirs { "Bin/Intermediate/" .. Helium.GetBundleExecutablePath() }
configuration "Profile"
targetdir( "Bin/Profile/" .. Helium.GetBundleExecutablePath() )
libdirs { "Bin/Profile/" .. Helium.GetBundleExecutablePath() }
configuration "Release"
targetdir( "Bin/Release/" .. Helium.GetBundleExecutablePath() )
libdirs { "Bin/Release/" .. Helium.GetBundleExecutablePath() }
dofile "Runtime.lua"
dofile "Tools.lua"
end