-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix domain name replacement in README.md
- Loading branch information
1 parent
237f19f
commit a5f2a0d
Showing
4 changed files
with
94 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
# jamon.dev QBasic Website | ||
|
||
This is a website powered by [QB64](https://www.qb64.org/) and [Qub](https://qub.jamon.dev). | ||
|
||
## Running Locally | ||
|
||
Run `./bin/install_qb64` to install dependencies. | ||
|
||
Run `./bin/serve` to build and run the website locally. |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
#!/bin/bash | ||
|
||
echo "This installs QB64 on a computer or server." | ||
|
||
ROOT_FOLDER=$(pwd) | ||
|
||
# Check if $ROOT_FOLDER/app.bas exists (if not, exit with an error) | ||
if [ ! -f $ROOT_FOLDER/app.bas ]; then | ||
echo "Error: app.bas not found in $ROOT_FOLDER" | ||
echo "(are you running this from the right folder?)" | ||
exit 1 | ||
fi | ||
|
||
# Figure out if we're on macos or linux | ||
OS=$(uname -s) | ||
|
||
# Set up some constants | ||
|
||
if [ "$OS" == "Darwin" ]; then | ||
echo "Installing QB64 on macos" | ||
SOURCE_CODE_URL="https://github.com/QB64Official/qb64/releases/download/v2.1/qb64_dev_2022-09-08-07-14-00_47f5044_osx.tar.gz" | ||
UNZIPPED_FOLDER="qb64_2022-09-08-23-37-44_47f5044_osx" | ||
SETUP_SCRIPT="setup_osx.command" | ||
SETUP_SCRIPT_RELATIVE="./qb64/$SETUP_SCRIPT" | ||
fi | ||
|
||
if [ "$OS" == "Linux" ]; then | ||
echo "Installing QB64 on linux" | ||
SOURCE_CODE_URL="https://github.com/QB64Official/qb64/releases/download/v2.1/qb64_dev_2022-09-08-07-14-00_47f5044_lnx.tar.gz" | ||
UNZIPPED_FOLDER="qb64_2022-09-08-23-38-12_47f5044_lnx" | ||
SETUP_SCRIPT="setup_lnx.sh" | ||
SETUP_SCRIPT_RELATIVE="./qb64/$SETUP_SCRIPT" | ||
fi | ||
|
||
# If ./qb64/qb64 exists, then we can skip the install step. | ||
if [ -d $ROOT_FOLDER/qb64 ]; then | ||
echo "./qb64 exists ... skipping install step." | ||
echo "To force reinstall, delete the ./qb64 folder" | ||
exit 0 | ||
fi | ||
|
||
# Download the latest qb64 source code | ||
curl -L -o ./qb64_src.tgz.gz $SOURCE_CODE_URL | ||
|
||
# Unzip the file | ||
tar -xf ./qb64_src.tgz.gz | ||
|
||
# Remove the zip file | ||
rm ./qb64_src.tgz.gz | ||
|
||
# Let's use ./qb64 as the folder name | ||
mv $UNZIPPED_FOLDER ./qb64 | ||
|
||
cd ./qb64 | ||
|
||
# Run the setup script | ||
|
||
if [ "$OS" == "Darwin" ]; then | ||
# Remove the "run qb64" step of the script | ||
sed -i '' 's/ .\/qb64/# .\/qb64/' $SETUP_SCRIPT | ||
open $SETUP_SCRIPT | ||
fi | ||
|
||
if [ "$OS" == "Linux" ]; then | ||
# We are (potentially) running as root, so we need to tell the script to ignore the root check | ||
# In ./qb64/setup_lnx.sh, replace the first instance of "exit 1" with "# exit 1" | ||
sed -i 's/exit 1/# exit 1/' $SETUP_SCRIPT | ||
|
||
# Also remove the "run qb64" step of the script | ||
sed -i 's/ .\/qb64 &/# .\/qb64 &/' $SETUP_SCRIPT | ||
sh $SETUP_SCRIPT | ||
fi | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters