Skip to content
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

Install submodules script #4

Open
wants to merge 8 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
140 changes: 1 addition & 139 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,141 +1,3 @@
[submodule "OpenFrameworks"]
path = OpenFrameworks
url = https://github.com/local-projects/openFrameworks.git
[submodule "ExternalAddons/ofxRemoteUI"]
path = ExternalAddons/ofxRemoteUI
url = https://github.com/local-projects/ofxRemoteUI.git
[submodule "ExternalAddons/ofxTimeMeasurements"]
path = ExternalAddons/ofxTimeMeasurements
url = https://github.com/local-projects/ofxTimeMeasurements.git
[submodule "ExternalAddons/ofxTuio"]
path = ExternalAddons/ofxTuio
url = https://github.com/local-projects/ofxTuio.git
[submodule "ExternalAddons/ofxHistoryPlot"]
path = ExternalAddons/ofxHistoryPlot
url = https://github.com/local-projects/ofxHistoryPlot.git
[submodule "ExternalAddons/ofxFontStash"]
path = ExternalAddons/ofxFontStash
url = https://github.com/local-projects/ofxFontStash.git
[submodule "ExternalAddons/ofxSimpleHttp"]
path = ExternalAddons/ofxSimpleHttp
url = https://github.com/local-projects/ofxSimpleHttp.git
[submodule "ExternalAddons/ofxSuperLog"]
path = ExternalAddons/ofxSuperLog
url = https://github.com/local-projects/ofxSuperLog.git
[submodule "ExternalAddons/ofxAutoReloadedShader"]
path = ExternalAddons/ofxAutoReloadedShader
url = https://github.com/local-projects/ofxAutoReloadedShader.git
[submodule "ExternalAddons/ofxFboBlur"]
path = ExternalAddons/ofxFboBlur
url = https://github.com/local-projects/ofxFboBlur.git
[submodule "ExternalAddons/ofxScreenSetup"]
path = ExternalAddons/ofxScreenSetup
url = https://github.com/local-projects/ofxScreenSetup.git
[submodule "ExternalAddons/ofxMullion"]
path = ExternalAddons/ofxMullion
url = https://github.com/local-projects/ofxMullion.git
[submodule "ExternalAddons/ofxGLError"]
path = ExternalAddons/ofxGLError
url = https://github.com/local-projects/ofxGLError.git
[submodule "ExternalAddons/ofxProgressiveTextureLoad"]
path = ExternalAddons/ofxProgressiveTextureLoad
url = https://github.com/local-projects/ofxProgressiveTextureLoad.git
[submodule "ExternalAddons/ofxMemoryUsage"]
path = ExternalAddons/ofxMemoryUsage
url = https://github.com/local-projects/ofxMemoryUsage.git
[submodule "ExternalAddons/ofxTexturedObject"]
path = ExternalAddons/ofxTexturedObject
url = https://github.com/local-projects/ofxTexturedObject.git
[submodule "ExternalAddons/ofxStateMachine"]
path = ExternalAddons/ofxStateMachine
url = https://github.com/local-projects/ofxStateMachine.git
[submodule "ExternalAddons/ofxGoogleAnalytics"]
path = ExternalAddons/ofxGoogleAnalytics
url = https://github.com/local-projects/ofxGoogleAnalytics.git
[submodule "ExternalAddons/ofxMTJsonParser"]
path = ExternalAddons/ofxMTJsonParser
url = https://github.com/local-projects/ofxMTJsonParser.git
[submodule "ExternalAddons/WeightedObject"]
path = ExternalAddons/WeightedObject
url = https://github.com/local-projects/WeightedObject.git
[submodule "ExternalAddons/ofxTextureAtlas"]
path = ExternalAddons/ofxTextureAtlas
url = https://github.com/local-projects/ofxTextureAtlas.git
[submodule "ExternalAddons/ofxThreadSafeLog"]
path = ExternalAddons/ofxThreadSafeLog
url = https://github.com/local-projects/ofxThreadSafeLog.git
[submodule "ExternalAddons/ofxAssets"]
path = ExternalAddons/ofxAssets
url = https://github.com/local-projects/ofxAssets.git
[submodule "ExternalAddons/ofxInterface"]
path = ExternalAddons/ofxInterface
url = https://github.com/local-projects/ofxInterface.git
[submodule "ExternalAddons/ofxTagSystem"]
path = ExternalAddons/ofxTagSystem
url = https://github.com/local-projects/ofxTagSystem.git
[submodule "ExternalAddons/ofxAnimatable"]
path = ExternalAddons/ofxAnimatable
url = https://github.com/local-projects/ofxAnimatable.git
[submodule "ExternalAddons/ofxFontStash2"]
path = ExternalAddons/ofxFontStash2
url = https://github.com/local-projects/ofxFontStash2.git
[submodule "ExternalAddons/ofxApp"]
path = ExternalAddons/ofxApp
url = https://github.com/local-projects/ofxApp.git
[submodule "ExternalAddons/ofxAutoTexture"]
path = ExternalAddons/ofxAutoTexture
url = https://github.com/local-projects/ofxAutoTexture.git
[submodule "ExternalAddons/ofxColorGradient"]
path = ExternalAddons/ofxColorGradient
url = https://github.com/local-projects/ofxColorGradient.git
[submodule "ExternalAddons/ofxCv"]
path = ExternalAddons/ofxCv
url = https://github.com/local-projects/ofxCv.git
[submodule "ExternalAddons/ofxExternalProcess"]
path = ExternalAddons/ofxExternalProcess
url = https://github.com/local-projects/ofxExternalProcess.git
[submodule "ExternalAddons/ofxHttpForm"]
path = ExternalAddons/ofxHttpForm
url = https://github.com/local-projects/ofxHttpForm.git
[submodule "ExternalAddons/ofxJsonSettings"]
path = ExternalAddons/ofxJsonSettings
url = https://github.com/local-projects/ofxJsonSettings.git
[submodule "ExternalAddons/ofxOscRecorder"]
path = ExternalAddons/ofxOscRecorder
url = https://github.com/local-projects/ofxOscRecorder.git
[submodule "ExternalAddons/ofxRectangleUtils"]
path = ExternalAddons/ofxRectangleUtils
url = https://github.com/local-projects/ofxRectangleUtils.git
[submodule "ExternalAddons/ofxRay"]
path = ExternalAddons/ofxRay
url = https://github.com/local-projects/ofxRay.git
[submodule "ExternalAddons/ofxSensu"]
path = ExternalAddons/ofxSensu
url = https://github.com/local-projects/ofxSensu.git
[submodule "ExternalAddons/ofxUserContentUpload"]
path = ExternalAddons/ofxUserContentUpload
url = https://github.com/local-projects/ofxUserContentUpload.git
[submodule "ExternalAddons/ofxJSON"]
path = ExternalAddons/ofxJSON
url = https://github.com/local-projects/ofxJSON.git
[submodule "ExternalAddons/ofxNanoVG"]
path = ExternalAddons/ofxNanoVG
url = https://github.com/local-projects/ofxNanoVG.git
[submodule "ExternalAddons/ofxTextureCrop"]
path = ExternalAddons/ofxTextureCrop
url = https://github.com/local-projects/ofxTextureCrop.git
[submodule "ExternalAddons/ofxInterfaceKeyboard"]
path = ExternalAddons/ofxInterfaceKeyboard
url = https://github.com/local-projects/ofxInterfaceKeyboard.git
[submodule "ExternalAddons/ofxImageResizer"]
path = ExternalAddons/ofxImageResizer
url = https://github.com/local-projects/ofxImageResizer.git
[submodule "ExternalAddons/ofxLibwebsockets"]
path = ExternalAddons/ofxLibwebsockets
url = https://github.com/local-projects/ofxLibwebsockets.git
[submodule "ExternalAddons/ofxNotificationCenter"]
path = ExternalAddons/ofxNotificationCenter
url = https://github.com/local-projects/ofxNotificationCenter.git
[submodule "ExternalAddons/ofxProjectionApp"]
path = ExternalAddons/ofxProjectionApp
url = https://github.com/local-projects/ofxProjectionApp.git
url = https://github.com/hushstudios/openFrameworks
11 changes: 11 additions & 0 deletions ExternalAddons.make
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
ofxRemoteUI,https://github.com/hushstudios/ofxRemoteUI.git
ofxTimeMeasurements,https://github.com/hushstudios/ofxTimeMeasurements.git
ofxHistoryPlot,https://github.com/hushstudios/ofxHistoryPlot.git
ofxFontStash,https://github.com/hushstudios/ofxFontStash.git
ofxSimpleHttp,https://github.com/hushstudios/ofxSimpleHttp.git
ofxSuperLog,https://github.com/hushstudios/ofxSuperLog.git
ofxScreenSetup,https://github.com/hushstudios/ofxScreenSetup.git
ofxInterface,https://github.com/hushstudios/ofxInterface.git
ofxAnimatable,https://github.com/hushstudios/ofxAnimatable.git
ofxNotificationCenter,https://github.com/hushstudios/ofxNotificationCenter.git
END OF FILE
1 change: 0 additions & 1 deletion ExternalAddons/WeightedObject
Submodule WeightedObject deleted from 6f0a1b
1 change: 0 additions & 1 deletion ExternalAddons/ofxAnimatable
Submodule ofxAnimatable deleted from 47a89a
1 change: 0 additions & 1 deletion ExternalAddons/ofxApp
Submodule ofxApp deleted from d28ac5
1 change: 0 additions & 1 deletion ExternalAddons/ofxAssets
Submodule ofxAssets deleted from 91e75b
1 change: 0 additions & 1 deletion ExternalAddons/ofxAutoReloadedShader
Submodule ofxAutoReloadedShader deleted from 00d30a
1 change: 0 additions & 1 deletion ExternalAddons/ofxAutoTexture
Submodule ofxAutoTexture deleted from 47a789
1 change: 0 additions & 1 deletion ExternalAddons/ofxColorGradient
Submodule ofxColorGradient deleted from 10720f
1 change: 0 additions & 1 deletion ExternalAddons/ofxCv
Submodule ofxCv deleted from 8a6155
1 change: 0 additions & 1 deletion ExternalAddons/ofxExternalProcess
Submodule ofxExternalProcess deleted from f543cb
1 change: 0 additions & 1 deletion ExternalAddons/ofxFboBlur
Submodule ofxFboBlur deleted from 96d469
1 change: 0 additions & 1 deletion ExternalAddons/ofxFontStash
Submodule ofxFontStash deleted from ee7f26
1 change: 0 additions & 1 deletion ExternalAddons/ofxFontStash2
Submodule ofxFontStash2 deleted from 390693
1 change: 0 additions & 1 deletion ExternalAddons/ofxGLError
Submodule ofxGLError deleted from 9aca8c
1 change: 0 additions & 1 deletion ExternalAddons/ofxGoogleAnalytics
Submodule ofxGoogleAnalytics deleted from adb73c
1 change: 0 additions & 1 deletion ExternalAddons/ofxHistoryPlot
Submodule ofxHistoryPlot deleted from 2f4690
1 change: 0 additions & 1 deletion ExternalAddons/ofxHttpForm
Submodule ofxHttpForm deleted from 5f5cb2
1 change: 0 additions & 1 deletion ExternalAddons/ofxImageResizer
Submodule ofxImageResizer deleted from aba40c
1 change: 0 additions & 1 deletion ExternalAddons/ofxInterface
Submodule ofxInterface deleted from 95c3ff
1 change: 0 additions & 1 deletion ExternalAddons/ofxInterfaceKeyboard
Submodule ofxInterfaceKeyboard deleted from fb60e2
1 change: 0 additions & 1 deletion ExternalAddons/ofxJSON
Submodule ofxJSON deleted from 3d93b1
1 change: 0 additions & 1 deletion ExternalAddons/ofxJsonSettings
Submodule ofxJsonSettings deleted from a15929
1 change: 0 additions & 1 deletion ExternalAddons/ofxLibwebsockets
Submodule ofxLibwebsockets deleted from deb466
1 change: 0 additions & 1 deletion ExternalAddons/ofxMTJsonParser
Submodule ofxMTJsonParser deleted from 2ae60f
1 change: 0 additions & 1 deletion ExternalAddons/ofxMemoryUsage
Submodule ofxMemoryUsage deleted from 901caf
1 change: 0 additions & 1 deletion ExternalAddons/ofxMullion
Submodule ofxMullion deleted from ec43f3
1 change: 0 additions & 1 deletion ExternalAddons/ofxNanoVG
Submodule ofxNanoVG deleted from 3b8a5b
1 change: 0 additions & 1 deletion ExternalAddons/ofxNotificationCenter
Submodule ofxNotificationCenter deleted from cee27c
1 change: 0 additions & 1 deletion ExternalAddons/ofxOscRecorder
Submodule ofxOscRecorder deleted from 15e7f1
1 change: 0 additions & 1 deletion ExternalAddons/ofxProgressiveTextureLoad
Submodule ofxProgressiveTextureLoad deleted from b39e02
1 change: 0 additions & 1 deletion ExternalAddons/ofxProjectionApp
Submodule ofxProjectionApp deleted from d2ddf8
1 change: 0 additions & 1 deletion ExternalAddons/ofxRay
Submodule ofxRay deleted from e23a56
1 change: 0 additions & 1 deletion ExternalAddons/ofxRectangleUtils
Submodule ofxRectangleUtils deleted from abb420
1 change: 0 additions & 1 deletion ExternalAddons/ofxRemoteUI
Submodule ofxRemoteUI deleted from 21f3f3
1 change: 0 additions & 1 deletion ExternalAddons/ofxScreenSetup
Submodule ofxScreenSetup deleted from 6ca4b0
1 change: 0 additions & 1 deletion ExternalAddons/ofxSensu
Submodule ofxSensu deleted from 47530b
1 change: 0 additions & 1 deletion ExternalAddons/ofxSimpleHttp
Submodule ofxSimpleHttp deleted from 20e953
1 change: 0 additions & 1 deletion ExternalAddons/ofxStateMachine
Submodule ofxStateMachine deleted from b58196
1 change: 0 additions & 1 deletion ExternalAddons/ofxSuperLog
Submodule ofxSuperLog deleted from 5a6ae8
1 change: 0 additions & 1 deletion ExternalAddons/ofxTagSystem
Submodule ofxTagSystem deleted from 9f4e47
1 change: 0 additions & 1 deletion ExternalAddons/ofxTextureAtlas
Submodule ofxTextureAtlas deleted from e5c6e3
1 change: 0 additions & 1 deletion ExternalAddons/ofxTextureCrop
Submodule ofxTextureCrop deleted from fbda27
1 change: 0 additions & 1 deletion ExternalAddons/ofxTexturedObject
Submodule ofxTexturedObject deleted from dc3642
1 change: 0 additions & 1 deletion ExternalAddons/ofxThreadSafeLog
Submodule ofxThreadSafeLog deleted from f38cbf
1 change: 0 additions & 1 deletion ExternalAddons/ofxTimeMeasurements
Submodule ofxTimeMeasurements deleted from e1cedb
1 change: 0 additions & 1 deletion ExternalAddons/ofxTuio
Submodule ofxTuio deleted from 13a208
1 change: 0 additions & 1 deletion ExternalAddons/ofxUserContentUpload
Submodule ofxUserContentUpload deleted from c153ac
2 changes: 1 addition & 1 deletion OpenFrameworks
Submodule OpenFrameworks updated 332 files
43 changes: 31 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,29 +47,48 @@ git clone -b version/0.11.0 --recursive https://github.com/local-projects/of-pro

