diff --git a/.gitignore b/.gitignore index 3303da6..397adde 100644 --- a/.gitignore +++ b/.gitignore @@ -1,39 +1,11 @@ # Binary Files Binaries/ -Intermediate/ # Cargo Files Cargo.lock -# FFI Bindings - -Source/Header.h - -# Packaged Library - -Package/ - -# Visual Studio Project Files - -.vs/ - -*.sln -*.vcxproj -*.csproj -*.filters -*.user - -# CMake Project Files - -Makefile - -# Xcode Project Files - -*.xcodeproj -*.xcworkspace - # Mac OSX .DS_Store diff --git a/.vscode/tasks.json b/.vscode/tasks.json deleted file mode 100644 index 86a8e94..0000000 --- a/.vscode/tasks.json +++ /dev/null @@ -1,37 +0,0 @@ -{ - "version": "2.0.0", - "tasks": [ - { - "label": "Package (Windows)", - "type": "shell", - "command": "python", - "args": [ - "./Scripts/Package.py" - ], - }, - { - "label": "Package (Linux)", - "type": "shell", - "command": "python3", - "args": [ - "./Scripts/Package.py" - ], - }, - { - "label": "Copyright (Windows)", - "type": "shell", - "command": "python", - "args": [ - "./Scripts/Copyright.py" - ], - }, - { - "label": "Copyright (Linux)", - "type": "shell", - "command": "python3", - "args": [ - "./Scripts/Copyright.py" - ], - } - ] -} diff --git a/Bootstrap.ps1 b/Bootstrap.ps1 index 9f28373..2ff34da 100644 --- a/Bootstrap.ps1 +++ b/Bootstrap.ps1 @@ -1,38 +1 @@ #!/usr/bin/env pwsh - -echo "Installing dependencies..." - -cargo install cbindgen - -echo "Generating bindings..." - -cbindgen --config ./Config/Bindings.toml --crate tribufu --output ./Source/Header.h - -# Windows - -if ($IsWindows) -{ - echo "Generating Visual Studio project..." - - & "./Vendor/Premake/Windows/premake5.exe" "vs2019" -} - -# Mac - -elseif ($IsMacOS) -{ - echo "Generating XCode project..." - - sudo chmod +x ./Vendor/Premake/Mac/premake5 - & "./Vendor/Premake/Mac/premake5" "xcode4" -} - -# Linux - -elseif ($IsLinux) -{ - echo "Generating GMake project..." - - sudo chmod +x ./Vendor/Premake/Linux/premake5 - & "./Vendor/Premake/Linux/premake5" "gmake2" -} diff --git a/Bootstrap.sh b/Bootstrap.sh index a2eb205..0617957 100644 --- a/Bootstrap.sh +++ b/Bootstrap.sh @@ -1,28 +1 @@ #!/usr/bin/env sh - -echo "Installing dependencies..." - -cargo install cbindgen - -echo "Generating bindings..." - -cbindgen --config ./Config/Bindings.toml --crate tribufu --output ./Source/Header.h - -# Linux - -if [ "$(expr substr $(uname -s) 1 5)" = "Linux" ] -then - echo "Generating GMake project..." - - sudo chmod +x ./Vendor/Premake/Linux/premake5 - ./Vendor/Premake/Linux/premake5 gmake2 - -# Mac - -elif [ "$(uname)" = "Darwin" ] -then - echo "Generating XCode project..." - - sudo chmod +x ./Vendor/Premake/Mac/premake5 - ./Vendor/Premake/Mac/premake5 xcode4 -fi diff --git a/Cargo.toml b/Cargo.toml index 3d067aa..8a42eaa 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -10,35 +10,19 @@ edition = "2018" publish = true exclude = [ - ".cargo/", ".github/", ".vscode/", - "Config/", "Documentation/", - "Examples/C", - "Examples/Cpp", - "Examples/CSharp", - "Scripts/", - "Vendor/", ".editorconfig", ".gitattributes", - "GenerateProjectFiles.*", - "premake5.lua", "*.code-workspace", + "Bootstrap.ps1", + "Bootstrap.sh", ] [lib] name="TribuFu" -crate-type = ["staticlib", "cdylib", "rlib"] +crate-type = ["rlib"] path = "Source/TribuFu.rs" [dependencies] -libc = "0.2.0" -tokio = { version = "1.2.0", features = ["full"] } -reqwest = { version = "0.11.1", features = ["blocking", "json"] } -serde = { version = "1.0", features = ["derive"] } -serde_json = "1.0" - -[[example]] -name="Hello" -path = "Examples/Rust/Hello.rs" diff --git a/Config/Bindings.toml b/Config/Bindings.toml deleted file mode 100644 index fbd8584..0000000 --- a/Config/Bindings.toml +++ /dev/null @@ -1,113 +0,0 @@ -# This is a template cbindgen.toml file with all of the default values. -# Some values are commented out because their absence is the real default. -# -# See https://github.com/eqrion/cbindgen/blob/master/docs.md#cbindgentoml -# for detailed documentation of every option here. - -language = "C" - -############## Options for Wrapping the Contents of the Header ################# - -header = "// Copyright (c) TribuFu. All Rights Reserved" -# trailer = "/* Text to put at the end of the generated file */" -# include_guard = "my_bindings_h" -pragma_once = true -# autogen_warning = "/* Warning, this file is autogenerated by cbindgen. Don't modify this manually. */" -include_version = false -namespace = "TribuFu" -namespaces = [] -using_namespaces = [] -sys_includes = [] -includes = [] -no_includes = false -cpp_compat = true - -# A list of lines to add verbatim after the includes block -after_includes = "\n#define TRIBUFU_SDK 1" - -############################ Code Style Options ################################ - -braces = "NextLine" -line_length = 100 -tab_width = 4 -line_endings = "LF" # also "CR", "CRLF", "Native" - -############################# Codegen Options ################################## - -style = "tag" -sort_by = "Name" # default for `fn.sort_by` and `const.sort_by` -usize_is_size_t = true - -[defines] -# "target_os = freebsd" = "DEFINE_FREEBSD" -# "feature = serde" = "DEFINE_SERDE" - -[export] -include = [] -exclude = [] -# prefix = "CAPI_" -item_types = [] -renaming_overrides_prefixing = false - -[export.rename] - -[export.body] - -[export.mangle] - -[fn] -# rename_args = "PascalCase" -# must_use = "MUST_USE_FUNC" -# no_return = "NO_RETURN" -# prefix = "START_FUNC" -# postfix = "END_FUNC" -args = "auto" -sort_by = "Name" - -[struct] -# rename_fields = "PascalCase" -# must_use = "MUST_USE_STRUCT" -derive_constructor = false -derive_eq = false -derive_neq = false -derive_lt = false -derive_lte = false -derive_gt = false -derive_gte = false - -[enum] -# rename_variants = "PascalCase" -# must_use = "MUST_USE_ENUM" -add_sentinel = false -prefix_with_name = false -derive_helper_methods = false -derive_const_casts = false -derive_mut_casts = false -# cast_assert_name = "ASSERT" -derive_tagged_enum_destructor = false -derive_tagged_enum_copy_constructor = false -enum_class = true -private_default_tagged_enum_constructor = false - -[const] -allow_static_const = true -allow_constexpr = false -sort_by = "Name" - -[macro_expansion] -bitflags = false - -############## Options for How Your Rust library Should Be Parsed ############## - -[parse] -parse_deps = false -# include = [] -exclude = [] -clean = false -extra_bindings = [] - -[parse.expand] -crates = [] -all_features = false -default_features = true -features = [] diff --git a/TribuFu.code-workspace b/DevKit.code-workspace similarity index 100% rename from TribuFu.code-workspace rename to DevKit.code-workspace diff --git a/Examples/C/Hello.c b/Examples/C/Hello.c deleted file mode 100644 index 061e899..0000000 --- a/Examples/C/Hello.c +++ /dev/null @@ -1,12 +0,0 @@ -// Copyright (c) TribuFu. All Rights Reserved - -#include "stdio.h" - -#include "TribuFu.h" - -extern int32_t Hello(void); - -int main() -{ - printf("TribuFu SDK = %d\n", Hello()); -} diff --git a/Examples/CSharp/Hello.cs b/Examples/CSharp/Hello.cs deleted file mode 100644 index d820216..0000000 --- a/Examples/CSharp/Hello.cs +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) TribuFu. All Rights Reserved - -using System; -using System.Runtime.InteropServices; - -namespace CSharp -{ - class Program - { - #if WINDOWS_PLATFORM - const string TribuFu = "TribuFu"; - #else - const string TribuFu = "libTribuFu"; - #endif - - [DllImport(TribuFu)] - public static extern int Hello(); - - public static void Main(string[] args) - { - Console.WriteLine("TribuFu SDK = " + Hello()); - } - } -} diff --git a/Examples/Cpp/Hello.cpp b/Examples/Cpp/Hello.cpp deleted file mode 100644 index 2b22e97..0000000 --- a/Examples/Cpp/Hello.cpp +++ /dev/null @@ -1,14 +0,0 @@ -// Copyright (c) TribuFu. All Rights Reserved - -#include - -#include "TribuFu.h" - -using namespace std; - -extern int32_t Hello(); - -int main() -{ - cout << "TribuFu SDK = " << (int)TribuFu::Hello() << "\n"; -} diff --git a/Examples/Rust/Hello.rs b/Examples/Rust/Hello.rs deleted file mode 100644 index 3130d3d..0000000 --- a/Examples/Rust/Hello.rs +++ /dev/null @@ -1,10 +0,0 @@ - -// Copyright (c) TribuFu. All Rights Reserved - -#![allow(dead_code)] -#![allow(unused_variables)] -#![allow(non_snake_case)] - -fn main() { - println!("TribuFu SDK = {}", TribuFu::Hello()); -} diff --git a/README.md b/README.md index 2213938..ec4c3fe 100644 --- a/README.md +++ b/README.md @@ -1,3 +1 @@ # TribuFu SDK - -SDK for games and apps access TribuFu services. diff --git a/Scripts/Package.py b/Scripts/Package.py deleted file mode 100644 index 191352e..0000000 --- a/Scripts/Package.py +++ /dev/null @@ -1,67 +0,0 @@ -# Copyright (c) TribuFu. All Rights Reserved - -import os -import subprocess -import platform -import shutil - -from pathlib import Path - -Path("./Package/Include").mkdir(parents=True, exist_ok=True) -Path("./Package/Library").mkdir(parents=True, exist_ok=True) - -shutil.copy2("./Source/TribuFu.h", "./Package/Include/TribuFu.h") - -if platform.system() == "Windows": - Path("./Package/Library/Windows").mkdir(parents=True, exist_ok=True) - - shutil.copy2("./Binaries/release/TribuFu.dll", "./Package/Library/Windows/TribuFu.dll") - shutil.copy2("./Binaries/release/TribuFu.dll.lib", "./Package/Library/Windows/TribuFu.dll.lib") - shutil.copy2("./Binaries/release/TribuFu.lib", "./Package/Library/Windows/TribuFu.lib") - - subprocess.check_call( - [ - "./Vendor/rcedit.exe", - "./Package/Library/Windows/TribuFu.dll", - "--set-file-version", - "0.0.1", - "--set-product-version", - "0.0.1", - "--set-version-string", - "CompanyName", - "TribuFu", - "--set-version-string", - "FileDescription", - "SDK for games and apps access TribuFu services.", - "--set-version-string", - "FileVersion", - "0.0.1", - "--set-version-string", - "InternalName", - "SDK", - "--set-version-string", - "LegalCopyright", - "Copyright (c) TribuFu. All Rights Reserved", - "--set-version-string", - "OriginalFilename", - "TribuFu.dll", - "--set-version-string", - "ProductName", - "TribuFu SDK", - "--set-version-string", - "ProductVersion", - "0.0.1", - ] - ) - -elif platform.system() == "Linux": - Path("./Package/Library/Linux").mkdir(parents=True, exist_ok=True) - - shutil.copy2("./Binaries/release/libTribuFu.so", "./Package/Library/Linux/libTribuFu.so") - shutil.copy2("./Binaries/release/libTribuFu.a", "./Package/Library/Linux/libTribuFu.a") - -elif platform.system() == "Mac": - Path("./Package/Library/Mac").mkdir(parents=True, exist_ok=True) - - shutil.copy2("./Binaries/release/libTribuFu.dylib", "./Package/Library/Mac/libTribuFu.dylib") - shutil.copy2("./Binaries/release/libTribuFu.a", "./Package/Library/Mac/libTribuFu.a") diff --git a/Source/Account/Auth.rs b/Source/Account/Auth.rs deleted file mode 100644 index c89778c..0000000 --- a/Source/Account/Auth.rs +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) TribuFu. All Rights Reserved - -use libc::c_char; - -pub fn Login(name: *const c_char, password: *const c_char) {} - -pub fn Logout() {} - -pub fn Refresh() {} - -pub fn Register(name: *const c_char, email: *const c_char, password: *const c_char) {} - -mod External { - use libc::c_char; - - #[no_mangle] - pub extern "C" fn Login(name: *const c_char, password: *const c_char) { - super::Login(name, password); - } - - #[no_mangle] - pub extern "C" fn Logout() { - super::Logout(); - } - - #[no_mangle] - pub extern "C" fn Refresh() { - super::Refresh(); - } - - #[no_mangle] - pub extern "C" fn Register(name: *const c_char, email: *const c_char, password: *const c_char) { - super::Register(name, email, password); - } -} diff --git a/Source/Account/Device.rs b/Source/Account/Device.rs deleted file mode 100644 index 4b48e06..0000000 --- a/Source/Account/Device.rs +++ /dev/null @@ -1,21 +0,0 @@ -// Copyright (c) TribuFu. All Rights Reserved - -use libc::c_char; - -pub fn GetDevice(id: *const c_char) {} - -pub fn GetUserDevices(id: *const c_char) {} - -mod External { - use libc::c_char; - - #[no_mangle] - pub extern "C" fn GetDevice(id: *const c_char) { - super::GetDevice(id); - } - - #[no_mangle] - pub extern "C" fn GetUserDevices(id: *const c_char) { - super::GetUserDevices(id); - } -} diff --git a/Source/Account/Email.rs b/Source/Account/Email.rs deleted file mode 100644 index d45046e..0000000 --- a/Source/Account/Email.rs +++ /dev/null @@ -1,21 +0,0 @@ -// Copyright (c) TribuFu. All Rights Reserved - -use libc::c_char; - -pub fn GetEmail(address: *const c_char) {} - -pub fn GetUserEmails(id: *const c_char) {} - -mod External { - use libc::c_char; - - #[no_mangle] - pub extern "C" fn GetEmail(address: *const c_char) { - super::GetEmail(address); - } - - #[no_mangle] - pub extern "C" fn GetUserEmails(id: *const c_char) { - super::GetUserEmails(id); - } -} diff --git a/Source/Account/Role.rs b/Source/Account/Role.rs deleted file mode 100644 index b4f3a12..0000000 --- a/Source/Account/Role.rs +++ /dev/null @@ -1,21 +0,0 @@ -// Copyright (c) TribuFu. All Rights Reserved - -use libc::c_char; - -pub fn GetRole(id: *const c_char) {} - -pub fn GetUserRoles(id: *const c_char) {} - -mod External { - use libc::c_char; - - #[no_mangle] - pub extern "C" fn GetRole(id: *const c_char) { - super::GetRole(id); - } - - #[no_mangle] - pub extern "C" fn GetUserRoles(id: *const c_char) { - super::GetUserRoles(id); - } -} diff --git a/Source/Account/User.rs b/Source/Account/User.rs deleted file mode 100644 index dfe0124..0000000 --- a/Source/Account/User.rs +++ /dev/null @@ -1,14 +0,0 @@ -// Copyright (c) TribuFu. All Rights Reserved - -use libc::c_char; - -pub fn GetUser(id: *const c_char) {} - -mod External { - use libc::c_char; - - #[no_mangle] - pub extern "C" fn GetUser(id: *const c_char) { - super::GetUser(id); - } -} diff --git a/Source/Account/mod.rs b/Source/Account/mod.rs deleted file mode 100644 index 5bf7569..0000000 --- a/Source/Account/mod.rs +++ /dev/null @@ -1,6 +0,0 @@ -// Copyright (c) TribuFu. All Rights Reserved - -pub mod Auth; -pub mod Device; -pub mod Role; -pub mod User; diff --git a/Source/Friends/mod.rs b/Source/Friends/mod.rs deleted file mode 100644 index 2f6e24d..0000000 --- a/Source/Friends/mod.rs +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) TribuFu. All Rights Reserved - -use libc::c_char; - -pub fn AddFriend(id1: *const c_char, id2: *const c_char) {} - -pub fn AcceptFriend(id1: *const c_char, id2: *const c_char) {} - -pub fn GetFriends(id: *const c_char) {} - -mod External { - use libc::c_char; - - #[no_mangle] - pub extern "C" fn AddFriend(id1: *const c_char, id2: *const c_char) { - super::AddFriend(id1, id2); - } - - #[no_mangle] - pub extern "C" fn AcceptFriend(id1: *const c_char, id2: *const c_char) { - super::AcceptFriend(id1, id2); - } - - #[no_mangle] - pub extern "C" fn GetFriends(id: *const c_char) { - super::GetFriends(id); - } -} diff --git a/Source/Matchmaking/mod.rs b/Source/Matchmaking/mod.rs deleted file mode 100644 index e11b080..0000000 --- a/Source/Matchmaking/mod.rs +++ /dev/null @@ -1,17 +0,0 @@ -// Copyright (c) TribuFu. All Rights Reserved - -pub fn InviteToTeam() {} - -pub fn EnterTeam() {} - -mod External { - #[no_mangle] - pub extern "C" fn InviteToTeam() { - super::InviteToTeam(); - } - - #[no_mangle] - pub extern "C" fn EnterTeam() { - super::EnterTeam(); - } -} diff --git a/Source/Messages/mod.rs b/Source/Messages/mod.rs deleted file mode 100644 index 21cd2db..0000000 --- a/Source/Messages/mod.rs +++ /dev/null @@ -1,14 +0,0 @@ -// Copyright (c) TribuFu. All Rights Reserved - -use libc::c_char; - -pub fn GetMessage(id: *const c_char) {} - -mod External { - use libc::c_char; - - #[no_mangle] - pub extern "C" fn GetMessage(id: *const c_char) { - super::GetMessage(id); - } -} diff --git a/Source/TribuFu.h b/Source/TribuFu.h deleted file mode 100644 index 1bffd29..0000000 --- a/Source/TribuFu.h +++ /dev/null @@ -1,61 +0,0 @@ -// Copyright (c) TribuFu. All Rights Reserved - -#pragma once - -#include -#include -#include -#include -#include - -#define TRIBUFU_SDK 1 - -#ifdef __cplusplus -namespace TribuFu -{ -#endif - -#ifdef __cplusplus - extern "C" - { -#endif - - void AcceptFriend(const char *id1, const char *id2); - - void AddFriend(const char *id1, const char *id2); - - void EnterTeam(void); - - void GetDevice(const char *id); - - void GetFriends(const char *id); - - void GetMessage(const char *id); - - void GetRole(const char *id); - - void GetUser(const char *id); - - void GetUserDevices(const char *id); - - void GetUserRoles(const char *id); - - int32_t Hello(void); - - void InviteToTeam(void); - - void Login(const char *name, const char *password); - - void Logout(void); - - void Refresh(void); - - void Register(const char *name, const char *email, const char *password); - -#ifdef __cplusplus - } -#endif - -#ifdef __cplusplus -} -#endif diff --git a/Source/TribuFu.rs b/Source/TribuFu.rs index bd8c39f..0140541 100644 --- a/Source/TribuFu.rs +++ b/Source/TribuFu.rs @@ -1,15 +1,11 @@ // Copyright (c) TribuFu. All Rights Reserved -#![allow(dead_code)] -#![allow(unused_variables)] +//! TribuFu SDK. + #![allow(non_snake_case)] -pub mod Account; -pub mod Friends; -pub mod Matchmaking; -pub mod Messages; +pub const VERSION: &str = env!("CARGO_PKG_VERSION"); -#[no_mangle] -pub extern "C" fn Hello() -> i32 { - return 1; +pub fn Hello(input: String) -> String { + return format!("Hello {}", input); } diff --git a/Vendor/Premake/LICENSE.txt b/Vendor/Premake/LICENSE.txt deleted file mode 100644 index f445f59..0000000 --- a/Vendor/Premake/LICENSE.txt +++ /dev/null @@ -1,27 +0,0 @@ -Copyright (c) 2003-2019 Jason Perkins and individual contributors. -All rights reserved. - -Redistribution and use in source and binary forms, with or without modification, -are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. Neither the name of Premake nor the names of its contributors may be - used to endorse or promote products derived from this software without - specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE -FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, -OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Vendor/Premake/Linux/premake5 b/Vendor/Premake/Linux/premake5 deleted file mode 100644 index 2fd412d..0000000 Binary files a/Vendor/Premake/Linux/premake5 and /dev/null differ diff --git a/Vendor/Premake/Mac/premake5 b/Vendor/Premake/Mac/premake5 deleted file mode 100644 index d192618..0000000 Binary files a/Vendor/Premake/Mac/premake5 and /dev/null differ diff --git a/Vendor/Premake/Windows/premake5.exe b/Vendor/Premake/Windows/premake5.exe deleted file mode 100644 index f081fe1..0000000 Binary files a/Vendor/Premake/Windows/premake5.exe and /dev/null differ diff --git a/Vendor/rcedit.exe b/Vendor/rcedit.exe deleted file mode 100644 index 36764c6..0000000 Binary files a/Vendor/rcedit.exe and /dev/null differ diff --git a/premake5.lua b/premake5.lua deleted file mode 100644 index dec0093..0000000 --- a/premake5.lua +++ /dev/null @@ -1,138 +0,0 @@ -workspace "TribuFu" - architecture "x64" - - configurations - { - "debug", - "release" - } - -outputDir = "%{cfg.buildcfg}" - -project "Cpp" - location "Examples/Cpp" - kind "ConsoleApp" - language "C++" - - targetdir ("Binaries/" .. outputDir) - objdir ("Intermediate/") - - files - { - "Examples/%{prj.name}/**.h", - "Examples/%{prj.name}/**.cpp", - } - - includedirs - { - "Source" - } - - libdirs - { - "Binaries/%{cfg.buildcfg}" - } - - filter "system:windows" - staticruntime "On" - systemversion "latest" - - links - { - "TribuFu.lib" - } - - filter { "system:windows", "configurations:debug" } - runtime "Debug" - buildoptions "/MDd" - symbols "on" - - filter { "system:windows", "configurations:release" } - runtime "Release" - buildoptions "/MD" - optimize "on" - -project "C" - location "Examples/C" - kind "ConsoleApp" - language "C" - - targetdir ("Binaries/" .. outputDir) - objdir ("Intermediate/") - - files - { - "Examples/%{prj.name}/**.h", - "Examples/%{prj.name}/**.c", - } - - includedirs - { - "Source" - } - - libdirs - { - "Binaries/%{cfg.buildcfg}" - } - - filter "system:windows" - staticruntime "On" - systemversion "latest" - - links - { - "TribuFu.lib" - } - - filter { "system:windows", "configurations:debug" } - runtime "Debug" - buildoptions "/MDd" - symbols "on" - - filter { "system:windows", "configurations:release" } - runtime "Release" - buildoptions "/MD" - optimize "on" - -project "CSharp" - location "Examples/CSharp" - kind "ConsoleApp" - language "C#" - - targetdir ("Binaries/" .. outputDir) - objdir ("Intermediate/") - - files - { - "Examples/%{prj.name}/**.cs", - } - - includedirs - { - "Source" - } - - libdirs - { - "Binaries/%{cfg.buildcfg}" - } - - filter "system:windows" - staticruntime "On" - systemversion "latest" - - defines - { - "WINDOWS_PLATFORM" - } - - filter { "system:windows", "configurations:debug" } - runtime "Debug" - buildoptions "/MDd" - symbols "on" - - filter { "system:windows", "configurations:release" } - runtime "Release" - buildoptions "/MD" - optimize "on"