RobQuistNL / GMModular

Modular support for Game-Maker Studio projects
2 stars 0 forks source link

Syncing problem #11

Open AleMunin opened 10 years ago

AleMunin commented 10 years ago

Hey, I came to bother you again! Sorry! I took some couple of hours to make tests before I go to my classes, and started playing with your software a bit. Modules seem to be installed just fine, fast an simple, it is quite delightful to watch, really.

But I run into a couple of problems later on. It didn't sync, as you can see, I didn't overwrite the constants, but there rest should be fine, I made an object with the same name and variables similar (but storing different values) and one extra, and then created a script just to see what happens, nothing changed =/

Here follows the code:

Munin@Megas /cygdrive/c/users/munin/GMModular-master $ ./gmmodular.php /Testfiles/myOwnTestGM.gmx/ Welcome to the GMModular application. version 0.1 GMModular by Rob Quist - Licensed under Apache2 License

WARNING: There was a submodule folder found, but no modulefile! (modules.gmm). I f this is the first time running this script, you're okay, since it has not been made yet. If this isn't the first time... You'd better find the file or clean u p your main project manually! Since there was no module file found, would you like to create a new one? [y/n] [n]: y You have 1 uninstalled module(s)!

1 - testMod1

Please select an option:

  1. Install a module
  2. Uninstall a module
  3. Synchronize a module
  4. Re-index folders / modules
  5. Quit Option number: [1-5] [5]: 1 INSTALL MENU Available modules to install: 0 -CANCEL- 1 [testMod1] Select module to install [0-1] [0]: 1 WARNING: Double asset names have been found: WARNING: /cygdrive/c/users/munin/GMModular-master/Testfiles/myOwnTestGM.gmx/ objects/obj_tester.object.gmx WARNING: You can continue, but existing assets WILL BE OVERWRITTEN! Overwrite 1 game assets? [y/N]: y WARNING: Overwriting game assets! WARNING: Double constant names have been found: WARNING: GM_build_date WARNING: GM_version WARNING: You can continue, but existing constants WILL BE OVERWRITTEN! Overwrite 2 game constants? [y/N]: n NOTICE: Not overwriting game constants. You have 1 uninstalled module(s)!

    1 - testMod1

Please select an option:

  1. Install a module
  2. Uninstall a module
  3. Synchronize a module
  4. Re-index folders / modules
  5. Quit Option number: [1-5] [5]: 3 SYNCHRONIZE MENU Available modules to synchronize: 0 -CANCEL- Select module to synchronize [0-0] [0]: 0

Please select an option:

  1. Install a module
  2. Uninstall a module
  3. Synchronize a module
  4. Re-index folders / modules
  5. Quit Option number: [1-5] [5]: 5

Munin@Megas /cygdrive/c/users/munin/GMModular-master

Later on, every time I executed it to see if it found any changes, it simply didn't found any. It gives me a php error if I select -cancel-, but it is probably due to a no module to sync situation, which doesn't bothers me at all, but worth commenting here anyway X)

Munin@Megas /cygdrive/c/users/munin/GMModular-master $ ./gmmodular.php testfiles/myowntestgm.gmx Welcome to the GMModular application. version 0.1 GMModular by Rob Quist - Licensed under Apache2 License

You have 1 uninstalled module(s)!

1 - testMod1

Please select an option:

  1. Install a module
  2. Uninstall a module
  3. Synchronize a module
  4. Re-index folders / modules
  5. Quit Option number: [1-5] [5]: 3 SYNCHRONIZE MENU Available modules to synchronize: 0 -CANCEL- Select module to synchronize [0-0] [0]: 5 PHP Notice: Undefined offset: 4 in /cygdrive/c/users/munin/GMModular-master/gmmodular.php on line 135 PHP Fatal error: Call to a member function getName() on a non-object in /cygdrive/c/users/munin/GMModular-master/scripts/GMModular.class.php on line 119

Ugh, i wish there was bbcode on github, but anyway... sorry to bother you again, and thanks for your patience.

RobQuistNL commented 10 years ago

You can use markdown language, checkout these pages: https://help.github.com/articles/markdown-basics https://help.github.com/articles/github-flavored-markdown

Anyhow, its actually as intended - the game only overwrites, or doesn't write at all. So since you've selected "Don't overwrite the constants" the whole project was never touched.

This is actually to prevent data loss / inconsistent changes within the modules. If you'd overwrite the constants as well (or just remove those 2 new default GM constants in your game) - you won't get the warning.

I've made a new task to ignore the 2 default GM constants; https://github.com/RobQuistNL/GMModular/issues/12

AleMunin commented 10 years ago

Thanks for your work. And yeah, I know it is on purpose, thanks for that btw =) But the problem is that it never does anymore, and neither I can uninstal it, the same problem happens. I tried something in your testfiles without overwriting and it works greatly, just saying.

Please select an option:

  1. Install a module
  2. Uninstall a module
  3. Synchronize a module
  4. Re-index folders / modules
  5. Quit Option number: [1-5] [5]: 2 UNINSTALL MENU Available modules to uninstall: 0 -CANCEL- Select module to uninstall [0-0] [0]: 2 PHP Notice: Undefined offset: 1 in /cygdrive/c/users/munin/GMModular-master/gmmodular.php on line 120 PHP Fatal error: Call to a member function getName() on a non-object in /cygdrive/c/users/munin/GMModular-master/scripts/GMModular.class.php on line 119

again, thanks, and sorry to bother you.

RobQuistNL commented 10 years ago

No problem, can you sum up a method to reproduce the issue?

AleMunin commented 10 years ago

Sure, I simply tried to run gmm on a new project for the first time:

  1. Found new module.
  2. Install new module.
  3. overwrite files = yes.
  4. overwrite constants = no.
  5. It will say it was successfully done, but nothing in particular happened to the file itself.
  6. when you restart the software, it will mention that your moduled is uninstalled, however when you try to do any options, when you go choose what to do, only the 0 -cancel - option will pop up.
RobQuistNL commented 10 years ago

Okay... Interesting. I'll look in to it :)