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

Make SGE as a submodule #45

Open
Adman opened this issue Jul 19, 2013 · 7 comments
Open

Make SGE as a submodule #45

Adman opened this issue Jul 19, 2013 · 7 comments

Comments

@Adman
Copy link
Collaborator

Adman commented Jul 19, 2013

Currently sge is not in /Data/SGE . I suggest adding it as a submodule and we don't have to copy & paste it when something updates, just simply run git submodule update and it updates sge from git repository.

@4nickpick
Copy link
Collaborator

This is related to issue #39 I think. What would it take to implement this? Are there any reasons not to do this?

@Adman
Copy link
Collaborator Author

Adman commented Jul 19, 2013

We should wait for @coppolaemilio what he thinks. I would prefer submodule.

@coppolaemilio
Copy link
Owner

You don't have to wait for my opinion! As I told you I'm not here to decide what to do, or what not. hehe
My opinion is not relevant if the problem has a technical solution. In this case, it has, so any of us should make whatever makes sense.

If someone mess up something we can always go back!

Hugs :D

@4nickpick
Copy link
Collaborator

I think I may have come up with a better solution (or just solved a similar but different problem). Stellar could check if the StellarGameEngine repo has any new commits. Download, extract and move it to the the proper location. This way all users who download Stellar can keep the game engine up to date with the repo without knowing git.

@Adman
Copy link
Collaborator Author

Adman commented Jul 20, 2013

It would be better just to check if the SGE in Stellar directory is up to date. If it's not, it would somehow download it to SGE directory. And when opening project it would check SGE in project dir and copy it from SGE to project dir.

@4nickpick
Copy link
Collaborator

Edit: I've pushed a new branch named "UpdateGameEngine" which has my early implementation of the functionality. UpdateGameEngine branch

I've been trying some things, I've run into a problem trying to check if SGE in Stellar is up to date. How can we request the latest commit from github without pulling the whole repo? If we can do that, then we can store that commit ID in the config. Then whenever the updater runs, it pulls the commit ID, compares it against the commit ID stored in config.ini to know whether or not to update SGE.

Then the next step is to download the latest from the repository. Something like this should get us started, but it ran really slow in my tests - causes Stellar to become unresponsive for a few seconds while the download completes.

def updateGameEngine(self):
        import urllib, zipfile
        sge = urllib.urlretrieve('https://github.com/Coppolaemilio/StellarGameEngine/archive/master.zip')

@Adman
Copy link
Collaborator Author

Adman commented Jul 21, 2013

There is variable version in SGE. We should check that, not commit.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants