installer changes for windows

This commit is contained in:
rahul shukla 2019-01-18 12:05:53 +05:30
parent bd9ddfb0d7
commit e2cfd0683c
7 changed files with 45 additions and 47 deletions

View File

@ -59,11 +59,17 @@
<select v-validate="'{{ $validations }}'" class="control" id="{{ $firstField }}[{{ $secondField }}][{{ $thirdField }}][{{ $field['name'] }}]" name="{{ $firstField }}[{{ $secondField }}][{{ $thirdField }}][{{ $field['name'] }}]" data-vv-as="&quot;{{ $field['name'] }}&quot;" >
<?php
$selectedOption = core()->getConfigData($name) ?? '';
?>
@if (isset($field['repository']))
@foreach ($value as $option)
<option value="{{ $option['name'] }}" {{ $option['name'] == $selectedOption ? 'selected' : ''}}
{{ trans($option['name']) }}
@foreach ($value as $key => $option)
<option value="{{ $value[$key] }}" {{ $value[$key] == $selectedOption ? 'selected' : ''}}>
{{ trans($value[$key]) }}
</option>
@endforeach
@else
@foreach ($field['options'] as $option)
@ -73,8 +79,6 @@
} else {
$value = $option['value'];
}
$selectedOption = core()->getConfigData($name) ?? '';
?>
<option value="{{ $value }}" {{ $value == $selectedOption ? 'selected' : ''}}>
@ -89,23 +93,33 @@
<select v-validate="'{{ $validations }}'" class="control" id="{{ $firstField }}[{{ $secondField }}][{{ $thirdField }}][{{ $field['name'] }}]" name="{{ $firstField }}[{{ $secondField }}][{{ $thirdField }}][{{ $field['name'] }}][]" data-vv-as="&quot;{{ $field['name'] }}&quot;" multiple>
@foreach ($field['options'] as $option)
<?php
$selectedOption = core()->getConfigData($name) ?? '';
?>
<?php
if ($option['value'] == false) {
$value = 0;
} else {
$value = $option['value'];
}
@if (isset($field['repository']))
@foreach ($value as $key => $option)
$selectedOption = core()->getConfigData($name) ?? '';
?>
<option value="{{ $value[$key] }}" {{ in_array($value[$key], explode(',', $selectedOption)) ? 'selected' : ''}}>
{{ trans($value[$key]) }}
</option>
<option value="{{ $value }}" {{ in_array($option['value'], explode(',', $selectedOption)) ? 'selected' : ''}}>
{{ $option['title'] }}
</option>
@endforeach
@else
@foreach ($field['options'] as $option)
<?php
if ($option['value'] == false) {
$value = 0;
} else {
$value = $option['value'];
}
?>
@endforeach
<option value="{{ $value }}" {{ in_array($option['value'], explode(',', $selectedOption)) ? 'selected' : ''}}>
{{ $option['title'] }}
</option>
@endforeach
@endif
</select>

View File

@ -124,23 +124,23 @@ class Requirement {
private static function composerInstall()
{
putenv('COMPOSER_HOME=' . __DIR__ . '/vendor/bin/composer');
$command = 'composer -v 2>&1';
$command = 'composer --version 2>&1';
exec($command, $data['composer'], $data['composer_install']);
return $data['composer_install'];
}
/**
* check installation for composer
* @return boolean
*/
private static function nodeInstall()
{
$command = 'npm -v 2>&1';
exec($command, $data['npm'], $data['npm_install']);
// /**
// * check installation for composer
// * @return boolean
// */
// private static function nodeInstall()
// {
// $command = 'npm -v 2>&1';
// exec($command, $data['npm'], $data['npm_install']);
return $data['npm_install'];
}
// return $data['npm_install'];
// }
/**
* Render view for class.
@ -154,7 +154,7 @@ class Requirement {
$composerInstall = $this->composerInstall();
$nodeInstall = $this->nodeInstall();
// $nodeInstall = $this->nodeInstall();
ob_start();

View File

@ -1 +0,0 @@
Deny from all

View File

@ -1 +0,0 @@
Deny from all

View File

@ -47,7 +47,7 @@
<img src="<?php echo $src ?>">
<?php endif; ?>
<span style="margin-left: 10px"><b>Composer</b></span>
<span>(1.6.5 or higher)</span>
</div>
<div style="margin-left: 30%;">
@ -56,18 +56,6 @@
<?php endif; ?>
</div>
<div class="check" style="margin-left: 25%;">
<?php if(($nodeInstall == 0) ? $src = 'Images/green-check.svg' : $src = 'Images/red-check.svg' ): ?>
<img src="<?php echo $src ?>">
<?php endif; ?>
<span style="margin-left: 10px"><b>Node</b></span>
<span>(8.11.3 LTS or higher)</span>
</div>
<div style="margin-left: 30%;">
<?php if(!($nodeInstall == 0)): ?>
<a href="https://nodejs.org/en/" style="color: #0041FF; font-size: 16px">https://nodejs.org/en/</a>
<?php endif; ?>
</div>
</div>
<?php if(!isset($requirements['errors']) && $phpVersion['supported'] && ($nodeInstall == 0) && ($composerInstall == 0) ): ?>

View File

@ -1 +0,0 @@
Deny from all

View File

@ -1 +0,0 @@
Deny from all