How would I create a dynamic Chocolatey install file? - php

I am currently working on a project that would automate the installation of various environments we have within the company. I have several packages created using Chocolatey.
The problem that I am having is creating a dynamic custom installation file. The current internal website allows for users to checkmark the software they wish to install. The idea would be to then allow them to click an install button which would generate an .exe file. The .exe would run the command line scripts to install the Chocolatey packages.
An example of the command line after marking the Google Chrome and Notepad++ boxes would be:
> choco install googlechrome
> choco install notepadplusplus.install
I am wondering what would be the best way to go about creating an .exe file dynamically.
Two examples I am getting inspiration from would be:
https://ninite.com/
http://getbootstrap.com/customize/

There is a chrome extension that does something similar. You may want to explore what it is doing and change it for your needs. It's called Chocolate Factory.

Related

how to set up facebook sdk on PHP hosted on xampp on windows

I'm trying to setup the facebook marketing sdk in php but I cant seem to get past the first part since I dont know what this "terminal" is.
instructions can be found here: https://developers.facebook.com/docs/marketing-api/sdks/
I could get the composer via an alternative method. Either by getting the executable setup or by adding .php to the installer and running it via browser but the next step is
"//Then install it through composer:
php composer.phar install --no-dev"
I cant run the .phar file via accessing it in the browser. It also shows a few errors when I replace the .phar with .php and doing the same method previously by accessing it through the browser.
Basically two things I need to understand
1. Where do I input those commands on a windows 7 OS
2. Where do I place the files for the facebook marketing SDK? just under htdocs in xampp?
Where do I input those commands on a windows 7 OS
Open the command line (https://www.howtogeek.com/254401/34-useful-keyboard-shortcuts-for-the-windows-command-prompt/)
Go to your project folder and use those commands
Where do I place the files for the facebook marketing SDK?
Composer will make a directory (/vendor) within the folder that you currently are. Then composer will put the required files to the right place automatically.

How to make an installer EXE/MSI file (for php files)

Well I have two php files
db_config.php
index.php
with certain code.
To do
I want to make an installer file, which should zip these two php files in an exe or msi file.
and whenever user execute my installer file, it should extract my files to the specified folder on the pc.
also it should look like user is installing an software solution, i.e it should have some instruction, next button, back button, cancel button and a browse button to specify the installation location. (as you have experienced during a normal software installation )
Regards
Qadir Hussain
NSIS is a great Open Source tool for installing software. From the website:
NSIS (Nullsoft Scriptable Install System) is a professional open
source system to create Windows installers. It is designed to be as
small and flexible as possible and is therefore very suitable for
internet distribution.
...
NSIS is script-based and allows you to create the logic to handle even
the most complex installation tasks. Many plug-ins and scripts are
already available: you can create web installers, communicate with
Windows and other software components, install or update shared
components and more.

Custom installer to install a PHP web site?

Just a quick one about installing a PHP website, are there any tools out there that would allow me to create an install package to fully install this website on a Windows platform? If possible maybe even take details like company name and database connections which then maybe updates the necessary PHP files?
If the later cannot be done its fine, but a free tool for installation would be great!
Thank you!
Ash.
It's possible with a tool like innosetup.
It let you build setup , in which you can put what ever you want (webpage , other setup ...).
If you want to do something a little bit advanced (installing apache , configuring file ...) you will need to do some code (delphi) , but the documentation is pretty clear about all the possibility.
Don't be fooled by the simplicity of the tool , it's very powerfull. For example you can check if a specific service is running to lauch (or not) a specific part of your setup. (if httpd is running just copy the webpage a skip the apache installation for example).
You can combine innosetup with server2go
Download the package you want as a .ZIP file, extract it, put your website in "htdocs" folder and then create an installer with innosetup.
Edit: You can edit pms_config.ini too with your needs.

Install completion file via PEAR

I have a PHP command-line tool that I'm trying to distribute via a pear channel.
Installing the binary itself is no problem.
What I'm looking for is a way to install it's associated bash completion file, which should go in /etc/bash_completion.d/.
No, it's not possible to install files to arbitrary locations with PEAR.
You could write a post-install script which copies an installed file into /etc/bash_completion.d/, though.
I found that you can define custom file roles, which would seem to be the right way to go about this:
http://pear.php.net/manual/en/guide.migrating.customroles.defining.php

Why does PEAR get installed to my user directory?

I am new to Linux and I am attempting to install the PHP PEAR library on a virtual server which is running Ubuntu. I am following a tutorial that covers installing PEAR but have run up against an area where I am confused. When running the PEAR installation program I am prompted as to what I want the INSTALL_PREFIX to be. Evidently the INSTALL_PREFIX, among other things, determines where PEAR will be installed. The tutorial suggest the value of INSTALL_PREFIX be the following path ...
"/home/MY_USER_NAME/pear"
where MY_USER_NAME = my user account
Having come from a Windows world, applications are installed on the system where everyone can use them. If I install PEAR underneath my user directory will other developers on the system be able to make use of PEAR in their PHP scripts? I want to make PEAR available to all users and not just myself.
Could someone explain to me the difference between installing for all users and installing just for myself? Does the install location matter? Should I be installing PEAR in a different location?
Thanks for any suggestions.
P.S. The tutorial I am following is located at the following URL ...
http://articles.sitepoint.com/article/getting-started-with-pear/2
Amend your INSTALL_PREFIX...
typically PEAR gets installed to /usr/share/php/
Have you read through the install section on the PEAR site?
There is no law against giving others access to your home directory but in practice it is never done. If you wanted to do that you would have to set the correct directory permissions and the other users would need to put your stuff on their PATH. But don't, it's bad if only because others can see all your stuff, accidentally (or maliciously) delete things, etc.
You should read a few things on file system standards and file system hierarchy and figure out what is appropriate for you system. Usually it will be something like /opt or /usr/local which will be accessible to all users. Usually you will need to have root permissions to install in global locations.

Categories