-
Notifications
You must be signed in to change notification settings - Fork 0
Added instructions for wifi firmware update, added installation script, updated startup script #3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
GuillaumeLeroy34
wants to merge
27
commits into
main
Choose a base branch
from
startup
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
27 commits
Select commit
Hold shift + click to select a range
c4b0e38
added script to auto-install web platform dependencies
GuillaumeLeroy34 c63953b
new version
GuillaumeLeroy34 e99c733
added firmware of the deco wifi router to software folder
GuillaumeLeroy34 c8a0503
ajout de la feature qui copie automatiquement le .env.example en .env…
GuillaumeLeroy34 b7c6060
adjusted start up script to be more adapted for automator application…
GuillaumeLeroy34 9bca765
adjusted the instructions to use an automator app instead of a shell
GuillaumeLeroy34 e76be8c
added instructions for the update process of the wifi router
GuillaumeLeroy34 72514f1
fixed installation script elif statement
GuillaumeLeroy34 0d05e0e
added adb in the installation script
GuillaumeLeroy34 6873446
fixed step number for step 6
GuillaumeLeroy34 a313a56
changed the installation_instructions
GuillaumeLeroy34 e4a9780
Merge branch 'startup' of https://github.com/project-SIMPLE/M2L2 into…
GuillaumeLeroy34 d2c07a0
clarified the full path of the web platform for the installation scri…
GuillaumeLeroy34 433dff0
fixed the PATH environment variable
GuillaumeLeroy34 4da1142
renamed bin firmware
GuillaumeLeroy34 c55bc05
removed french from the installation script
GuillaumeLeroy34 3f04f0c
added Gama installation as an optionnal step
GuillaumeLeroy34 f7985df
adjusted the script so the path is correctly exported, and added the …
GuillaumeLeroy34 070fb8a
added extra echo lines to make the GAMA step a bit prettier
GuillaumeLeroy34 47bb683
adjusted step numbers
GuillaumeLeroy34 63c3bf9
moved the npm install command at the correct place
GuillaumeLeroy34 c9d3352
added an open command to automatically open a browser page at localhost
GuillaumeLeroy34 b1a383f
removed blank spaces in the first line that caused issues
GuillaumeLeroy34 6bbd690
adjusted the informations in the startup script doc
GuillaumeLeroy34 dde3642
added extra information about the permissions popups
GuillaumeLeroy34 ebfbb70
fixed positionning of the cd command for steps 5 to 7
GuillaumeLeroy34 c5d568d
fixed missing ", and added a 3 second delay between the server start …
GuillaumeLeroy34 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
Binary file not shown.
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Good, could benefit to have both some pictures of the menus and a link or two to official documentation |
This file contains hidden or 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,17 @@ | ||
| # Updating the firmware of the Deco BE25 wifi router | ||
|
|
||
| ## Doing it with a local file: | ||
|
|
||
| While connected to your the wifi router, open a browser, and go to the page 192.168.68.101 | ||
|
|
||
| The password asked by this page is the same one used when you registered on the mobile application, it is **not** the router's wifi password. | ||
|
|
||
| Then, go to "advanced", "system", and finally "fimware update" in the dropdown menu. | ||
|
|
||
| download the file named "BE25_firmware.bin" if you haven't already | ||
|
|
||
| select BE25 in the Device model, then select the file "BE25_firmware.bin" in the field "New Firmware File". | ||
|
|
||
| Wait after the process is finished you have successfully updated your Deco wifi router firmware. | ||
|
|
||
|
|
This file contains hidden or 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,20 @@ | ||
| # Using the installation script: instructions | ||
|
|
||
| ## NOTE: Before running this script, make sure you have downloaded the webplatform available [here](https://github.com/project-SIMPLE/simple.webplatform/archive/refs/heads/main.zip) and have placed it in the folder ~/Documents so the full adress of the web platform is ~/Documents/simple.webplatform | ||
|
|
||
| ### To automate the installation of all the dependencies and the setup of the web platform, the script "Installation_script.command" was created. | ||
|
|
||
| - To use it, download it, grant it execution permission (you can do this by using the command ```chmod +x file/path/to/installation_script.command``` ) | ||
|
|
||
| - Then open it. Apple will refuse to run this script, to run it once, go to the system settings, privacy and security, then scroll all the way down | ||
|
|
||
| - you should see the that Apple refused to run the script, but gives you a button called "open anyways" | ||
|
|
||
| - enter the mac Mini password, then the script will open a terminal that will: | ||
|
|
||
| - download homebrew | ||
| - download node | ||
| - download adb | ||
| - initialize the .env file using the .env.example file | ||
| - run the application a first time | ||
|
|
This file contains hidden or 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 |
|---|---|---|
| @@ -1,11 +1,21 @@ | ||
| # How to set your web platform up to automatically start when you boot your mac computer: | ||
| --- | ||
| first, open the startup_script.command file using your favorite text editor, and change line 3, initially "cd path/to/application", and change it to the actual path to your application. | ||
| To automatically start the application when you boot up your Mac computer, follow these steps: | ||
|
|
||
| Next, give execution permissions to this script by using the command "chmod +x ./startup_script.command" in a terminal located in the same folder as the startup script. | ||
| Open the automator app, then select "application" | ||
|
|
||
| Next, click on the Apple logo on the top left, then system settings, General, and finally login items. | ||
| Next, select "Run shell script" by double clicking it in the action list. you can find it by using the search bar on the top right located to the left of "variables" | ||
|
|
||
| Finally, click on the "+" on the bottom left of the table, and select the startup_script.command file. | ||
| make sure that the shell selected is /bin/sh | ||
|
|
||
| The next time you boot up your computer after completing these steps, a pop up will appear to inform you that login items have been added. You can now open a browser page at localhost:8000 and find the application there. A terminal should also be opened, and is used to run the application. | ||
| copy paste the script named "startup script" in the "run shell script" window. | ||
|
|
||
| Save the file, then click on the Apple logo on the top left, then system settings, General, and finally login items. | ||
|
|
||
| Finally, click on the "+" on the bottom left of the table, then select the app you just created. | ||
|
|
||
| The next time you boot up your computer after completing these steps, a pop up will appear to inform you that login items have been added. | ||
|
|
||
| The automator application will ask you permission for accessing local files, and discovering devices on your network. Click ok for both | ||
|
|
||
| Safari should automatically open the web platform page |
This file contains hidden or 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,108 @@ | ||
| #!/bin/bash | ||
|
|
||
| # ───────────────────────────────────────── | ||
| # setup.command | ||
| # ───────────────────────────────────────── | ||
| # Installs Homebrew → Node.js → Gama (optionnal) → runs the app | ||
|
|
||
| set -e # Exit immediately if any command fails | ||
|
|
||
| PROJECT_DIR="$HOME/Documents/simple.webplatform" | ||
|
|
||
| echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━" | ||
| echo " 🍺 Step 1: Installing Homebrew" | ||
| echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━" | ||
|
|
||
| if command -v brew &>/dev/null; then | ||
| echo "✅ Homebrew is already installed. Skipping." | ||
| else | ||
| /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" | ||
|
|
||
| # Add Homebrew to PATH for Apple Silicon Macs | ||
| if [[ -f "/opt/homebrew/bin/brew" ]]; then | ||
| eval "$(/opt/homebrew/bin/brew shellenv)" | ||
| fi | ||
|
|
||
| echo "✅ Homebrew installed successfully." | ||
| fi | ||
|
|
||
| echo "" | ||
| echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━" | ||
| echo " 🟢 Step 2: Installing Node.js" | ||
| echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━" | ||
|
|
||
| if command -v node &>/dev/null; then | ||
| echo "✅ Node.js is already installed ($(node -v)). Skipping." | ||
|
GuillaumeLeroy34 marked this conversation as resolved.
|
||
| else | ||
| brew install node | ||
| echo "✅ Node.js installed successfully ($(node -v))." | ||
| fi | ||
|
|
||
| echo "" | ||
| echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━" | ||
| echo " 🟢 Step 3: Installing adb tools" | ||
| echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━" | ||
|
|
||
| if command -v adb &>/dev/null; then | ||
| echo "adb is already installed ($(adb version))." | ||
| else | ||
| brew install --cask android-platform-tools | ||
|
GuillaumeLeroy34 marked this conversation as resolved.
|
||
| echo "✅ adb installed successfully ($(adb version))." | ||
| fi | ||
|
|
||
| echo "" | ||
| echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━" | ||
| echo " 🟢 Step 4(optionnal): Installing GAMA" | ||
| echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━" | ||
| read -r -p "Do you want to install GAMA ? (y/n) : " CONFIRM | ||
|
|
||
| if [[ "$CONFIRM" =~ ^[yY]$ ]]; then | ||
| brew install gama-jdk | ||
| echo "✅ GAMA installed sucessfully" | ||
| else | ||
| echo "⏭️ Skipped installation of GAMA" | ||
| fi | ||
|
|
||
|
|
||
|
|
||
| echo "" | ||
| echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━" | ||
| echo " 📦 Step 5: Running npm install" | ||
| echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━" | ||
|
|
||
| if [[ ! -d "$PROJECT_DIR" ]]; then | ||
|
GuillaumeLeroy34 marked this conversation as resolved.
|
||
| echo "❌ ERROR: Project folder not found at:" | ||
| echo " $PROJECT_DIR" | ||
| echo " Please make sure the folder exists and try again." | ||
| exit 1 | ||
| fi | ||
|
|
||
| cd "$PROJECT_DIR" | ||
| npm install | ||
| echo "✅ npm install complete." | ||
|
|
||
|
|
||
| echo "" | ||
| echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━" | ||
| echo " 📦 Step 6: intializing .env file" | ||
| echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━" | ||
|
|
||
| if [[ -f ".env" ]]; then | ||
| echo "✅ .env already existing, skipping..." | ||
| elif [[ -f ".env.example" ]]; then | ||
| cp .env.example .env | ||
| echo "✅ .env initialized from .env.example file" | ||
| else | ||
| echo "⚠️ couldn't find .env.example, skipping..." | ||
| fi | ||
|
|
||
|
|
||
|
|
||
| echo "" | ||
| echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━" | ||
| echo " 🚀 Step 7: Starting the app (npm start)" | ||
| echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━" | ||
| cd ~/Documents/simple.webplatform | ||
| npm start & | ||
| sleep 3 | ||
| open -a Safari http://localhost:8000 | ||
This file contains hidden or 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 |
|---|---|---|
| @@ -1,4 +1,5 @@ | ||
| # READ THE INSTRUCTIONS FIRST | ||
| #!/bin/bash | ||
| cd path/to/application | ||
| /usr/local/bin/npm start | ||
| export PATH="/usr/local/bin:/opt/homebrew/bin:$PATH" # define the path value to be able to run the application (node, adb, etc) | ||
| cd ~/Documents/simple.webplatform | ||
| npm start & # start the application, and in parallel: | ||
| sleep 3 | ||
| open -a Safari http://localhost:8000 # wait 3 seconds and open the URL of the main page of the app |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.