I have a grails application and an installer for it. Everything is working with no problem. But, I recently updated the version of the HttpClient. The problem happens when a customer installs the new version of the application (without uninstalling the older version). The IzPack just copies all the files, replacing the ones with the same name. So, it creates conflicts with the older version of HttpClient (4.0.1) and the newer version (4.2). To be more specific, there are httpclient-xxx-4.2.jar files and httpclient-xxx-4.2.jar files. The application stops working because of this conflict.
I'd like to know if there's any way to remove the jar files of the lib directory BEFORE the IzPack copies the new ones.
I followed this article about running a script file after the installation: http://maksim.sorokin.dk/it/2010/06/14/installation-with-izpack-launching-bat-files/
So, I configured the IzPack to extract the jar files in a templib directory and created a script to delete the jar files of lib and move the new jars from templib to lib.
Related
I am trying to move a project from local machine to a server with no internet access and no privilege to install libraries.
The server is already installed with many of the libraries.
For my current project the are some libraries and dependencies which are not available on server.
So, I am trying to use packrat to bundle and move the project to server.
Now, the bundle size is becoming huge and others. I want to bundle only packages that are not available on server. How can I do this?
Create a project with all your libraries and work, load packrat library and call function bundle()
library(packrat)
bundle()
This create a projname.tar.gz file
Copy this file and paste on your server project folder and call unbundle function as follows, bundle = name of your bundle and "." means unbundle here in that folder
library(packrat)
unbundle(bundle="packlib.tar.gz",where=".")
I am running Windows 7 Home Premium 64-bit.
I updated my .NET Core installation to the latest version 2.1.500 a few days ago.
Shortly after, I wanted to play with the source code for MS Build, so I cloned the MS Build git repo and ran their build.cmd file as instructed.
But it kept failing telling me it wasn't able to download the per-requisite .NET Core version 2.1.401.
C:\Source\Of\MSBuild> build.cmd
dotnet-install: Downloading link:
https://dotnetcli.azureedge.net/dotnet/Sdk/2.1.401/dotnet-sdk-2.1.401-win-x64.zip
dotnet-install: Cannot download:
https://dotnetcli.azureedge.net/dotnet/Sdk/2.1.401/dotnet-sdk-2.1.401-win-x64.zip
dotnet-install: Downloading legacy link:
https://dotnetcli.azureedge.net/dotnet/Sdk/2.1.401/dotnet-dev-win-x64.2.1.401.zip
Exception calling "Invoke" with "0" argument(s):
"Failed to download
https://dotnetcli.azureedge.net/dotnet/Sdk/2.1.401/dotnet-dev-win-x64.2.1.401.zip."
yada yada yada yada...
So I downloaded the zip file https://dotnetcli.azureedge.net/dotnet/Sdk/2.1.401/dotnet-sdk-2.1.401-win-x64.zip manually, and unzipped it to find a dotnet.exe in it.
First thinking that it was a set-up file, I double-clicked it. It appeared and disappeared quickly.
Then, after a few failed attempts, I suspected it was indeed the SDK itself and wasn't an install-able set-up. So, I checked the folders in the unzipped file and they matched exactly the folders in my C:\Program Files\dotnet folder (see the picture at the bottom of this question).
So, now, I don't know how to have this version of .NET Core that I just downloaded (v 2.1.401) co-exist with the latest version 2.1.500. I do see that the C:\Program Files\dotnet\sdk\ folder has several versions exist side by side:
C:\Program Files\dotnet\sdk>dir /b
1.0.0
1.0.0-preview2-003131
2.1.500
NuGetFallbackFolder
So, should I just go ahead and mess around with my folders manually? That is, should I just copy and paste the folders I downloaded and merge them with what I have? See below.
The contents of the two folders needn't have to be merged. One must download the .NET Core installer instead.
Two issues need to be addressed in answering this question.
I had downloaded the binaries in a zip file and not an installer. I was led to install the binaries because the URL I saw on the console when I ran the build script pointed to the binaries and not to the installer.
.NET Core comes in two kinds of packages:
a. MSI installers; and
b. Zip files containing the binaries. These are useful when you want to hold a private copy of .NET core in your application. Just like NPM packages have private installations in contrast to public/global ones. Just like you hold private assemblies (CopyLocal = True) of the .NET framework within your application in contrast with references them from the GAC or the Reference Assemblies folder.
Look at this SDK download page on the Microsoft website. It lists both, the binaries and the installers for each version of the SDK and the runtime.
A Powershell script in the MS Build build process downloads the zip file containing only the binaries and it holds this version of the .NET Core privately. The version it is looking for is mentioned in the DotNetCliVersion property in the Version.props file.
From build1.ps
function Build {
if (![string]::IsNullOrEmpty($DotNetCoreSdkDir) -and
(Test-Path -Path $DotNetCoreSdkDir)) {
$env:DOTNET_INSTALL_DIR = $DotNetCoreSdkDir
}
else {
InstallDotNetCli
}
$env:DOTNET_HOST_PATH = Join-Path $env:DOTNET_INSTALL_DIR "dotnet.exe"
...
I git clone a package from github and checked the version inside that folder:
>meteor --version
Extracting meteor-tool#1.4.2_7... (forever running)
Then I go outside of that folder:
>meteor --version
Meteor 1.4.3.1
How can I run the global version inside a meteor project folder?
It is because that meteor project you checked out from github is targeting 1.4.2_7. Everytime you create a new meteor project, it saves the version that you used to create it (in a file inside the .meteor folder) so that if the api changes in new future versions, your project will still run (since it targets a specific version in time).
Because of this, when you go to run the project later, it will always use the targeted version (the version used to create the project.). If that version is not on your system, then it will download and install it first before running the app. This is what you have observed. It is downloading that certain version and it can take a very long time to do this depending in your connection speed (it often takes 15 - 25 minutes to do this on my machine at home.
One note, the project's meteor version can be changed by calling meteor update
I am using SBT on Fedora 25, which comes with version 0.13.1. This is an old version, and has bugs that prevent it from working with Java 8.
Is there a way to tell SBT to download a new copy of itself, then use the new copy?
Create a file called build.properties in the project directory in your sbt project's root with the version you want set:
sbt.version=0.13.9
See the relevant page in the manual for more info.
WampServer is installed on my computer.
I am wishing to install the RMySQL package.
The online documentation of the latter mentions:
Install a MySQL client library from http://www.mysql.com or http://dev.mysql.com. If you already installed a MySQL server, you may want to re-run the install to ensure that you also installed client header and library files. Note that Xampp doesn't include these.
I am confused I don't know which are these required 'header' and 'library' files. And, how do I know whether they are made available by WampServer? If it is not the case, can I simply add them somewhere to a WampServer folder (instead of uninstalling WampServer and installing Apache and its friends separatedly)?
Thanks,
Édouard
OK so I've just gone through the living hell that is installing RMySQL on Windows. But finally succeeded.
Binaries on windows are not supported, so the other answers saying this is "Simple" are wrong. Also a lot of the guides etc out there are outdated, or have broken links.
The best overall answer for MYSQL generally is to look at:
Using MySQL in R for Windows
Basically you have to install RTools in order to be able to compile the packages from source.
However specifically with WAMPServer, it doesn't install the .lib and client files. So what I did was go to MYSQL to find the exact same version of MYSQL as Wampserver had installed. I downloaded the zip file version. I compared the lib directories with a visual difference tool (Beyond Compare) and copied across the missing files into my WAMPServer MYSQL installation.
As per the guide above, I then copied:
libmysql.lib from mysql/lib to mysql/lib/opt to meet dependencies.
libmysql.dll to C:\Program Files\R\R-2.12.1\bin
Finally install.packages('RMySQL',type='source') worked
For people using WampServer in Windows and wanting to install RMySQL, I've adapted the instructions outlined here. I'm assuming you already have WampServer installed. I'll also use the file paths that I used on my computer, but keep in mind that your file paths may differ slightly (due to different versions, installations, etc.)
Install latest RTools from here.
Create a new file called Renviron.site in C:\Program Files\R\R-2.15.1\etc\, open the file in a text editor, and add a line like MYSQL_HOME="C:/wamp/bin/mysql/mysql5.6.12" (path to your mysql files). Make sure to use forward slashes and don't forget the quotes.
Click on your WampServer icon and go to MySQL, then Version. This will tell you what version of MySQL was included in your WampServer distribution.
Go to http://dev.mysql.com/downloads/mysql and download and install the same version of MySQL that is included in your WampServer distribution.
Once you've gone through the complete installation, go to the folder where MySQL installed and copy the file called libmysql.lib, which can be found in the lib\ folder.
Now go to the lib\ folder in your WampServer directory (mine is C:\wamp\bin\mysql\mysql5.6.12\lib) and create a new folder called opt\.
Paste into this new opt folder the libmysql.lib file that you just copied.
You can now uninstall the MySQL server that you just downloaded, since we only needed that one file from it (which is apparently not included in the WampServer distribution).
Under C:\wamp\bin\mysql\mysql5.6.12\lib\, you'll also find libmysql.dll. Copy this to C:\Program Files\R\R-2.15.1\bin\i386\ (This works if you have 36 bit Windows like me. I think if you have 64 bit, you may just put it under the bin\ subdirectory instead of under bin\i386\, but please don't hold me to that.) I also copied the same file (libmysql.dll) to the C:\windows\system32\ directory, but I'm not sure if this is necessary.
In R, run install.packages('RMySQL',type='source') and hopefully the installation completes without any issues. You can then load the package as usual with library(RMySQL).
Note: I'm running 32 bit Windows, R-2.15.1, and a WampServer distribution that includes MySQL 5.6.12.