diff --git a/mariadb.json b/mariadb.json index 717fadf41e..70f2027c80 100644 --- a/mariadb.json +++ b/mariadb.json @@ -47,6 +47,9 @@ "bin\\mysql_upgrade_wizard.exe", "bin\\my_print_defaults.exe" ], + "persist": [ + "data" + ], "checkver": { "url": "https://downloads.mariadb.org/", "re": "Download ([\\d.]+) Stable" diff --git a/mysql.json b/mysql.json index 9b2c3ebfcf..4f64dea55e 100644 --- a/mysql.json +++ b/mysql.json @@ -26,9 +26,14 @@ "bin\\mysqlslap.exe", "bin\\my_print_defaults.exe" ], + "persist": [ + "data" + ], "post_install": " #Initialize data directory (without generating root password) -mysqld --initialize-insecure +if (!(Test-Path \"$dir\\data\\auto.cnf\")) { + mysqld --initialize-insecure +} #Copy provided sample file to live file location cp $dir/my-default.ini $dir/my.ini diff --git a/nginx.json b/nginx.json index d2b56904ac..29640e890f 100644 --- a/nginx.json +++ b/nginx.json @@ -6,6 +6,7 @@ "hash": "53ca945ffd3ceaa40c2c60e01218a3b7ac64e61d3907484461794ee13757cce9", "extract_dir": "nginx-1.11.12", "bin": "nginx.exe", + "persist": ["conf", "html", "logs"], "checkver": { "url": "https://nginx.org/en/CHANGES", "re": "Changes with nginx ([\\d.]+)" diff --git a/nodejs.json b/nodejs.json index 7985d845fd..3c7930e435 100644 --- a/nodejs.json +++ b/nodejs.json @@ -12,11 +12,12 @@ "hash": "0eda7b5dabd72865f96985d5ef0ad7048df87a79ff52a77b352ca293f52e2930" } }, - "env_add_path": "nodejs", + "extract_dir": "nodejs", + "persist": [ "bin" ], + "env_add_path": [ ".", "bin" ], "post_install": " -# Remove npmrc that makes global modules get installed in AppData\\Roaming\\npm -rm $dir\\nodejs\\node_modules\\npm\\npmrc -npm update -g", +# Set npm prefix to install modules inside bin +Set-Content -Value \"prefix=$dir\\bin\" -Path $dir\\node_modules\\npm\\npmrc", "checkver": { "url": "https://nodejs.org/en/download/current/", "re": "Current version: v([\\d.]+)" diff --git a/php.json b/php.json index 51e4454273..ea501b71f6 100644 --- a/php.json +++ b/php.json @@ -29,9 +29,15 @@ "php-cgi.exe" ], "env_set": { - "PHP_INI_SCAN_DIR": "$dir\\..\\conf" + "PHP_INI_SCAN_DIR": "$persist_dir\\conf" }, "post_install": " +#Copy ini scan dir from old location before persistant update +if ((Test-Path \"$dir\\..\\conf\") -and !(Test-Path \"$persist_dir\\conf\")) { + Write-Host -ForegroundColor Cyan 'We are moving your php configuration to scoop/persist/php/conf' + Move-Item \"$dir\\..\\conf\" \"$persist_dir\\conf\" +} + #Copy PHP configuration file to expected location cp \"$dir\\php.ini-production\" \"$dir\\php.ini\" diff --git a/python.json b/python.json index fa9599fc7f..33afda8633 100644 --- a/python.json +++ b/python.json @@ -4,15 +4,15 @@ "version": "3.6.1", "architecture": { "64bit": { - "url": "https://www.python.org/ftp/python/3.6.1/python-3.6.1-amd64.exe#/py361.exe", - "hash": "md5:ad69fdacde90f2ce8286c279b11ca188" + "url": "https://www.python.org/ftp/python/3.6.1/python-3.6.1-amd64.exe#/py3.exe", + "hash": "591922fbf5c4234b766dd672e539cba3d9a158e028e3c85c76bfec6ede56ded8" }, "32bit": { - "url": "https://www.python.org/ftp/python/3.6.1/python-3.6.1.exe#/py361.exe", - "hash": "md5:3773db079c173bd6d8a631896c72a88f" + "url": "https://www.python.org/ftp/python/3.6.1/python-3.6.1.exe#/py3.exe", + "hash": "15dbc083264945ad1dcef8b0b712da41362f816f614acb60989541d8f426d845" } }, - "pre_install": "copy-item $dir\\py361.exe $dir\\uninstall.exe", + "pre_install": "copy-item $dir\\py3.exe $dir\\uninstall.exe", "installer": { "args": [ "/quiet", @@ -25,14 +25,32 @@ }, "uninstaller": { "file": "uninstall.exe", - "args": [ "/uninstall", "/quiet", "InstallAllUsers=0"] + "args": [ + "/uninstall", + "/quiet", + "InstallAllUsers=0" + ] }, "bin": [ "python.exe", "pythonw.exe", - [ "python.exe", "python3" ] + [ + "python.exe", + "python3" + ] ], - "env_add_path": [ "scripts" ], - "checkver": "

Latest: Python ([\\d.]+) - .*

" + "env_add_path": [ + "scripts" + ], + "checkver": "

Latest: Python ([\\d.]+) - .*

", + "autoupdate": { + "architecture": { + "64bit": { + "url": "https://www.python.org/ftp/python/$version/python-$version-amd64.exe#/py3.exe" + }, + "32bit": { + "url": "https://www.python.org/ftp/python/$version/python-$version.exe#/py3.exe" + } + } + } } - diff --git a/ruby.json b/ruby.json index 89176035b9..837e691dc6 100644 --- a/ruby.json +++ b/ruby.json @@ -26,7 +26,11 @@ } }, "extract_to": [ "", "devkit" ], - "env_add_path": "bin", + "env_add_path": ["bin", "$persist_dir\\gem\\bin"], + "env_set": { + "GEM_HOME": "$persist_dir\\gem", + "GEM_PATH": "$persist_dir\\gem" + }, "post_install": "pushd $dir\\devkit;echo \"---`n- $dir\" | out-file config.yml -enc default; ruby dk.rb install;popd;", "checkver": { "url": "http://rubyinstaller.org/downloads/",