Skip to content

Instantly share code, notes, and snippets.

Keybase proof

I hereby claim:

  • I am tobylane on github.
  • I am tobylane (https://keybase.io/tobylane) on keybase.
  • I have a public key whose fingerprint is A627 3EB4 8253 252C 89A9 B154 F7F0 3C1C 9035 FBA8

To claim this, I am signing this object:

#!/bin/bash
set -ea
[ -n "$CTH_VERBOSE" ] && set -x
# Script to copy dylibs into the folder and use them.
cd AnimView.app/Contents/MacOS
core=$(otool -L AnimView | grep core | cut -f1 -d' ' | tr -d '[[:space:]]')
cat "$core" > libwx_osx_cocoau_core.dylib
base=$(otool -L AnimView | grep base | cut -f1 -d' ' | tr -d '[[:space:]]')
cat "$base" > libwx_baseu.dylib
#!/bin/bash
set -ea
[ -n "$CTH_VERBOSE" ] && set -x
# Script to pull all the required dylibs, make them owned by user, and used by the CorsixTH executable
lua=lua5.3 # lua5.1 lua lua5.3 for 5.1 5.2 5.3
dir="$(brew --prefix)" # Adjust for your package manager or manual install
cd CorsixTH.app/Contents/MacOS
@tobylane
tobylane / gist:18b2c04ef9653cc34293282be2022dc1
Created February 14, 2018 15:24
Close all dialogs not in demo when opening a full game savefile
if old.demo and not TheApp.using_demo_files then
print("Using savegame from demo on full game")
-- Enable advisor to help with research
elseif old.demo and not TheApp.using_demo_files then
print("Using savegame from full game on demo")
-- Close dialogs not in demo
if old.window.open then
for _, v in pairs({ "dialogBankManager", "dialogBankStats", "dialogTownMap",
"dialogDrugCasebook", "dialogResearch","dialogStatus", "dialogCharts", "dialogPolicy" }) do
if old.window.v.open then
ifeq ($(shell uname -s),Darwin) # macOS
# Clang doesn't error on warnings.
# Bundled, un-updated bison introduce registers which cause non-repo code warnings
override CCFLAGS += -Werror -pedantic -Wno-deprecated-register
else
# Assume the user has specified the standard, or c89
override CCFLAGS += -Wall -g
endif
all: ## Make the Animation Encoder
@tobylane
tobylane / conanfile.txt
Last active June 25, 2019 15:47
Conan.io file for CorsixTH. Add the two remotes. then run the last two comments. Passes CMake for CorsixTH, but the build doesn't find SDL or Freetype
## CorsixTH
## Run the lines with one #
## All five luas on conan-transit don't work
## lua options build_compiler and build_interpreter
## sdl2_mixer is built with full audio support
# conan remote add bincrafters https://api.bintray.com/conan/bincrafters/public-conan true
# conan remote add zimmerk https://api.bintray.com/conan/zimmerk/conan true
[requires]
sdl2/[>=2]@bincrafters/stable
@tobylane
tobylane / 1588.diff
Created April 6, 2022 21:10
The diff from between when I reviewed and the merge. git diff 243efdab53fab362804a71f65a8bada87afe0b3c..84410a86e10ef6e51391d541427bc0cb48fe9f2f CorsixTH/Src/
diff --git a/CorsixTH/Src/config.h.in b/CorsixTH/Src/config.h.in
index 31562afe..2f54ae84 100644
--- a/CorsixTH/Src/config.h.in
+++ b/CorsixTH/Src/config.h.in
@@ -23,7 +23,15 @@ SOFTWARE.
#ifndef CORSIX_TH_CONFIG_H_
#define CORSIX_TH_CONFIG_H_
+/** Interpreter script searching options **/
+// Whether to search in some possible local dirs according to a fixed list,
#!/bin/env bash -x
(cd sdl2-*; ./configure --disable-joystick --disable-haptic --prefix=$PWD/../; make install)
(cd libxmp*; cmake -Bbuild . -DCMAKE_INSTALL_PREFIX=$PWD/../; cmake --build build/ --target install)
(cd wavpack*; ./configure --disable-apps --prefix=$PWD/../; make install)
(cd libogg-*; ./configure --prefix=$PWD/../; make install)
(cd opus-*; ./configure --disable-doc --disable-extra-programs --prefix=$PWD/../; make install)
(cd opusfile-*; ./configure --disable-doc --disable-examples --prefix=$PWD/../; make install)
(cd sdl2_mixer*; cmake -Bbuild . -DSDL2MIXER_MIDI_FLUIDSYNTH=OFF -DSDL2MIXER_MIDI_TIMIDITY=OFF \
-DSDL2MIXER_WAVPACK=ON -DSDL2MIXER_DEPS_SHARED=ON -DBUILD_SHARED_LIBS=ON -DSDL2MIXER_WAVE=ON \
-DSDL2MIXER_OPUS=ON -DCMAKE_INSTALL_PREFIX=$PWD/../ -DSDL2_INCLUDE_DIR=$PWD/../include/SDL2/"