Programming Environment installation - GiveMeAShow/givemeashow GitHub Wiki

Reminder

Developped with :

  • Eclipse Kepler
  • Brackets
  • Tomcat 7
  • Java 7
  • NodeJS
  • Bower
  • Grunt

Clone the repository

Clone the repository.

Resource files, like sql schemas or properties files are located in cloned_rectory/Resources The cloned directory can be imported as a maven project in your java IDE.

Create a file gmas-database.properties in the Resources folder.

jdbcURL=jdbc:mysql://localhost:3306/givemeashow  
jdbc.driverClassName=com.mysql.jdbc.Driver  
jdbcUSR=xxxx
jdbcPWD=xxxx
username=xxxxxxx  
password=xxxxxxx  
  • **jdbcUSR **: mysql user
  • **jdbcPWD **: mysql password
  • **username **: server mail username, you may complete this later
  • **password **: server mail password, you may complete this later

IDE and Java

Import thje maven givemeashow project into your favorite IDE. I'm currently using Eclipse Kepler.
Make sure you have Java sdk 1.7 installed.
You can now clean install the project, it should end successfully.

Create a tomcat 7 server in eclipse.
Add GiveMeAShow to deployed war.
Open it's properties, go to module, edit the givemeashow module and path from /GiveMeAShow to /

FileTree

A brief description of the fileTree to understand where is what.

  • / : Your root directory. Grunt/bower/maven are usable from this repository.
  • /src/main/webapp/resources : client resources files (like JS, CSS..)
  • /src/main/webapp/resources/js : Root directory of the AngularJS client application
  • /src/main/webapp/resources/showsDB : Videos repository. All shows should be there
  • /src/main/webapp/WEB-IF/ : Spring xml configurations files, jsp pages

Database

GiveMeAShow requires MySQL.

When you have MySQL installed write your credentials in the file gmas-database.properties, remember to edit the jdbc url if necessary.

You can see and edit the schema with the resource file mysqlschemas.mwb
To create the database, run Resrouces/schemaSQL.sql
Then, run Resources/default_insert.sql

Client setup

You need to install nodeJS.
In ge givemeashow directory, run :

  1. npm install : install dependencies for bower, grunt
  2. bower install : install client dependencies
  3. grunt : inject JS and CSS files, create html files from *.tlp.html files

Adding a new js libraries should be done with bower (bower install ...), and file inclusion with Grunt (Gruntfile.js)

Start the server

Now you should be able to start the server in eclipse.

Adding videos

Only webm videos are currently supported. Add them in the /src/main/webapp/resources/showsDB directory.
Banners are not supported implemented yet.
The file tree should be made like this example :

ShowsDB
--Show_1
----Season_1
------a_video-1_fr.webm
------a_video-2_fr.webm
------a_video-3_fr.webm
------a_video-4_fr.webm
----Season_2 ------a_video-1_fr.webm
------a_video-2_fr.webm
------a_video-3_fr.webm
--Show_2
----Season_1
------a_video-1_fr.webm
------a_video-2_fr.webm
------a_video-3_fr.webm
------a_video-4_fr.webm
Season_2 ------a_video-1_fr.webm
------a_video-2_fr.webm
------a_video-3_fr.webm
...

Then, the videos, shows and seasons can be automatically added by going to the page /admin/video/auto.

⚠️ **GitHub.com Fallback** ⚠️