mirror of
https://github.com/burrow-dev/burrow-client.git
synced 2026-11-20 01:37:50 -05:00
Brought up to date with the private repository (121071e)
This commit is contained in:
1 parent
01bc0a03da
commit
55f72460f5
8 files changed
+111
-18
No files matched your search
+14
-4
@@ -677,14 +677,24 @@
|
|||||||
return choices;
|
return choices;
|
||||||
};
|
};
|
||||||
|
|
||||||
// servers reachable by strangers ignore these choices unless told otherwise.
|
// servers reachable by strangers ignore these choices unless told
|
||||||
|
// otherwise; member or not is the player's choice on a server that says
|
||||||
|
// so (membershipChoice), the other account types stay locked there.
|
||||||
|
const MEMBERSHIP_TYPES = ["", "0", "2"];
|
||||||
const showWhetherChoicesApply = flashVars => {
|
const showWhetherChoicesApply = flashVars => {
|
||||||
const honoured = flashVars.loginChoices !== false;
|
const honoured = flashVars.loginChoices !== false;
|
||||||
|
const membership = honoured || flashVars.membershipChoice === true;
|
||||||
for (const field of document.querySelectorAll("[data-choice]")) {
|
for (const field of document.querySelectorAll("[data-choice]")) {
|
||||||
field.disabled = !honoured;
|
field.disabled = field.id === "account-type" ? !membership : !honoured;
|
||||||
|
}
|
||||||
|
for (const option of $("account-type").options) {
|
||||||
|
option.disabled = !honoured && !MEMBERSHIP_TYPES.includes(option.value);
|
||||||
|
}
|
||||||
|
if ($("account-type").selectedOptions[0] && $("account-type").selectedOptions[0].disabled) {
|
||||||
|
$("account-type").value = "";
|
||||||
}
|
}
|
||||||
$("choices-hint").hidden = honoured;
|
$("choices-hint").hidden = honoured;
|
||||||
$("choices-hint").textContent = honoured ? "" : "Locked by this server.";
|
$("choices-hint").textContent = honoured ? "" : membership ? "Developer and Guide are locked by this server." : "Locked by this server.";
|
||||||
};
|
};
|
||||||
|
|
||||||
const getJson = async (url, options) => {
|
const getJson = async (url, options) => {
|
||||||
@@ -946,6 +956,7 @@
|
|||||||
|
|
||||||
const gamePort = flashVars.smartfoxPort;
|
const gamePort = flashVars.smartfoxPort;
|
||||||
delete flashVars.loginChoices;
|
delete flashVars.loginChoices;
|
||||||
|
delete flashVars.membershipChoice;
|
||||||
Object.assign(flashVars, {
|
Object.assign(flashVars, {
|
||||||
smartfoxServer: player.body.game_server || flashVars.smartfoxServer,
|
smartfoxServer: player.body.game_server || flashVars.smartfoxServer,
|
||||||
blueboxServer: player.body.game_server || flashVars.blueboxServer,
|
blueboxServer: player.body.game_server || flashVars.blueboxServer,
|
||||||
@@ -1401,7 +1412,6 @@
|
|||||||
if (latest) {
|
if (latest) {
|
||||||
$("username").value = latest.username;
|
$("username").value = latest.username;
|
||||||
$("remember").checked = true;
|
$("remember").checked = true;
|
||||||
$("password").placeholder = "Remembered: leave empty";
|
|
||||||
}
|
}
|
||||||
checkServer();
|
checkServer();
|
||||||
// the first answer includes making the connection; the second is the ping.
|
// the first answer includes making the connection; the second is the ping.
|
||||||
|
|||||||
+1
-1
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "aj-private-client",
|
"name": "aj-private-client",
|
||||||
"productName": "Burrow",
|
"productName": "Burrow",
|
||||||
"version": "1.1.0",
|
"version": "1.1.1",
|
||||||
"description": "The client for the Burrow private server",
|
"description": "The client for the Burrow private server",
|
||||||
"main": "boot.js",
|
"main": "boot.js",
|
||||||
"license": "UNLICENSED"
|
"license": "UNLICENSED"
|
||||||
|
|||||||
Binary file not shown.
@@ -0,0 +1,50 @@
|
|||||||
|
{
|
||||||
|
"description": "Pepper Flash Player",
|
||||||
|
"name": "Flapper",
|
||||||
|
"version": "32.0.0.330",
|
||||||
|
"x-flapper-revision": "100864",
|
||||||
|
"x-ppapi-arch": "x64",
|
||||||
|
"x-ppapi-os": "linux",
|
||||||
|
"x-ppapi-required-interfaces": [
|
||||||
|
"PPB_AudioConfig;1.1|PPB_AudioConfig;1.0",
|
||||||
|
"PPB_AudioInput(Dev);0.4|PPB_AudioInput(Dev);0.3",
|
||||||
|
"PPB_Audio;1.1|PPB_Audio;1.0",
|
||||||
|
"PPB_BrowserFont_Trusted;1.0",
|
||||||
|
"PPB_Buffer(Dev);0.4",
|
||||||
|
"PPB_CharSet(Dev);0.4",
|
||||||
|
"PPB_Core;1.0",
|
||||||
|
"PPB_Crypto(Dev);0.1",
|
||||||
|
"PPB_CursorControl(Dev);0.4",
|
||||||
|
"PPB_FileChooser(Dev);0.6|PPB_FileChooser(Dev);0.5",
|
||||||
|
"PPB_FileChooserTrusted;0.6|PPB_FileChooserTrusted;0.5",
|
||||||
|
"PPB_FileRef;1.2|PPB_FileRef;1.1|PPB_FileRef;1.0",
|
||||||
|
"PPB_Flash_Clipboard;5.1|PPB_Flash_Clipboard;5.0|PPB_Flash_Clipboard;4.0",
|
||||||
|
"PPB_Flash_File_FileRef;2",
|
||||||
|
"PPB_Flash_File_ModuleLocal;3",
|
||||||
|
"PPB_Flash_FontFile;0.2|PPB_Flash_FontFile;0.1|PPB_PDF;1",
|
||||||
|
"PPB_FlashFullscreen;1.0|PPB_FlashFullscreen;0.1",
|
||||||
|
"PPB_Flash;13.0|PPB_Flash;12.6|PPB_Flash;12.5|PPB_Flash;12.4",
|
||||||
|
"PPB_Flash_Menu;0.2",
|
||||||
|
"PPB_Graphics2D;1.1|PPB_Graphics2D;1.0",
|
||||||
|
"PPB_Graphics3D;1.0",
|
||||||
|
"PPB_ImageData;1.0",
|
||||||
|
"PPB_IMEInputEvent(Dev);0.2|PPB_IMEInputEvent(Dev);0.1",
|
||||||
|
"PPB_InputEvent;1.0",
|
||||||
|
"PPB_Instance;1.0",
|
||||||
|
"PPB_Memory(Dev);0.1",
|
||||||
|
"PPB_NetAddress_Private;1.1|PPB_NetAddress_Private;1.0|PPB_NetAddress_Private;0.1",
|
||||||
|
"PPB_OpenGLES2ChromiumMapSub;1.0|PPB_OpenGLES2ChromiumMapSub(Dev);1.0|PPB_GLESChromiumTextureMapping(Dev);0.1",
|
||||||
|
"PPB_OpenGLES2;1.0",
|
||||||
|
"PPB_TCPSocket_Private;0.5|PPB_TCPSocket_Private;0.4|PPB_TCPSocket_Private;0.3",
|
||||||
|
"PPB_TextInput(Dev);0.2|PPB_TextInput(Dev);0.1",
|
||||||
|
"PPB_UDPSocket_Private;0.4|PPB_UDPSocket_Private;0.3",
|
||||||
|
"PPB_URLLoader;1.0",
|
||||||
|
"PPB_URLLoaderTrusted;0.3",
|
||||||
|
"PPB_URLRequestInfo;1.0",
|
||||||
|
"PPB_URLResponseInfo;1.0",
|
||||||
|
"PPB_URLUtil(Dev);0.7|PPB_URLUtil(Dev);0.6",
|
||||||
|
"PPB_Var;1.2|PPB_Var;1.1|PPB_Var;1.0",
|
||||||
|
"PPB_VideoCapture(Dev);0.3",
|
||||||
|
"PPB_View;1.2|PPB_View;1.1|PPB_View;1.0"
|
||||||
|
]
|
||||||
|
}
|
||||||
Binary file not shown.
@@ -21,6 +21,14 @@ done
|
|||||||
[ -d "$flash" ] || { echo "no flash plugin at $flash (BUILDING.md says where to get it)" >&2; exit 1; }
|
[ -d "$flash" ] || { echo "no flash plugin at $flash (BUILDING.md says where to get it)" >&2; exit 1; }
|
||||||
|
|
||||||
dist=$here/dist
|
dist=$here/dist
|
||||||
|
|
||||||
|
# what the download page says each installer is: a line each in dist/RELEASES
|
||||||
|
# ("Burrow-Setup.exe 1.1.1 2026-10-15"), sent up with the installers
|
||||||
|
note_release() {
|
||||||
|
local list=$dist/RELEASES
|
||||||
|
{ awk -v file="$1" '$1 != file' "$list" 2>/dev/null || true; echo "$1 $2 $(date -u +%F)"; } > "$list.new"
|
||||||
|
mv "$list.new" "$list"
|
||||||
|
}
|
||||||
work=$(mktemp -d)
|
work=$(mktemp -d)
|
||||||
mkdir -p "$dist"
|
mkdir -p "$dist"
|
||||||
cd "$work"
|
cd "$work"
|
||||||
@@ -62,3 +70,4 @@ ln -s /Applications image/Applications
|
|||||||
rm -f "$dist/Burrow-macos.dmg"
|
rm -f "$dist/Burrow-macos.dmg"
|
||||||
hdiutil create -volname Burrow -srcfolder image -ov -format UDZO "$dist/Burrow-macos.dmg"
|
hdiutil create -volname Burrow -srcfolder image -ov -format UDZO "$dist/Burrow-macos.dmg"
|
||||||
shasum -a 256 "$dist/Burrow-macos.dmg"
|
shasum -a 256 "$dist/Burrow-macos.dmg"
|
||||||
|
note_release Burrow-macos.dmg "$(sed -n 's/.*"version": *"\([^"]*\)".*/\1/p' "$here/app/package.json")"
|
||||||
@@ -37,6 +37,14 @@ work=$(mktemp -d)
|
|||||||
trap 'rm -rf "$work"' EXIT
|
trap 'rm -rf "$work"' EXIT
|
||||||
mkdir -p "$dist"
|
mkdir -p "$dist"
|
||||||
|
|
||||||
|
# what the download page says each installer is: a line each in dist/RELEASES
|
||||||
|
# ("Burrow-Setup.exe 1.1.1 2026-10-15"), sent up with the installers
|
||||||
|
note_release() {
|
||||||
|
local list=$dist/RELEASES
|
||||||
|
{ awk -v file="$1" '$1 != file' "$list" 2>/dev/null || true; echo "$1 $2 $(date -u +%F)"; } > "$list.new"
|
||||||
|
mv "$list.new" "$list"
|
||||||
|
}
|
||||||
|
|
||||||
# the app as players get it, with the server's address
|
# the app as players get it, with the server's address
|
||||||
cp -r "$here/app" "$work/app"
|
cp -r "$here/app" "$work/app"
|
||||||
if [ -n "$server" ]; then
|
if [ -n "$server" ]; then
|
||||||
@@ -91,6 +99,7 @@ for target in "${targets[@]}"; do
|
|||||||
nsis=$(cd "$here/installer" && node -e 'require("app-builder-lib/out/toolsets/windows.js").getMakeNsisPath().then(r => console.log(r.path))')
|
nsis=$(cd "$here/installer" && node -e 'require("app-builder-lib/out/toolsets/windows.js").getMakeNsisPath().then(r => console.log(r.path))')
|
||||||
NSISDIR=$(dirname "$(dirname "$nsis")") "$nsis" -V2 -DVERSION="$version" -DSOURCE="$win" -DOUTFILE="$dist/Burrow-Setup.exe" \
|
NSISDIR=$(dirname "$(dirname "$nsis")") "$nsis" -V2 -DVERSION="$version" -DSOURCE="$win" -DOUTFILE="$dist/Burrow-Setup.exe" \
|
||||||
-DICON="$here/tools/icon.ico" -DFILES="$work/files.nsh" "$here/installer/burrow.nsi"
|
-DICON="$here/tools/icon.ico" -DFILES="$work/files.nsh" "$here/installer/burrow.nsi"
|
||||||
|
note_release Burrow-Setup.exe "$version"
|
||||||
;;
|
;;
|
||||||
linux)
|
linux)
|
||||||
need "$here/electron/electron"
|
need "$here/electron/electron"
|
||||||
@@ -100,6 +109,9 @@ for target in "${targets[@]}"; do
|
|||||||
chmod 755 "$work/electron/electron" "$work/electron/chrome-sandbox"
|
chmod 755 "$work/electron/electron" "$work/electron/chrome-sandbox"
|
||||||
builder "$work/electron" --linux --x64
|
builder "$work/electron" --linux --x64
|
||||||
cp "$work/out/Burrow-x86_64.AppImage" "$work/out/burrow_amd64.deb" "$work/out/burrow.x86_64.rpm" "$dist/"
|
cp "$work/out/Burrow-x86_64.AppImage" "$work/out/burrow_amd64.deb" "$work/out/burrow.x86_64.rpm" "$dist/"
|
||||||
|
for file in Burrow-x86_64.AppImage burrow_amd64.deb burrow.x86_64.rpm; do
|
||||||
|
note_release "$file" "$version"
|
||||||
|
done
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
rm -rf "$work/out"
|
rm -rf "$work/out"
|
||||||
|
|||||||
+25
-13
@@ -7,8 +7,8 @@
|
|||||||
# no markdown file of any kind goes public. the public repository has a
|
# no markdown file of any kind goes public. the public repository has a
|
||||||
# history of its own: nothing of this one's
|
# history of its own: nothing of this one's
|
||||||
# history goes there, so a file that was ever committed here and is private
|
# history goes there, so a file that was ever committed here and is private
|
||||||
# never shows up in an old public commit. its .gitignore names the private
|
# never shows up in an old public commit. the public repository's own files
|
||||||
# paths too, so they are not added there by hand either.
|
# (its README, .gitignore and licence, written there) are left as they are.
|
||||||
set -euo pipefail
|
set -euo pipefail
|
||||||
|
|
||||||
name=burrow-client
|
name=burrow-client
|
||||||
@@ -17,6 +17,9 @@ [email protected]:burrow-dev/$name.git
|
|||||||
# (Electron, the Flash plugin, the builds)
|
# (Electron, the Flash plugin, the builds)
|
||||||
private=()
|
private=()
|
||||||
|
|
||||||
|
# the public repository's own: never replaced or removed from here
|
||||||
|
public_own=(README.md .gitignore LICENSE)
|
||||||
|
|
||||||
here=$(cd "$(dirname "$0")/.." && pwd)
|
here=$(cd "$(dirname "$0")/.." && pwd)
|
||||||
public=${BURROW_PUBLIC_DIR:-$HOME/burrow-public/$name}
|
public=${BURROW_PUBLIC_DIR:-$HOME/burrow-public/$name}
|
||||||
push=1
|
push=1
|
||||||
@@ -56,21 +59,30 @@ if [ -n "$leaked" ]; then
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
{
|
rm -f "$work/.gitignore"
|
||||||
cat "$work/.gitignore"
|
|
||||||
printf '\n# kept in the private repository, never here\n'
|
|
||||||
printf '*.md\n'
|
|
||||||
for path in "${private[@]+"${private[@]}"}"; do
|
|
||||||
printf '/%s\n' "$path"
|
|
||||||
done
|
|
||||||
} > "$work/.gitignore.public"
|
|
||||||
mv "$work/.gitignore.public" "$work/.gitignore"
|
|
||||||
|
|
||||||
# the public tree becomes exactly this
|
# start from what is on github: changes made there are kept
|
||||||
find "$public" -mindepth 1 -maxdepth 1 ! -name .git -exec rm -rf {} +
|
if git -C "$public" fetch -q origin main 2>/dev/null; then
|
||||||
|
git -C "$public" reset -q --hard origin/main
|
||||||
|
fi
|
||||||
|
|
||||||
|
# the public tree becomes exactly this, beside the public repository's own
|
||||||
|
keep=(! -name .git)
|
||||||
|
for name in "${public_own[@]}"; do
|
||||||
|
keep+=(! -name "$name")
|
||||||
|
rm -rf "${work:?}/$name"
|
||||||
|
done
|
||||||
|
find "$public" -mindepth 1 -maxdepth 1 "${keep[@]}" -exec rm -rf {} +
|
||||||
cp -a "$work/." "$public/"
|
cp -a "$work/." "$public/"
|
||||||
cd "$public"
|
cd "$public"
|
||||||
git add -A
|
git add -A
|
||||||
|
# its .gitignore must not hold back a file meant to go public
|
||||||
|
missing=$(cd "$work" && find . -type f | sed 's|^\./||' | sort | comm -23 - <(git -C "$public" ls-files --cached | sort))
|
||||||
|
if [ -n "$missing" ]; then
|
||||||
|
echo "refused: the public .gitignore holds these back ($(echo "$missing" | wc -l) files), e.g.:" >&2
|
||||||
|
echo "$missing" | head -5 >&2
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
if git diff --cached --quiet; then
|
if git diff --cached --quiet; then
|
||||||
echo "the public copy is already up to date"
|
echo "the public copy is already up to date"
|
||||||
exit 0
|
exit 0
|
||||||
|
|||||||
Reference in new issue
Block a user