Blog 2020/5/7
<- previous | index | next ->
Here are some notes on how I set up an installation of OS X Tiger (10.4)
/** | |
* MacEditorTextView | |
* Copyright (c) Thiago Holanda 2020-2021 | |
* https://twitter.com/tholanda | |
* | |
* MIT license | |
*/ | |
import Combine | |
import SwiftUI |
[core] | |
excludesfile = /Users/unnamedd/.gitignore | |
editor = code | |
autocrlf = false | |
pager = delta | |
[user] | |
name = Thiago Holanda | |
email = unnamedd@gmail.com | |
signingkey = CD1B6C70016B3BD91C38BC49F94B6756E6B6D57A | |
[alias] |
Blog 2020/5/7
<- previous | index | next ->
Here are some notes on how I set up an installation of OS X Tiger (10.4)
Here is a short guide on how to build QEMU to run Mac OS 9 with working audio. These instructions work for MacOS High Sierra as the host OS, although with some tweaking they may run under Linux/Windows. You should be comfortable compiling software from source before attempting.
Adapted from instructions from Cat_7
You may need to install XCode and/or the XCode command line tools. If you do not have them, then this process may prompt you to install them (MacOS will do that).
extension NSAttributedString { | |
func highlighting(_ substring: String, using color: UIColor) -> NSAttributedString { | |
let attributedString = NSMutableAttributedString(attributedString: self) | |
attributedString.addAttribute(.foregroundColor, value: color, range: (self.string as NSString).range(of: substring)) | |
return attributedString | |
} | |
} | |
// Usage: |
// | |
// NSImageExtensions.swift | |
// | |
import Cocoa | |
extension NSImage { | |
/// The height of the image. | |
var height: CGFloat { |
import SwiftUI | |
extension CGRect { | |
fileprivate func point(anchor: UnitPoint) -> CGPoint { | |
var point = self.origin | |
point.x += self.size.width * anchor.x | |
#if os(macOS) | |
point.y += self.size.height * (1 - anchor.y) | |
#else | |
point.y += self.size.height * anchor.y |
struct Keycode { | |
// Layout-independent Keys | |
// eg.These key codes are always the same key on all layouts. | |
static let returnKey : UInt16 = 0x24 | |
static let enter : UInt16 = 0x4C | |
static let tab : UInt16 = 0x30 | |
static let space : UInt16 = 0x31 | |
static let delete : UInt16 = 0x33 | |
static let escape : UInt16 = 0x35 |
Example of an automated script that does most of this: https://github.com/surpher/PactSwiftMockServer/blob/fb8148866bb05f49a0b1dcaae66c67bad1e7eca7/Support/build_rust_dependencies
curl https://sh.rustup.rs -sSf | sh
var body: some View { | |
Group { | |
Text(language.name) | |
.font(.body) | |
.padding([.leading, .trailing], 10) | |
.padding([.top, .bottom], 5) | |
.background(Color.gray) | |
.overlay( | |
Rectangle() | |
.frame(height: 4) |