Added missing os.copyfile() function (untested on Posix yet)

This commit is contained in:
starkos 2009-01-08 19:28:45 +00:00
parent 6cb18fe949
commit 4797c6d4bb
3 changed files with 28 additions and 9 deletions

View File

@ -1,5 +1,7 @@
solution "PremakeTestbox"
configurations { "Debug", "Release" }
-- solution level configuration
configuration "Debug"
targetdir "bin/debug"
@ -11,16 +13,31 @@ solution "PremakeTestbox"
flags { "Optimize" }
defines { "NDEBUG" }
-- include all the projects
include "CppConsoleApp"
include "CsConsoleApp"
include "CppWindowedApp"
include "CppSharedLib"
include "CsSharedLib"
include "CppStaticLib"
include "CppConsoleApp"
include "CsConsoleApp"
include "CppWindowedApp"
include "CppSharedLib"
include "CsSharedLib"
include "CppStaticLib"
if _ACTION == "clean" then
os.rmdir("bin")
end
-- add to the built-in clean action
if _ACTION == "clean" then
os.rmdir("bin")
end
-- add a new install action
newaction {
trigger = "install",
description = "Install the project",
execute = function ()
os.copyfile("premake4.lua", "../premake4.lua")
end
}

View File

@ -31,6 +31,7 @@ extern int builtin_sizes[];
/* Built-in functions */
static const luaL_Reg os_functions[] = {
{ "chdir", os_chdir },
{ "copyfile", os_copyfile },
{ "isdir", os_isdir },
{ "getcwd", os_getcwd },
{ "isfile", os_isfile },

View File

@ -46,6 +46,7 @@ int do_isfile(const char* filename);
/* Built-in functions */
int os_chdir(lua_State* L);
int os_copyfile(lua_State* L);
int os_getcwd(lua_State* L);
int os_isdir(lua_State* L);
int os_isfile(lua_State* L);