Hi there,
thank you for this, extremely useful templates. I have no problem installing via git on linux (in my case ubuntu). But having a little problem replicating the effects of the push into a windows env (win 7)
Would it be possible to clarify windows appropriate installation walkthrough in the readme? (or if you give me a shove in the right direction, I would be happy to test and update the docs).

CommentFileSizeAuthor
#4 1974282.patch1.6 KBfietserwin

Comments

docwilmot’s picture

any news on this?

justindodge’s picture

It looks like you can copy the files by hand into the corresponding directories.

On my Win 7 machine, my username is 'Justin' - so I found the IDE's config files in: C:\Users\Justin\.WebIde60\config

The repo I checked out was here: C:\Users\Justin\Documents\phpstorm-templates\WebIdeConfigManager\ConfigHome\drupal

Which has a 'fileTemplates', 'filetypes', and 'templates' folder.

I shutdown phpstorm and then copied the contents of these three folders into the corresponding folders in the IDE's folder. Start phpstorm again, and voila! Staying updated may be a little bit of a pain with this method though, but probably not unmanageable.

It definitely would have been handy to have some PC instructions documented though :)

sweetchuck’s picture

Thank you for your interest.

I don't understand what are the differences between the Windows installation and Linux/Mac installation.
What does not work on Windows, and what is the error message (If it has any)?

sweetchuck’s picture

Issue summary: View changes

edit: grammar

fietserwin’s picture

Title: Windows readme » Windows support
Component: Documentation » Miscellaneous
Category: Support request » Bug report
Priority: Minor » Normal
Issue summary: View changes
Status: Active » Needs review
StatusFileSize
new1.6 KB

Step 7 (./WebIdeConfigManager.php push) does not work on Windows. Though that might depend on what has been configured as the standard action for .php files. For me that is to open them in an editor, not to execute them in the cli. So that step should become (for Windows users):

php ./WebIdeConfigManager.php push

Unfortunately, that gave me

Notice: Undefined index: HOME in D:\Projecten\PhpStormTemplates\WebIdeConfigManager\WebIdeConfig\Manager.inc on line 88

Fatal error: Uncaught exception 'Exception' with message '.WebIde## not found' in D:\Projecten\PhpStormTemplates\WebIdeConfigManager\WebIdeConfig\Manager.inc:345
Stack trace:
#0 D:\Projecten\PhpStormTemplates\WebIdeConfigManager\WebIdeConfig\Manager.inc(92): WebIdeConfig\Manager::initializeWebIdeHome()
#1 D:\Projecten\PhpStormTemplates\WebIdeConfigManager\WebIdeConfigManager.php(42): WebIdeConfig\Manager::initialize(Array)
#2 {main}
  thrown in D:\Projecten\PhpStormTemplates\WebIdeConfigManager\WebIdeConfig\Manager.inc on line 345

So I started some debugging and found that Windows support has some errors. I attached a patch that corrects this.
- It detects whether the OS is Windows
- it finds the "HOME" directory on a Windows host.
- file_get_contents() does NOT work on directories, at least not on Windows, so that code needed some fixing as well. I am not totally sure that this is how it should be, but it seemed to work for me.

After this I got:

WebIde configuration directory is .WebIde70

drupal
  File templates
    NEW    fileTemplates\includes\Drupal 7 - CTools plugin header.inc
    NEW    fileTemplates\Drupal 7 - CTools plugin - access.inc
    NEW    fileTemplates\Drupal 7 - CTools plugin - content_types.inc
    NEW    fileTemplates\Drupal 7 - mymodule.features.field.inc.inc
    NEW    fileTemplates\Drupal 7 - mymodule.features.inc.inc
    NEW    fileTemplates\Drupal 7 - mymodule.field_group.inc.inc
    NEW    fileTemplates\Drupal 7 - mymodule.info.info
    NEW    fileTemplates\Drupal 7 - mymodule.install.install
    NEW    fileTemplates\Drupal 7 - mymodule.js.js
    NEW    fileTemplates\Drupal 7 - mymodule.module.module
    NEW    fileTemplates\Drupal 7 - mymodule.tokens.inc.inc
    NEW    fileTemplates\Drupal 7 - mymodule.variable.inc.inc
    NEW    fileTemplates\Drupal 7 - Panels plugin - styles.inc
    SKIP   fileTemplates\includes
  File types
    NEW    filetypes\drupal-7-info.xml
  LiveTemplates
    NEW    templates\drupal-7-js.xml
    NEW    templates\drupal-7.xml
    NEW    templates\drupal-8.xml
    NEW    templates\drupal-drush-runtime-config.xml
    NEW    templates\drupal-drush.xml

Process finished with exit code 0

Which seems the correct and expected output.

sweetchuck’s picture

OK. I will update the documentation.

I think this bug is belongs to the WebIdeConfigManager https://github.com/Sweetchuck/WebIdeConfigManager/issues?state=open
This repository only stores the Templates. I will commit the attached patch (#4)