Веб-сайт самохостера Lotigara

summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorKae <80987908+Novaenia@users.noreply.github.com>2023-06-20 14:33:09 +1000
committerKae <80987908+Novaenia@users.noreply.github.com>2023-06-20 14:33:09 +1000
commit6352e8e3196f78388b6c771073f9e03eaa612673 (patch)
treee23772f79a7fbc41bc9108951e9e136857484bf4 /scripts
parent6741a057e5639280d85d0f88ba26f000baa58f61 (diff)
everything everywhere
all at once
Diffstat (limited to 'scripts')
-rw-r--r--scripts/distclean.sh6
-rw-r--r--scripts/findskippedmatids.sh16
-rw-r--r--scripts/format-source.sh11
-rw-r--r--scripts/gitlab-ci/assemble.sh98
-rw-r--r--scripts/gitlab-ci/linux/build.sh22
-rw-r--r--scripts/gitlab-ci/linux/run-client.sh5
-rw-r--r--scripts/gitlab-ci/linux/run-server.sh22
-rw-r--r--scripts/gitlab-ci/linux/sbinit.config8
-rw-r--r--scripts/gitlab-ci/linux/test.sh8
-rw-r--r--scripts/gitlab-ci/macos/Starbound.app/Contents/Info.plist27
-rw-r--r--scripts/gitlab-ci/macos/Starbound.app/Contents/Resources/starbound.icnsbin0 -> 47576 bytes
-rw-r--r--scripts/gitlab-ci/macos/build.sh25
-rw-r--r--scripts/gitlab-ci/macos/run-server.sh11
-rw-r--r--scripts/gitlab-ci/macos/sbinit.config8
-rw-r--r--scripts/gitlab-ci/macos/test.sh9
-rw-r--r--scripts/gitlab-ci/repack_steamfree.sh43
-rw-r--r--scripts/gitlab-ci/windows32/build.bat25
-rw-r--r--scripts/gitlab-ci/windows32/sbinit.config14
-rw-r--r--scripts/gitlab-ci/windows32/test.bat8
-rw-r--r--scripts/gitlab-ci/windows64/build.bat30
-rw-r--r--scripts/gitlab-ci/windows64/sbinit.config14
-rw-r--r--scripts/gitlab-ci/windows64/test.bat8
-rw-r--r--scripts/ide/atom-build.json16
-rw-r--r--scripts/ide/clang_complete12
-rw-r--r--scripts/ide/linter-clang-flags1
-rw-r--r--scripts/ide/linter-clang-includes12
-rw-r--r--scripts/join-multiline-source-strings.sh11
-rw-r--r--scripts/linux/autotag_objects.sh21
-rw-r--r--scripts/linux/find_invalid_tiles.sh6
-rw-r--r--scripts/linux/object_tag_editor.sh5
-rw-r--r--scripts/linux/sbinit.config20
-rw-r--r--scripts/linux/setup.sh27
-rw-r--r--scripts/linux/ycm_extra_conf.py149
-rw-r--r--scripts/osx/build.command6
-rw-r--r--scripts/osx/copy-to-steam.sh9
-rw-r--r--scripts/osx/launch-steam.sh7
-rw-r--r--scripts/osx/run.command6
-rw-r--r--scripts/osx/sbinit.config23
-rw-r--r--scripts/osx/setup.command17
-rw-r--r--scripts/osx/setup.sh29
-rw-r--r--scripts/osx/ycm_extra_conf.py160
-rw-r--r--scripts/packing.config69
-rw-r--r--scripts/steam_appid.txt1
-rw-r--r--scripts/windows/build.bat7
-rw-r--r--scripts/windows/copy-to-steam32.bat8
-rw-r--r--scripts/windows/copy-to-steam64.bat8
-rw-r--r--scripts/windows/find_invalid_tiles.bat7
-rw-r--r--scripts/windows/sbinit.config24
-rw-r--r--scripts/windows/setup32.bat44
-rw-r--r--scripts/windows/setup64.bat42
-rw-r--r--scripts/windows/showlog.bat1
-rw-r--r--scripts/windows/update_tilesets.bat6
52 files changed, 1172 insertions, 0 deletions
diff --git a/scripts/distclean.sh b/scripts/distclean.sh
new file mode 100644
index 0000000..8e2856d
--- /dev/null
+++ b/scripts/distclean.sh
@@ -0,0 +1,6 @@
+#!/bin/sh
+
+cd "`dirname \"$0\"`/.."
+
+rm -rf build
+rm -rf dist
diff --git a/scripts/findskippedmatids.sh b/scripts/findskippedmatids.sh
new file mode 100644
index 0000000..1e82d08
--- /dev/null
+++ b/scripts/findskippedmatids.sh
@@ -0,0 +1,16 @@
+#!/bin/bash
+
+cd "`dirname \"$0\"`"
+
+cd ../assets/packed/tiles/;
+
+THISMAT=0;
+for i in $(grep materialId */*.material | awk '{print $4}' | sort -n );
+ do
+ THISMAT=$(($THISMAT+1));
+ if [ ${i%?} -ne $THISMAT ];
+ then
+ echo "Skipped $THISMAT to $((${i%?}-1))";
+ THISMAT=${i%?};
+ fi;
+done;
diff --git a/scripts/format-source.sh b/scripts/format-source.sh
new file mode 100644
index 0000000..9b3bd49
--- /dev/null
+++ b/scripts/format-source.sh
@@ -0,0 +1,11 @@
+#!/bin/sh
+
+cd "`dirname \"$0\"`/../source"
+
+: ${CLANG_FORMAT:=clang-format}
+
+for file in *; do
+ if [ $file != "extern" -a -d $file ]; then
+ find $file \( -name '*.cpp' -or -name '*.hpp' \) -exec $CLANG_FORMAT -fallback-style=none -i {} \;
+ fi
+done
diff --git a/scripts/gitlab-ci/assemble.sh b/scripts/gitlab-ci/assemble.sh
new file mode 100644
index 0000000..95d18cd
--- /dev/null
+++ b/scripts/gitlab-ci/assemble.sh
@@ -0,0 +1,98 @@
+#!/bin/sh -e
+
+mkdir client_distribution
+mkdir client_distribution/assets
+mkdir client_distribution/tiled
+
+./linux_binaries/asset_packer -c scripts/packing.config assets/packed client_distribution/assets/packed.pak
+cp -r assets/user client_distribution/assets/
+
+cp -r tiled/packed client_distribution/tiled/
+
+cp -r doc client_distribution/doc
+
+mkdir client_distribution/mods
+touch client_distribution/mods/mods_go_here
+
+mkdir client_distribution/win64
+cp -r \
+ windows64_binaries/starbound.exe \
+ windows64_binaries/starbound.pdb \
+ windows64_binaries/starbound_server.exe \
+ windows64_binaries/mod_uploader.exe \
+ windows64_binaries/*.dll \
+ windows64_binaries/iconengines \
+ windows64_binaries/imageformats \
+ windows64_binaries/platforms \
+ windows64_binaries/translations \
+ scripts/gitlab-ci/windows64/sbinit.config \
+ client_distribution/win64/
+
+mkdir client_distribution/win32
+cp \
+ windows32_binaries/starbound.exe \
+ windows32_binaries/starbound.pdb \
+ windows32_binaries/starbound_server.exe \
+ windows32_binaries/asset_packer.exe \
+ windows32_binaries/asset_unpacker.exe \
+ windows32_binaries/dump_versioned_json.exe \
+ windows32_binaries/make_versioned_json.exe \
+ windows32_binaries/planet_mapgen.exe \
+ windows32_binaries/*.dll \
+ scripts/gitlab-ci/windows32/sbinit.config \
+ client_distribution/win32/
+
+mkdir client_distribution/osx
+cp -LR scripts/gitlab-ci/macos/Starbound.app client_distribution/osx/
+mkdir client_distribution/osx/Starbound.app/Contents/MacOS
+cp macos_binaries/starbound client_distribution/osx/Starbound.app/Contents/MacOS/
+cp macos_binaries/*.dylib client_distribution/osx/Starbound.app/Contents/MacOS/
+cp \
+ macos_binaries/starbound_server \
+ macos_binaries/asset_packer \
+ macos_binaries/asset_unpacker \
+ macos_binaries/dump_versioned_json \
+ macos_binaries/make_versioned_json \
+ macos_binaries/planet_mapgen \
+ scripts/gitlab-ci/macos/sbinit.config \
+ scripts/gitlab-ci/macos/run-server.sh \
+ client_distribution/osx/
+
+mkdir client_distribution/linux
+cp \
+ linux_binaries/starbound \
+ linux_binaries/starbound_server \
+ linux_binaries/asset_packer \
+ linux_binaries/asset_unpacker \
+ linux_binaries/dump_versioned_json \
+ linux_binaries/make_versioned_json \
+ linux_binaries/planet_mapgen \
+ linux_binaries/*.so \
+ scripts/gitlab-ci/linux/sbinit.config \
+ scripts/gitlab-ci/linux/run-client.sh \
+ scripts/gitlab-ci/linux/run-server.sh \
+ client_distribution/linux/
+
+mkdir server_distribution
+mkdir server_distribution/assets
+
+mkdir server_distribution/mods
+touch server_distribution/mods/mods_go_here
+
+./linux_binaries/asset_packer -c scripts/packing.config -s assets/packed server_distribution/assets/packed.pak
+
+mkdir server_distribution/win64
+mkdir server_distribution/linux
+
+cp \
+ linux_binaries/starbound_server \
+ linux_binaries/*.so \
+ scripts/gitlab-ci/linux/run-server.sh \
+ scripts/gitlab-ci/linux/sbinit.config \
+ server_distribution/linux/
+
+cp \
+ windows64_binaries/starbound_server.exe \
+ windows64_binaries/*.dll \
+ scripts/gitlab-ci/windows64/sbinit.config \
+ server_distribution/win64/
diff --git a/scripts/gitlab-ci/linux/build.sh b/scripts/gitlab-ci/linux/build.sh
new file mode 100644
index 0000000..b70f6de
--- /dev/null
+++ b/scripts/gitlab-ci/linux/build.sh
@@ -0,0 +1,22 @@
+#!/bin/sh -e
+
+mkdir -p build
+
+cd build
+rm -f CMakeCache.txt
+
+cmake \
+ -DCMAKE_BUILD_TYPE=Release \
+ -DSTAR_ENABLE_STATIC_LIBGCC_LIBSTDCXX=ON \
+ -DSTAR_USE_JEMALLOC=ON \
+ -DSTAR_ENABLE_STEAM_INTEGRATION=ON \
+ -DCMAKE_INCLUDE_PATH=../lib/linux/include \
+ -DCMAKE_LIBRARY_PATH=../lib/linux \
+ ../source
+
+make -j2
+
+cd ..
+
+mv dist linux_binaries
+cp lib/linux/*.so linux_binaries/
diff --git a/scripts/gitlab-ci/linux/run-client.sh b/scripts/gitlab-ci/linux/run-client.sh
new file mode 100644
index 0000000..b7cb8ba
--- /dev/null
+++ b/scripts/gitlab-ci/linux/run-client.sh
@@ -0,0 +1,5 @@
+#!/bin/sh
+
+cd "`dirname \"$0\"`"
+
+LD_LIBRARY_PATH="$LD_LIBRARY_PATH:./" ./starbound "$@"
diff --git a/scripts/gitlab-ci/linux/run-server.sh b/scripts/gitlab-ci/linux/run-server.sh
new file mode 100644
index 0000000..79b02fd
--- /dev/null
+++ b/scripts/gitlab-ci/linux/run-server.sh
@@ -0,0 +1,22 @@
+#!/bin/sh
+
+cd "`dirname \"$0\"`"
+
+terms="
+x-terminal-emulator
+konsole
+gnome-terminal.wrapper
+xfce4-terminal.wrapper
+koi8rxterm
+lxterm
+uxterm
+xterm"
+
+for term in $terms; do
+ $term -e ./starbound_server $@
+ if [ $? -eq 0 ]; then
+ exit 0;
+ fi
+done
+
+exit 1
diff --git a/scripts/gitlab-ci/linux/sbinit.config b/scripts/gitlab-ci/linux/sbinit.config
new file mode 100644
index 0000000..0be7e7c
--- /dev/null
+++ b/scripts/gitlab-ci/linux/sbinit.config
@@ -0,0 +1,8 @@
+{
+ "assetDirectories" : [
+ "../assets/",
+ "../mods/"
+ ],
+
+ "storageDirectory" : "../storage/"
+}
diff --git a/scripts/gitlab-ci/linux/test.sh b/scripts/gitlab-ci/linux/test.sh
new file mode 100644
index 0000000..0bc8e7c
--- /dev/null
+++ b/scripts/gitlab-ci/linux/test.sh
@@ -0,0 +1,8 @@
+#!/bin/sh -e
+
+cd linux_binaries
+
+cp ../scripts/linux/sbinit.config .
+
+./core_tests
+./game_tests
diff --git a/scripts/gitlab-ci/macos/Starbound.app/Contents/Info.plist b/scripts/gitlab-ci/macos/Starbound.app/Contents/Info.plist
new file mode 100644
index 0000000..44fcdca
--- /dev/null
+++ b/scripts/gitlab-ci/macos/Starbound.app/Contents/Info.plist
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+ <key>CFBundleGetInfoString</key>
+ <string>Starbound</string>
+ <key>CFBundleExecutable</key>
+ <string>starbound</string>
+ <key>CFBundleIdentifier</key>
+ <string>com.chucklefish</string>
+ <key>CFBundleName</key>
+ <string>starbound</string>
+ <key>CFBundleIconFile</key>
+ <string>starbound</string>
+ <key>CFBundleInfoDictionaryVersion</key>
+ <string>6.0</string>
+ <key>CFBundlePackageType</key>
+ <string>APPL</string>
+ <key>LSEnvironment</key>
+ <dict>
+ <key>MinimumSystemVersion</key>
+ <string>10.9.0</string>
+ </dict>
+ <key>SDL_FILESYSTEM_BASE_DIR_TYPE</key>
+ <string>parent</string>
+</dict>
+</plist>
diff --git a/scripts/gitlab-ci/macos/Starbound.app/Contents/Resources/starbound.icns b/scripts/gitlab-ci/macos/Starbound.app/Contents/Resources/starbound.icns
new file mode 100644
index 0000000..d6c93ff
--- /dev/null
+++ b/scripts/gitlab-ci/macos/Starbound.app/Contents/Resources/starbound.icns
Binary files differ
diff --git a/scripts/gitlab-ci/macos/build.sh b/scripts/gitlab-ci/macos/build.sh
new file mode 100644
index 0000000..7517843
--- /dev/null
+++ b/scripts/gitlab-ci/macos/build.sh
@@ -0,0 +1,25 @@
+#!/bin/sh -e
+
+mkdir -p build
+cd build
+
+rm -f CMakeCache.txt
+
+cmake \
+ -DCMAKE_BUILD_TYPE=Release \
+ -DSTAR_ENABLE_STATIC_LIBGCC_LIBSTDCXX=ON \
+ -DSTAR_USE_JEMALLOC=OFF \
+ -DSTAR_ENABLE_STEAM_INTEGRATION=ON \
+ -DSTAR_ENABLE_DISCORD_INTEGRATION=ON \
+ -DCMAKE_INCLUDE_PATH=../lib/osx/include \
+ -DCMAKE_LIBRARY_PATH=../lib/osx \
+ -DCMAKE_OSX_SYSROOT=/ \
+ -DCMAKE_OSX_DEPLOYMENT_TARGET=10.9 \
+ ../source
+
+make -j2
+
+cd ..
+
+mv dist macos_binaries
+cp lib/osx/*.dylib macos_binaries/
diff --git a/scripts/gitlab-ci/macos/run-server.sh b/scripts/gitlab-ci/macos/run-server.sh
new file mode 100644
index 0000000..e043263
--- /dev/null
+++ b/scripts/gitlab-ci/macos/run-server.sh
@@ -0,0 +1,11 @@
+#!/bin/sh -e
+
+cd "`dirname \"$0\"`"
+
+osascript <<END
+
+tell application "Terminal"
+ do script "cd \"`pwd`\";./starbound_server $@;exit"
+end tell
+
+END
diff --git a/scripts/gitlab-ci/macos/sbinit.config b/scripts/gitlab-ci/macos/sbinit.config
new file mode 100644
index 0000000..0be7e7c
--- /dev/null
+++ b/scripts/gitlab-ci/macos/sbinit.config
@@ -0,0 +1,8 @@
+{
+ "assetDirectories" : [
+ "../assets/",
+ "../mods/"
+ ],
+
+ "storageDirectory" : "../storage/"
+}
diff --git a/scripts/gitlab-ci/macos/test.sh b/scripts/gitlab-ci/macos/test.sh
new file mode 100644
index 0000000..3843325
--- /dev/null
+++ b/scripts/gitlab-ci/macos/test.sh
@@ -0,0 +1,9 @@
+#!/bin/sh -e
+
+cd macos_binaries
+
+cp ../scripts/osx/sbinit.config .
+
+./core_tests
+./game_tests
+
diff --git a/scripts/gitlab-ci/repack_steamfree.sh b/scripts/gitlab-ci/repack_steamfree.sh
new file mode 100644
index 0000000..0287760
--- /dev/null
+++ b/scripts/gitlab-ci/repack_steamfree.sh
@@ -0,0 +1,43 @@
+#!/bin/sh -e
+
+mkdir client_win32_win64
+cp -r \
+ client_distribution/assets \
+ client_distribution/doc \
+ client_distribution/mods \
+ client_distribution/tiled \
+ client_distribution/win32 \
+ client_distribution/win64 \
+ client_win32_win64
+
+mkdir client_linux
+cp -r \
+ client_distribution/assets \
+ client_distribution/doc \
+ client_distribution/mods \
+ client_distribution/tiled \
+ client_distribution/linux \
+ client_linux
+
+mkdir client_macos
+cp -r \
+ client_distribution/assets \
+ client_distribution/doc \
+ client_distribution/mods \
+ client_distribution/tiled \
+ client_distribution/osx \
+ client_macos
+
+mkdir server_win64
+cp -r \
+ server_distribution/assets \
+ server_distribution/mods \
+ server_distribution/win64 \
+ server_win64
+
+mkdir server_linux
+cp -r \
+ server_distribution/assets \
+ server_distribution/mods \
+ server_distribution/linux \
+ server_linux
diff --git a/scripts/gitlab-ci/windows32/build.bat b/scripts/gitlab-ci/windows32/build.bat
new file mode 100644
index 0000000..f353d8b
--- /dev/null
+++ b/scripts/gitlab-ci/windows32/build.bat
@@ -0,0 +1,25 @@
+set CMAKE_PREFIX_PATH="C:\Program Files\CMake"
+set PATH=%PATH%;%CMAKE_PREFIX_PATH%\bin;%QT_PREFIX_PATH%\bin
+
+mkdir build
+cd build || exit /b 1
+
+del /f CMakeCache.txt
+
+cmake.exe ^
+ -G"Visual Studio 14" ^
+ -T"v140_xp" ^
+ -DSTAR_ENABLE_STATIC_MSVC_RUNTIME=ON ^
+ -DSTAR_ENABLE_STEAM_INTEGRATION=ON ^
+ -DSTAR_ENABLE_DISCORD_INTEGRATION=ON ^
+ -DCMAKE_INCLUDE_PATH="..\lib\windows32\include" ^
+ -DCMAKE_LIBRARY_PATH="..\lib\windows32" ^
+ ..\source || exit /b 1
+
+cmake.exe --build . --config RelWithDebInfo || exit /b 1
+
+cd ..
+
+move dist windows32_binaries || exit /b 1
+
+copy lib\windows32\*.dll windows32_binaries\ || exit /b 1
diff --git a/scripts/gitlab-ci/windows32/sbinit.config b/scripts/gitlab-ci/windows32/sbinit.config
new file mode 100644
index 0000000..b200df4
--- /dev/null
+++ b/scripts/gitlab-ci/windows32/sbinit.config
@@ -0,0 +1,14 @@
+{
+ "assetDirectories" : [
+ "..\\assets\\",
+ "..\\mods\\"
+ ],
+
+ "storageDirectory" : "..\\storage\\",
+
+ "defaultConfiguration" : {
+ "gameServerBind" : "*",
+ "queryServerBind" : "*",
+ "rconServerBind" : "*"
+ }
+}
diff --git a/scripts/gitlab-ci/windows32/test.bat b/scripts/gitlab-ci/windows32/test.bat
new file mode 100644
index 0000000..6887309
--- /dev/null
+++ b/scripts/gitlab-ci/windows32/test.bat
@@ -0,0 +1,8 @@
+cd windows32_binaries
+
+set PATH="%PATH%;..\lib\windows32"
+
+copy ..\scripts\windows\sbinit.config .
+
+.\core_tests || exit /b 1
+.\game_tests || exit /b 1
diff --git a/scripts/gitlab-ci/windows64/build.bat b/scripts/gitlab-ci/windows64/build.bat
new file mode 100644
index 0000000..d657be7
--- /dev/null
+++ b/scripts/gitlab-ci/windows64/build.bat
@@ -0,0 +1,30 @@
+set QT_PREFIX_PATH="C:\Qt\5.7\msvc2015_64"
+set CMAKE_PREFIX_PATH="C:\Program Files\CMake"
+set PATH=%PATH%;%CMAKE_PREFIX_PATH%\bin;%QT_PREFIX_PATH%\bin
+
+mkdir build
+cd build || exit /b 1
+
+del /f CMakeCache.txt
+
+cmake.exe ^
+ -G"Visual Studio 14 Win64" ^
+ -T"v140" ^
+ -DCMAKE_PREFIX_PATH=%QT_PREFIX_PATH% ^
+ -DSTAR_USE_JEMALLOC=OFF ^
+ -DSTAR_ENABLE_STEAM_INTEGRATION=ON ^
+ -DSTAR_ENABLE_DISCORD_INTEGRATION=ON ^
+ -DSTAR_BUILD_QT_TOOLS=ON ^
+ -DCMAKE_INCLUDE_PATH="..\lib\windows64\include" ^
+ -DCMAKE_LIBRARY_PATH="..\lib\windows64" ^
+ ..\source || exit /b 1
+
+cmake.exe --build . --config RelWithDebInfo || exit /b 1
+
+cd ..
+
+move dist windows64_binaries || exit /b 1
+
+windeployqt.exe windows64_binaries\mod_uploader.exe || exit /b 1
+
+copy lib\windows64\*.dll windows64_binaries\ || exit /b 1
diff --git a/scripts/gitlab-ci/windows64/sbinit.config b/scripts/gitlab-ci/windows64/sbinit.config
new file mode 100644
index 0000000..b200df4
--- /dev/null
+++ b/scripts/gitlab-ci/windows64/sbinit.config
@@ -0,0 +1,14 @@
+{
+ "assetDirectories" : [
+ "..\\assets\\",
+ "..\\mods\\"
+ ],
+
+ "storageDirectory" : "..\\storage\\",
+
+ "defaultConfiguration" : {
+ "gameServerBind" : "*",
+ "queryServerBind" : "*",
+ "rconServerBind" : "*"
+ }
+}
diff --git a/scripts/gitlab-ci/windows64/test.bat b/scripts/gitlab-ci/windows64/test.bat
new file mode 100644
index 0000000..d6cb450
--- /dev/null
+++ b/scripts/gitlab-ci/windows64/test.bat
@@ -0,0 +1,8 @@
+cd windows64_binaries
+
+set PATH="%PATH%;..\lib\windows64"
+
+copy ..\scripts\windows\sbinit.config .
+
+.\core_tests || exit /b 1
+.\game_tests || exit /b 1
diff --git a/scripts/ide/atom-build.json b/scripts/ide/atom-build.json
new file mode 100644
index 0000000..42e79e8
--- /dev/null
+++ b/scripts/ide/atom-build.json
@@ -0,0 +1,16 @@
+{
+ "cmd": "make -Cbuild",
+ "name": "starbound",
+ "args": [],
+ "sh": true,
+ "env": {},
+ "errorMatch": "^(?<file>[^\\.]+.hs):(?<line>\\d+):(?<col>\\d+)",
+ "targets": {
+ "build": {
+ "cmd": "make -Cbuild build"
+ },
+ "clean": {
+ "cmd": "make -Cbuild clean"
+ }
+ }
+}
diff --git a/scripts/ide/clang_complete b/scripts/ide/clang_complete
new file mode 100644
index 0000000..668155d
--- /dev/null
+++ b/scripts/ide/clang_complete
@@ -0,0 +1,12 @@
+-Isource/application/
+-Isource/core/
+-Isource/extern/
+-Isource/frontend/
+-Isource/game/
+-Isource/game/interfaces/
+-Isource/game/items/
+-Isource/game/objects/
+-Isource/game/scripting/
+-Isource/game/terrain/
+-Isource/graphics/
+-Isource/windowing/
diff --git a/scripts/ide/linter-clang-flags b/scripts/ide/linter-clang-flags
new file mode 100644
index 0000000..ff2eca9
--- /dev/null
+++ b/scripts/ide/linter-clang-flags
@@ -0,0 +1 @@
+-Wall -Wextra -Wuninitialized -Wno-parentheses-equality -Qunused-arguments -Wno-deprecated-declarations -Woverloaded-virtual -Wnon-virtual-dtor -Winit-self
diff --git a/scripts/ide/linter-clang-includes b/scripts/ide/linter-clang-includes
new file mode 100644
index 0000000..940befb
--- /dev/null
+++ b/scripts/ide/linter-clang-includes
@@ -0,0 +1,12 @@
+source/application/
+source/core/
+source/extern/
+source/frontend/
+source/game/
+source/game/interfaces/
+source/game/items/
+source/game/objects/
+source/game/scripting/
+source/game/terrain/
+source/graphics/
+source/windowing/
diff --git a/scripts/join-multiline-source-strings.sh b/scripts/join-multiline-source-strings.sh
new file mode 100644
index 0000000..2b47d55
--- /dev/null
+++ b/scripts/join-multiline-source-strings.sh
@@ -0,0 +1,11 @@
+#!/bin/sh
+
+cd "`dirname \"$0\"`/../source"
+
+for file in *; do
+ if [ $file != "extern" -a -d $file ]; then
+ # This is not bulletproof, this will break if the last character on a line
+ # is an *escaped* quote.
+ find $file \( -name '*.cpp' -or -name '*.hpp' \) -exec perl -0777 -i -pe 's/\"\s*\n\s*\"//igs' {} \;
+ fi
+done
diff --git a/scripts/linux/autotag_objects.sh b/scripts/linux/autotag_objects.sh
new file mode 100644
index 0000000..45e3b67
--- /dev/null
+++ b/scripts/linux/autotag_objects.sh
@@ -0,0 +1,21 @@
+#!/bin/sh -e
+
+cd "`dirname \"$0\"`/../.."
+
+for OBJECT in $(find assets/ -name *.object); do
+
+ EXISTING_TAGS=$(./dist/json_tool --opt '/tags' "$OBJECT")
+ if test "x$EXISTING_TAGS" != "x"; then
+ echo "Skipping $OBJECT; it already has tags..."
+ continue
+ fi
+
+ echo "Automatically tagging $OBJECT"
+
+ RACE_TAGS=$(./dist/json_tool --opt '/race' "$OBJECT" --array)
+ CATEGORY_TAGS=$(./dist/json_tool --opt '/category' "$OBJECT" --array)
+ TYPE_TAGS=$(./dist/json_tool --opt '/objectType' "$OBJECT" --array)
+
+ TAGS=$(./dist/json_tool -j "$RACE_TAGS" -j "$CATEGORY_TAGS" -j "$TYPE_TAGS" --get '/*' --array-unique)
+ ./dist/json_tool -i --set '/tags' "$TAGS" --after objectName "$OBJECT"
+done
diff --git a/scripts/linux/find_invalid_tiles.sh b/scripts/linux/find_invalid_tiles.sh
new file mode 100644
index 0000000..9f2d939
--- /dev/null
+++ b/scripts/linux/find_invalid_tiles.sh
@@ -0,0 +1,6 @@
+#!/bin/sh -e
+
+cd "`dirname \"$0\"`/../../dist"
+
+./map_grep "invalid=true" ../assets/packed/dungeons/
+./map_grep "invalid=true" ../assets/devel/dungeons/
diff --git a/scripts/linux/object_tag_editor.sh b/scripts/linux/object_tag_editor.sh
new file mode 100644
index 0000000..56735ef
--- /dev/null
+++ b/scripts/linux/object_tag_editor.sh
@@ -0,0 +1,5 @@
+#!/bin/sh -e
+
+cd "`dirname \"$0\"`/../.."
+
+./dist/json_tool --find ./assets .object --edit '/tags' --input csv --after objectName --editor-image '/orientations/0/imageLayers/0/image' --editor-image '/orientations/0/dualImage' --editor-image '/orientations/0/image' --editor-image '/orientations/0/leftImage'
diff --git a/scripts/linux/sbinit.config b/scripts/linux/sbinit.config
new file mode 100644
index 0000000..66776ed
--- /dev/null
+++ b/scripts/linux/sbinit.config
@@ -0,0 +1,20 @@
+{
+ "assetDirectories" : [
+ "../assets/",
+ "./mods/"
+ ],
+
+ "storageDirectory" : "./",
+
+ "assetsSettings" : {
+ "pathIgnore" : [],
+ "digestIgnore" : [
+ ".*"
+ ]
+ },
+
+ "defaultConfiguration" : {
+ "allowAdminCommandsFromAnyone" : true,
+ "anonymousConnectionsAreAdmin" : true
+ }
+}
diff --git a/scripts/linux/setup.sh b/scripts/linux/setup.sh
new file mode 100644
index 0000000..d40b92d
--- /dev/null
+++ b/scripts/linux/setup.sh
@@ -0,0 +1,27 @@
+#!/bin/sh
+
+cd "`dirname \"$0\"`/../.."
+
+mkdir -p dist
+cp scripts/linux/sbinit.config dist/
+
+mkdir -p build
+cd build
+
+if [ -d /usr/lib/ccache ]; then
+ export PATH=/usr/lib/ccache/:$PATH
+fi
+
+LINUX_LIB_DIR=../lib/linux
+
+cmake \
+ -DCMAKE_EXPORT_COMPILE_COMMANDS=1 \
+ -DCMAKE_BUILD_TYPE=RelWithAsserts \
+ -DSTAR_USE_JEMALLOC=ON \
+ -DCMAKE_INCLUDE_PATH=$LINUX_LIB_DIR/include \
+ -DCMAKE_LIBRARY_PATH=$LINUX_LIB_DIR/ \
+ ../source
+
+if [ $# -ne 0 ]; then
+ make -j$*
+fi
diff --git a/scripts/linux/ycm_extra_conf.py b/scripts/linux/ycm_extra_conf.py
new file mode 100644
index 0000000..6de5135
--- /dev/null
+++ b/scripts/linux/ycm_extra_conf.py
@@ -0,0 +1,149 @@
+# This file is NOT licensed under the GPLv3, which is the license for the rest
+# of YouCompleteMe.
+#
+# Here's the license text for this file:
+#
+# This is free and unencumbered software released into the public domain.
+#
+# Anyone is free to copy, modify, publish, use, compile, sell, or
+# distribute this software, either in source code form or as a compiled
+# binary, for any purpose, commercial or non-commercial, and by any
+# means.
+#
+# In jurisdictions that recognize copyright laws, the author or authors
+# of this software dedicate any and all copyright interest in the
+# software to the public domain. We make this dedication for the benefit
+# of the public at large and to the detriment of our heirs and
+# successors. We intend this dedication to be an overt act of
+# relinquishment in perpetuity of all present and future rights to this
+# software under copyright law.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+# IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+# OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+# ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+# OTHER DEALINGS IN THE SOFTWARE.
+#
+# For more information, please refer to <http://unlicense.org/>
+
+import os
+import ycm_core
+
+# These are the compilation flags that will be used in case there's no
+# compilation database set (by default, one is not set).
+# CHANGE THIS LIST OF FLAGS. YES, THIS IS THE DROID YOU HAVE BEEN LOOKING FOR.
+flags = [
+'-Wall',
+'-Wextra',
+'-Werror',
+'-fexceptions',
+'-DNDEBUG',
+# THIS IS IMPORTANT! Without a "-std=<something>" flag, clang won't know which
+# language to use when compiling headers. So it will guess. Badly. So C++
+# headers will be compiled as C headers. You don't want that so ALWAYS specify
+# a "-std=<something>".
+# For a C project, you would set this to something like 'c99' instead of
+# 'c++11'.
+'-std=c++11',
+'-stdlib=libc++',
+# ...and the same thing goes for the magic -x option which specifies the
+# language that the files to be compiled are written in. This is mostly
+# relevant for c++ headers.
+# For a C project, you would set this to 'c' instead of 'c++'.
+'-x', 'c++'
+]
+
+
+# Set this to the absolute path to the folder (NOT the file!) containing the
+# compile_commands.json file to use that instead of 'flags'. See here for
+# more details: http://clang.llvm.org/docs/JSONCompilationDatabase.html
+#
+# Most projects will NOT need to set this to anything; you can just change the
+# 'flags' list of compilation flags. Notice that YCM itself uses that approach.
+compilation_database_folder = '/home/catherine/starbound/build'
+
+if compilation_database_folder:
+ database = ycm_core.CompilationDatabase( compilation_database_folder )
+else:
+ database = None
+
+SOURCE_EXTENSIONS = [ '.cpp', '.cxx', '.cc', '.c', '.m', '.mm' ]
+
+def DirectoryOfThisScript():
+ return os.path.dirname( os.path.abspath( __file__ ) )
+
+
+def MakeRelativePathsInFlagsAbsolute( flags, working_directory ):
+ if not working_directory:
+ return list( flags )
+ new_flags = []
+ make_next_absolute = False
+ path_flags = [ '-isystem', '-I', '-iquote', '--sysroot=' ]
+ for flag in flags:
+ new_flag = flag
+
+ if make_next_absolute:
+ make_next_absolute = False
+ if not flag.startswith( '/' ):
+ new_flag = os.path.join( working_directory, flag )
+
+ for path_flag in path_flags:
+ if flag == path_flag:
+ make_next_absolute = True
+ break
+
+ if flag.startswith( path_flag ):
+ path = flag[ len( path_flag ): ]
+ new_flag = path_flag + os.path.join( working_directory, path )
+ break
+
+ if new_flag:
+ new_flags.append( new_flag )
+ return new_flags
+
+
+def IsHeaderFile( filename ):
+ extension = os.path.splitext( filename )[ 1 ]
+ return extension in [ '.h', '.hxx', '.hpp', '.hh' ]
+
+
+def GetCompilationInfoForFile( filename ):
+ # The compilation_commands.json file generated by CMake does not have entries
+ # for header files. So we do our best by asking the db for flags for a
+ # corresponding source file, if any. If one exists, the flags for that file
+ # should be good enough.
+ if IsHeaderFile( filename ):
+ basename = os.path.splitext( filename )[ 0 ]
+ for extension in SOURCE_EXTENSIONS:
+ replacement_file = basename + extension
+ if os.path.exists( replacement_file ):
+ compilation_info = database.GetCompilationInfoForFile(
+ replacement_file )
+ if compilation_info.compiler_flags_:
+ return compilation_info
+ return None
+ return database.GetCompilationInfoForFile( filename )
+
+
+def FlagsForFile( filename, **kwargs ):
+ if database:
+ # Bear in mind that compilation_info.compiler_flags_ does NOT return a
+ # python list, but a "list-like" StringVec object
+ compilation_info = GetCompilationInfoForFile( filename )
+ if not compilation_info:
+ return None
+
+ final_flags = MakeRelativePathsInFlagsAbsolute(
+ compilation_info.compiler_flags_,
+ compilation_info.compiler_working_dir_ )
+
+ else:
+ relative_to = DirectoryOfThisScript()
+ final_flags = MakeRelativePathsInFlagsAbsolute( flags, relative_to )
+
+ return {
+ 'flags': final_flags,
+ 'do_cache': True
+ }
diff --git a/scripts/osx/build.command b/scripts/osx/build.command
new file mode 100644
index 0000000..bd124ff
--- /dev/null
+++ b/scripts/osx/build.command
@@ -0,0 +1,6 @@
+#!/bin/sh
+
+cd "$(dirname $0)/../.."
+
+cd build
+make -j3
diff --git a/scripts/osx/copy-to-steam.sh b/scripts/osx/copy-to-steam.sh
new file mode 100644
index 0000000..165ee40
--- /dev/null
+++ b/scripts/osx/copy-to-steam.sh
@@ -0,0 +1,9 @@
+#!/bin/sh -e
+
+cd "`dirname \"$0\"`/../../dist"
+
+STEAM_INSTALL_DIR="$HOME/Library/Application Support/Steam/steamapps/common/Starbound - Unstable"
+
+./asset_packer -c ../scripts/packing.config ../assets/packed ./packed.pak
+mv packed.pak "$STEAM_INSTALL_DIR/assets/packed.pak"
+cp starbound "$STEAM_INSTALL_DIR/osx/Starbound.app/Contents/MacOS/"
diff --git a/scripts/osx/launch-steam.sh b/scripts/osx/launch-steam.sh
new file mode 100644
index 0000000..0c2d283
--- /dev/null
+++ b/scripts/osx/launch-steam.sh
@@ -0,0 +1,7 @@
+#!/bin/sh -e
+
+cd "`dirname \"$0\"`/../../dist"
+
+cp ../scripts/steam_appid.txt .
+
+DYLD_INSERT_LIBRARIES=~/Library/Application\ Support/Steam/Steam.AppBundle/Steam/Contents/MacOS/gameoverlayrenderer.dylib DYLD_LIBRARY_PATH=../lib/osx/ $@
diff --git a/scripts/osx/run.command b/scripts/osx/run.command
new file mode 100644
index 0000000..88c14b8
--- /dev/null
+++ b/scripts/osx/run.command
@@ -0,0 +1,6 @@
+#!/bin/sh
+
+cd "$(dirname $0)/../.."
+
+cd dist
+./starbound
diff --git a/scripts/osx/sbinit.config b/scripts/osx/sbinit.config
new file mode 100644
index 0000000..05a983b
--- /dev/null
+++ b/scripts/osx/sbinit.config
@@ -0,0 +1,23 @@
+{
+ "assetDirectories" : [
+ "../assets/",
+ "./mods/"
+ ],
+
+ "storageDirectory" : "./",
+
+ "assetsSettings" : {
+ "pathIgnore" : [],
+ "digestIgnore" : [
+ ".*"
+ ]
+ },
+
+ "defaultConfiguration" : {
+ "allowAdminCommandsFromAnyone" : true,
+ "anonymousConnectionsAreAdmin" : true,
+ "bindings" : {
+ "KeybindingClear" : [ { "type" : "key", "value" : "Del", "mods" : [] } ]
+ }
+ }
+}
diff --git a/scripts/osx/setup.command b/scripts/osx/setup.command
new file mode 100644
index 0000000..2a1d17c
--- /dev/null
+++ b/scripts/osx/setup.command
@@ -0,0 +1,17 @@
+#!/bin/sh
+
+cd "$(dirname $0)/../.."
+
+mkdir -p dist
+cp scripts/osx/sbinit.config dist/
+
+mkdir -p build
+cd build
+
+CC=clang CXX=clang++ /Applications/CMake.app/Contents/bin/cmake \
+ -DCMAKE_EXPORT_COMPILE_COMMANDS=true \
+ -DCMAKE_BUILD_TYPE=RelWithAsserts \
+ -DSTAR_USE_JEMALLOC=ON \
+ -DCMAKE_INCLUDE_PATH=../lib/osx/include \
+ -DCMAKE_LIBRARY_PATH=../lib/osx/ \
+ ../source
diff --git a/scripts/osx/setup.sh b/scripts/osx/setup.sh
new file mode 100644
index 0000000..7144ac0
--- /dev/null
+++ b/scripts/osx/setup.sh
@@ -0,0 +1,29 @@
+#!/bin/sh
+
+cd "`dirname \"$0\"`/../.."
+
+mkdir -p dist
+cp scripts/osx/sbinit.config dist/
+
+mkdir -p build
+cd build
+
+QT5_INSTALL_PATH=/usr/local/opt/qt5
+if [ -d $QT5_INSTALL_PATH ]; then
+ export PATH=$QT5_INSTALL_PATH/bin:$PATH
+ export LDFLAGS=-L$QT5_INSTALL_PATH/lib
+ export CPPFLAGS=-I$QT5_INSTALL_PATH/include
+ export CMAKE_PREFIX_PATH=$QT5_INSTALL_PATH
+ BUILD_QT_TOOLS=ON
+else
+ BUILD_QT_TOOLS=OFF
+fi
+
+CC=clang CXX=clang++ cmake \
+ -DCMAKE_EXPORT_COMPILE_COMMANDS=true \
+ -DCMAKE_BUILD_TYPE=RelWithAsserts \
+ -DSTAR_BUILD_QT_TOOLS=$BUILD_QT_TOOLS \
+ -DSTAR_USE_JEMALLOC=ON \
+ -DCMAKE_INCLUDE_PATH=../lib/osx/include \
+ -DCMAKE_LIBRARY_PATH=../lib/osx/ \
+ ../source
diff --git a/scripts/osx/ycm_extra_conf.py b/scripts/osx/ycm_extra_conf.py
new file mode 100644
index 0000000..b9b969d
--- /dev/null
+++ b/scripts/osx/ycm_extra_conf.py
@@ -0,0 +1,160 @@
+# This file is NOT licensed under the GPLv3, which is the license for the rest
+# of YouCompleteMe.
+#
+# Here's the license text for this file:
+#
+# This is free and unencumbered software released into the public domain.
+#
+# Anyone is free to copy, modify, publish, use, compile, sell, or
+# distribute this software, either in source code form or as a compiled
+# binary, for any purpose, commercial or non-commercial, and by any
+# means.
+#
+# In jurisdictions that recognize copyright laws, the author or authors
+# of this software dedicate any and all copyright interest in the
+# software to the public domain. We make this dedication for the benefit
+# of the public at large and to the detriment of our heirs and
+# successors. We intend this dedication to be an overt act of
+# relinquishment in perpetuity of all present and future rights to this
+# software under copyright law.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+# IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+# OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+# ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+# OTHER DEALINGS IN THE SOFTWARE.
+#
+# For more information, please refer to <http://unlicense.org/>
+
+import os
+import ycm_core
+
+# These are the compilation flags that will be used in case there's no
+# compilation database set (by default, one is not set).
+# CHANGE THIS LIST OF FLAGS. YES, THIS IS THE DROID YOU HAVE BEEN LOOKING FOR.
+flags = [
+'-Wall',
+'-Wextra',
+'-Werror',
+'-fexceptions',
+'-DNDEBUG',
+# THIS IS IMPORTANT! Without a "-std=<something>" flag, clang won't know which
+# language to use when compiling headers. So it will guess. Badly. So C++
+# headers will be compiled as C headers. You don't want that so ALWAYS specify
+# a "-std=<something>".
+# For a C project, you would set this to something like 'c99' instead of
+# 'c++11'.
+'-std=c++14',
+'-stdlib=libc++',
+# ...and the same thing goes for the magic -x option which specifies the
+# language that the files to be compiled are written in. This is mostly
+# relevant for c++ headers.
+# For a C project, you would set this to 'c' instead of 'c++'.
+'-x', 'c++'
+]
+
+
+# Set this to the absolute path to the folder (NOT the file!) containing the
+# compile_commands.json file to use that instead of 'flags'. See here for
+# more details: http://clang.llvm.org/docs/JSONCompilationDatabase.html
+#
+# You can get CMake to generate this file for you by adding:
+# set( CMAKE_EXPORT_COMPILE_COMMANDS 1 )
+# to your CMakeLists.txt file.
+#
+# Most projects will NOT need to set this to anything; you can just change the
+# 'flags' list of compilation flags. Notice that YCM itself uses that approach.
+compilation_database_folder = '/Users/catherine/Documents/starbound/build'
+
+if os.path.exists( compilation_database_folder ):
+ database = ycm_core.CompilationDatabase( compilation_database_folder )
+else:
+ database = None
+
+SOURCE_EXTENSIONS = [ '.cpp', '.cxx', '.cc', '.c', '.m', '.mm' ]
+
+def DirectoryOfThisScript():
+ return os.path.dirname( os.path.abspath( __file__ ) )
+
+
+def MakeRelativePathsInFlagsAbsolute( flags, working_directory ):
+ if not working_directory:
+ return list( flags )
+ new_flags = []
+ make_next_absolute = False
+ path_flags = [ '-isystem', '-I', '-iquote', '--sysroot=' ]
+ for flag in flags:
+ new_flag = flag
+
+ if make_next_absolute:
+ make_next_absolute = False
+ if not flag.startswith( '/' ):
+ new_flag = os.path.join( working_directory, flag )
+
+ for path_flag in path_flags:
+ if flag == path_flag:
+ make_next_absolute = True
+ break
+
+ if flag.startswith( path_flag ):
+ path = flag[ len( path_flag ): ]
+ new_flag = path_flag + os.path.join( working_directory, path )
+ break
+
+ if new_flag:
+ new_flags.append( new_flag )
+ return new_flags
+
+
+def IsHeaderFile( filename ):
+ extension = os.path.splitext( filename )[ 1 ]
+ return extension in [ '.h', '.hxx', '.hpp', '.hh' ]
+
+
+def GetCompilationInfoForFile( filename ):
+ # The compilation_commands.json file generated by CMake does not have entries
+ # for header files. So we do our best by asking the db for flags for a
+ # corresponding source file, if any. If one exists, the flags for that file
+ # should be good enough.
+ if IsHeaderFile( filename ):
+ basename = os.path.splitext( filename )[ 0 ]
+ for extension in SOURCE_EXTENSIONS:
+ replacement_file = basename + extension
+ if os.path.exists( replacement_file ):
+ compilation_info = database.GetCompilationInfoForFile(
+ replacement_file )
+ if compilation_info.compiler_flags_:
+ return compilation_info
+ return None
+ return database.GetCompilationInfoForFile( filename )
+
+
+def FlagsForFile( filename, **kwargs ):
+ if database:
+ # Bear in mind that compilation_info.compiler_flags_ does NOT return a
+ # python list, but a "list-like" StringVec object
+ compilation_info = GetCompilationInfoForFile( filename )
+ if not compilation_info:
+ return None
+
+ final_flags = MakeRelativePathsInFlagsAbsolute(
+ compilation_info.compiler_flags_,
+ compilation_info.compiler_working_dir_ )
+
+ else:
+ relative_to = DirectoryOfThisScript()
+ final_flags = MakeRelativePathsInFlagsAbsolute( flags, relative_to )
+
+ # Workaround for clang bug regarding default paths in compiling from
+ # libclang.so vs the clang binary
+ final_flags.extend([
+ "-isystem/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/",
+ "-isystem/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/7.0.2/include"
+ ])
+
+ return {
+ 'flags': final_flags,
+ 'do_cache': True
+ }
diff --git a/scripts/packing.config b/scripts/packing.config
new file mode 100644
index 0000000..faa51b5
--- /dev/null
+++ b/scripts/packing.config
@@ -0,0 +1,69 @@
+{
+ "globalIgnore" : [
+ "/\\.",
+ "/~",
+ "thumbs\\.db$",
+ "\\.bak$",
+ "\\.tmp$",
+ "\\.zip$",
+ "\\.orig$",
+ "\\.fail$",
+ "\\.psd$",
+ "\\.tmx$"
+ ],
+
+ "serverIgnore" : [
+ "\\.ogg$",
+ "\\.wav$"
+ ],
+
+ "extensionOrdering" : [
+ "",
+ "config",
+ "bush",
+ "grass",
+ "modularfoliage",
+ "modularstem",
+ "projectile",
+ "monstertype",
+ "monsterpart",
+ "npctype",
+ "npctype",
+ "vehicle",
+ "particle",
+ "animation",
+ "object",
+ "liquid",
+ "material",
+ "object",
+ "coin",
+ "miningtool",
+ "flashlight",
+ "wiretool",
+ "beamminingtool",
+ "harvestingtool",
+ "tillingtool",
+ "paintingbeamtool",
+ "headarmor",
+ "chestarmor",
+ "legsarmor",
+ "backarmor",
+ "consumable",
+ "blueprint",
+ "codex",
+ "techitem",
+ "instrument",
+ "grapplinghook",
+ "thrownitem",
+ "unlockitem",
+ "activeitem",
+ "augmentitem",
+ "material",
+ "matmod",
+ "lua",
+ "frames",
+ "png",
+ "wav",
+ "ogg"
+ ]
+}
diff --git a/scripts/steam_appid.txt b/scripts/steam_appid.txt
new file mode 100644
index 0000000..ba0ecc1
--- /dev/null
+++ b/scripts/steam_appid.txt
@@ -0,0 +1 @@
+367540
diff --git a/scripts/windows/build.bat b/scripts/windows/build.bat
new file mode 100644
index 0000000..8d84823
--- /dev/null
+++ b/scripts/windows/build.bat
@@ -0,0 +1,7 @@
+cd /d %~dp0
+cd ..\..
+
+cd build
+IF %ERRORLEVEL% NEQ 0 exit /b %ERRORLEVEL%
+
+"C:\Program Files (x86)\CMake\bin\cmake.exe" --build . --config %1
diff --git a/scripts/windows/copy-to-steam32.bat b/scripts/windows/copy-to-steam32.bat
new file mode 100644
index 0000000..5e8c414
--- /dev/null
+++ b/scripts/windows/copy-to-steam32.bat
@@ -0,0 +1,8 @@
+cd /d %~dp0
+cd ..\..\dist
+
+set STEAM_STARBOUND_DIR=c:\Program Files (x86)\Steam\steamapps\common\Starbound - Unstable
+
+.\asset_packer.exe -c ..\assets\packing.config "custom assets" ..\assets\packed .\packed.pak
+move packed.pak "%STEAM_STARBOUND_DIR%\assets\packed.pak"
+copy starbound.exe "%STEAM_STARBOUND_DIR%\win32\"
diff --git a/scripts/windows/copy-to-steam64.bat b/scripts/windows/copy-to-steam64.bat
new file mode 100644
index 0000000..319ff33
--- /dev/null
+++ b/scripts/windows/copy-to-steam64.bat
@@ -0,0 +1,8 @@
+cd /d %~dp0
+cd ..\..\dist
+
+set STEAM_STARBOUND_DIR=c:\Program Files (x86)\Steam\steamapps\common\Starbound - Unstable
+
+.\asset_packer.exe -c ..\assets\packing.config "custom assets" ..\assets\packed .\packed.pak
+move packed.pak "%STEAM_STARBOUND_DIR%\assets\packed.pak"
+copy starbound.exe "%STEAM_STARBOUND_DIR%\win64\"
diff --git a/scripts/windows/find_invalid_tiles.bat b/scripts/windows/find_invalid_tiles.bat
new file mode 100644
index 0000000..20d0bb9
--- /dev/null
+++ b/scripts/windows/find_invalid_tiles.bat
@@ -0,0 +1,7 @@
+pushd %~dp0
+pushd ..\..\dist
+map_grep "invalid=true" ..\assets\packed\dungeons\
+map_grep "invalid=true" ..\assets\devel\dungeons\
+pause
+popd
+popd
diff --git a/scripts/windows/sbinit.config b/scripts/windows/sbinit.config
new file mode 100644
index 0000000..03c55d6
--- /dev/null
+++ b/scripts/windows/sbinit.config
@@ -0,0 +1,24 @@
+{
+ "assetDirectories" : [
+ "..\\assets\\",
+ ".\\mods\\"
+ ],
+
+ "storageDirectory" : ".\\",
+
+ "assetsSettings" : {
+ "pathIgnore" : [],
+ "digestIgnore" : [
+ ".*"
+ ]
+ },
+
+ "defaultConfiguration" : {
+ "allowAdminCommandsFromAnyone" : true,
+ "anonymousConnectionsAreAdmin" : true,
+
+ "gameServerBind" : "*",
+ "queryServerBind" : "*",
+ "rconServerBind" : "*"
+ }
+}
diff --git a/scripts/windows/setup32.bat b/scripts/windows/setup32.bat
new file mode 100644
index 0000000..2934e01
--- /dev/null
+++ b/scripts/windows/setup32.bat
@@ -0,0 +1,44 @@
+cd /d %~dp0
+cd ..\..
+
+mkdir dist
+del dist\*.dll
+copy lib\windows32\*.dll dist\
+copy scripts\windows\sbinit.config dist\
+
+mkdir build
+cd build
+
+if exist "C:\Program Files (x86)\CMake\bin" (
+ set CMAKE_EXE_PATH="C:\Program Files (x86)\CMake\bin"
+) else (
+ set CMAKE_EXE_PATH="C:\Program Files\CMake\bin"
+)
+
+set QT_PREFIX_PATH=C:\Qt\5.6\msvc2015
+
+if exist %QT_PREFIX_PATH% (
+
+%CMAKE_EXE_PATH%\cmake.exe ^
+ ..\source ^
+ -G"Visual Studio 14" ^
+ -T"v140_xp" ^
+ -DSTAR_USE_JEMALLOC=OFF ^
+ -DCMAKE_PREFIX_PATH=%QT_PREFIX_PATH% ^
+ -DSTAR_BUILD_QT_TOOLS=ON ^
+ -DCMAKE_INCLUDE_PATH="..\lib\windows32\include" ^
+ -DCMAKE_LIBRARY_PATH="..\lib\windows32"
+
+) else (
+
+%CMAKE_EXE_PATH%\cmake.exe ^
+ ..\source ^
+ -G "Visual Studio 14" ^
+ -T"v140_xp" ^
+ -DSTAR_USE_JEMALLOC=OFF ^
+ -DCMAKE_INCLUDE_PATH="..\lib\windows32\include" ^
+ -DCMAKE_LIBRARY_PATH="..\lib\windows32"
+
+)
+
+pause
diff --git a/scripts/windows/setup64.bat b/scripts/windows/setup64.bat
new file mode 100644
index 0000000..c7a3d7c
--- /dev/null
+++ b/scripts/windows/setup64.bat
@@ -0,0 +1,42 @@
+cd /d %~dp0
+cd ..\..
+
+mkdir dist
+del dist\*.dll
+copy lib\windows64\*.dll dist\
+copy scripts\windows\sbinit.config dist\
+
+mkdir build
+cd build
+
+if exist "C:\Program Files (x86)\CMake\bin" (
+ set CMAKE_EXE_PATH="C:\Program Files (x86)\CMake\bin"
+) else (
+ set CMAKE_EXE_PATH="C:\Program Files\CMake\bin"
+)
+
+set QT_PREFIX_PATH=C:\Qt\5.6\msvc2015_64
+
+if exist %QT_PREFIX_PATH% (
+
+%CMAKE_EXE_PATH%\cmake.exe ^
+ ..\source ^
+ -G"Visual Studio 15 Win64" ^
+ -DSTAR_USE_JEMALLOC=ON ^
+ -DCMAKE_PREFIX_PATH=%QT_PREFIX_PATH% ^
+ -DSTAR_BUILD_QT_TOOLS=ON ^
+ -DCMAKE_INCLUDE_PATH="..\lib\windows64\include" ^
+ -DCMAKE_LIBRARY_PATH="..\lib\windows64"
+
+) else (
+
+%CMAKE_EXE_PATH%\cmake.exe ^
+ ..\source ^
+ -G "Visual Studio 15 Win64" ^
+ -DSTAR_USE_JEMALLOC=ON ^
+ -DCMAKE_INCLUDE_PATH="..\lib\windows64\include" ^
+ -DCMAKE_LIBRARY_PATH="..\lib\windows64"
+
+)
+
+pause
diff --git a/scripts/windows/showlog.bat b/scripts/windows/showlog.bat
new file mode 100644
index 0000000..407e588
--- /dev/null
+++ b/scripts/windows/showlog.bat
@@ -0,0 +1 @@
+powershell.exe -command "Get-Content -Path '%cd%\..\..\dist\starbound.log' -Wait"
diff --git a/scripts/windows/update_tilesets.bat b/scripts/windows/update_tilesets.bat
new file mode 100644
index 0000000..8155eb6
--- /dev/null
+++ b/scripts/windows/update_tilesets.bat
@@ -0,0 +1,6 @@
+pushd %~dp0
+pushd ..\..\dist
+update_tilesets
+pause
+popd
+popd