1 Star 0 Fork 1

upczap/vrpn

forked from ianaxe/vrpn 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
vrpn_WindowsH_generator.lua 1.51 KB
一键复制 编辑 原始数据 按行查看 历史
#!/usr/bin/env lua
--[[
Script to generate an include header wrapping windows.h, defining
symbols to make the include minimal, and undefining to initial state
when done. -- Ryan Pavlik
Copyright 2015 Sensics, Inc.
Distributed under the Boost Software License, Version 1.0.
(See accompanying file LICENSE_1_0.txt or copy at
http://www.boost.org/LICENSE_1_0.txt)
]]
symbols = {"WIN32_LEAN_AND_MEAN", "NOMINMAX", "NOSERVICE", "NOMCX", "NOIME"}
template = {
before = {
"#ifndef ",
"\n#define ",
"\n#define VRPN_",
"\n#endif\n"
};
after = {
"#ifdef VRPN_",
"\n#undef VRPN_",
"\n#undef ",
"\n#endif\n"
}
}
print [[/** @file
@brief Header to minimally include windows.h
@date 2015
@author
Ryan Pavlik
Sensics, Inc.
<http://sensics.com/osvr>
*/
// Copyright 2015 Sensics, Inc.
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
#ifndef INCLUDED_vrpn_WindowsH_h_GUID_97C90BFD_D6C3_4AB3_3272_A10F7448D165
#define INCLUDED_vrpn_WindowsH_h_GUID_97C90BFD_D6C3_4AB3_3272_A10F7448D165
#ifdef _WIN32
]]
for _, symbol in ipairs(symbols) do
print(table.concat(template.before, symbol))
end
print [[
#include <windows.h>
]]
for _, symbol in ipairs(symbols) do
print(table.concat(template.after, symbol))
end
print [[
#endif // _WIN32
#endif // INCLUDED_vrpn_WindowsH_h_GUID_97C90BFD_D6C3_4AB3_3272_A10F7448D165
]]
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
C
1
https://gitee.com/jari/vrpn.git
[email protected]:jari/vrpn.git
jari
vrpn
vrpn
master

搜索帮助