Skip to content

amnykon/SUI-old

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

87 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Installation

  1. Clone this repository
git clone https://github.com/amnykon/SUI
  1. Install SDL2 via Homebrew
brew install sdl2 sdl2_gfx sdl2_ttf sdl2_image
  1. Run the codegenerate script
cd SUI
./codegenerate.sh
  1. Open module.modulemap in your preferred text editor
vim .build/checkouts/CSDL2.swift.git-84403830401767267/module.modulemap
  1. Replace all headers with: /usr/local/include/

  2. Open Package.swift in your preferred text editor

vim .build/checkouts/CSDL2.swift.git-84403830401767267/Package.swift
  1. Add pkgconfig: "sdl2" between name and targets
let package = Package(
      name: "CSDL2",
      pkgConfig: "sdl2",
      targets: [],
      dependencies: []
)
  1. Open sdl2.pc in your preferred text editor
vim /usr/local/lib/pkgconfig/sdl2.pc
  1. On line 15 remove: -D_THREAD_SAFE

  2. Run the codegenerate script

./codegenerate.sh
  1. Build
swift build

Usage

Run Tests

swift test

Start Demo

.build/debug/SdlSuiDemo

About

Swift User Interface

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published