drupal-modules / ads

Drupal distribution for Ads
http://drupal.org/project/ads
2 stars 2 forks source link

How to install manually like a normal profile? #134

Open ugintl opened 6 years ago

ugintl commented 6 years ago

I do not see "libraries", "modules" and "themes" folders. Normally, we put the folder in the "profiles" folder. This looks a bit different.

kenorb commented 6 years ago

The installation instruction is provided in the README.md file. Basically you need to install phing, then run phing ads-install which will read and configure the profile based on the build.xml file.

Libraries, modules and themes are there, but in separate repositories. Check the drush/ folder for Drush's .make files which consist dependencies which are downloaded during the build which is performed via drush make.

If you got stuck during the build, please let me know.

ugintl commented 6 years ago

What if I do not want to use phing?

kenorb commented 6 years ago

You can try to use: drush make command followed by the .make file, such as build-ads.make, build-ads-latest-min.make, build-ads-stable-min.make, etc, depending if you need minimum/full, stable or dev installation. I would recommend build-ads-latest-min.make as a start. You need to use Drush 8.x.

When building with phing, it does relevant setup such as folder permissions, and customization of your build by reading the build.properties file. Using only drush make, it'll download all required dependencies, however, you will have to setup db and site configuration manually.

ugintl commented 6 years ago

I installed phing using composer. When I try to run command "phing ads-install" in "ads-master" directory, it gives "command not recognized" error and when I use "> phing ads-install", it says access denied. I am using cmd with admin access.

ugintl commented 6 years ago

When I write "> phing" in git, it says, "phing is a folder"

ugintl commented 6 years ago

Why it has to be so much difficult? I was sick using composer and now there is a new thing phing. Why not please make things simpler for non-advanced users. Thank you.

kenorb commented 6 years ago

You just run: phing (see: build.xml file) or make install command (see: Makefile file in the folder where is build.xml or Makefile, then follow any instructions. "I write '> phing' in git" doesn't make much sense, phing ads-install is the command which you run in the shell, like any other command.

Another simple way is run make install if you're on Linux/macOS which invokes phing.

At that time, phing was the tool commonly used for build processes, some people use ant (but it's more for Java apps), or Grant/Gulp, but at the same time, it would be the same thing. When ADS will be migrated to Drupal 8, then Composer would be a better tool.

It's never simple because everybody can use a different operating system, different PHP, tools and their versions. And Phing should be cross-compatible, including Windows compability.


These are the commands what I am running on my local macOS:

  1. Clone the repo: git clone https://github.com/mycognitive/ads.

  2. After cloning enter ads directory by: cd ads.

  3. I run: phing ads-install (I'm using Phing v2.16).

    Which worked fine, but gives me the expected error:

    ACTION REQUIRED! Please edit ads/build.properties

  4. I edit build.properties and removing the line containing properties.notset=true as per comments and double checking the build settings.

  5. I need to make sure my selected database exists. I create by: mysql -u root -proot -e "CREATE DATABASE ads". To avoid "Cannot access selected database!" error.

  6. I run phing ads-install command again.

If you've got errors which you've got (relevant lines consisting Error word). Alternatively, if Phing won't work, try build-ads.make command instead.

kenorb commented 6 years ago

I've tested and possibly Drush Make won't work on PHP 7.x due to errors and bugs I believe.

I'm including suggested manual steps how to install profile:

Manual steps

  1. Install sources of Drupal 7.x as usual.
  2. Clone https://github.com/mycognitive/ads into profile directory.
  3. Clone https://github.com/mycognitive/ads_drush as sites/all/drush.
  4. You need all contrib, core, libraries and themes dependencies included in drush/ .make files.
kenorb commented 6 years ago

However, I would advise you to use plain Drupal 8 instead and implement your requirements from scratch and not using this project, as it was developed a few years back and it seems everything a bit outdated and possible it is just not working, so it needs some significant time to invest into it. Ideally, the plan is to rewrite Ads project into Drupal 8 using Composer, but it won't happen soon.

ugintl commented 6 years ago

I am using windows. I have composer and git already installed. I am also using acquia dev desktop. I will try again