This will create a new project, download its submodules (OF and external addons inlcuded), and download OF libraries.

1. [Create a new, empty Github repository](https://github.com/new) repository to copy the template into. For example, let' call this repo **myProject** in the Github user account **local-projects**.
1. [Create a new, empty Github repository](https://github.com/new) repository. For example, let' call this repo **myProject** in the Github user account **local-projects**.

2. Clone the template onto your computer. The branch should match your desired OF version (here, **0.11.0**). Supported versions include `0.11.0`. Passing the `--recursive` command will download all submodules, including OF and any external addons.
2. Clone your project repo.

```bash
git clone -b version/0.11.0 --recursive https://github.com/local-projects/of-project-template.git
```bash
git clone https://github.com/local-projects/myProject.git
```

3. Rename this template folder to the name of your repo. Navigate into the repo.
3. Add the of-project-template as a remote named **template**.

```bash
cd myProject
git remote add template https://github.com/local-projects/of-project-template.git
```

4. Pull the of-project-template repo, pointing to the correct branch. Below pulls the branch **version/0.11.0**.

```bash
mv of-project-template myProject
cd myProject
git pull template version/0.11.0
```

5. Update the ***ExternallAddons.make*** file with the addons for the project. The format should follow the example below. Each line represents a new addon with the **name of the addon** and **addon repo URL** seperated by a comma respectively. The purpose of this script is to make the template less bulky and independent of specific addons.

4. Set the remote origin to your project repo. Push the template files to your repo.
```bash
ofxRemoteUI,https://github.com/local-projects/ofxRemoteUI.git
ofxTimeMeasurements,https://github.com/local-projects/ofxTimeMeasurements.git
```

```bash
git remote set-url origin https://github.com/local-projects/myProject.git
git push
6. Once the ***ExternallAddons.make*** file is complete, install the submodules using the ***install_submodules.sh*** script. This script will clone openFrameworks and all addons in the make file.

```bash
./install_submodules.sh
```

5. Download OpenFrameworks libraries. Pass the platform (here, Visual Studio 2017) and the version (here, 0.11.0 — this should correspond with the template's branch version above).
7. Add the changes to your project repo.

```bash
git add .
git push
```

8. ownload OpenFrameworks libraries. Pass the platform (here, Visual Studio 2017) and the version (here, 0.11.0 — this should correspond with the template's branch version above).

```bash
./OpenFrameworks/scripts/dev/download_libs.sh -p vs2017 -v 0.11.0
Expand Down
36 changes: 36 additions & 0 deletions install_submodules.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
#!/bin/bash

echo ---- Installing openframeworks ----

git submodule update --init --recursive

echo ---- Attempting to install all submodules ----

input="${PWD}/ExternalAddons.make"
echo "ExternalAddons Path: $input"

while IFS= read -r line
do
counter=0

for i in $(echo $line | sed "s/,/ /g")
do

if [ "$counter" == "0" ]; then
addon_name="$i"
path="ExternalAddons/${addon_name}"
else
addon_url="$i"
echo "${addon_url} to path ${path}"
git submodule add $addon_url $path
fi

((counter++))
done

done < "$input"


echo ---- Completed Submodule Install ----