Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 8 years ago.
Improve this question
This isn't so much a "question" as a methodology I found which I believe is working.
Most servers use the path "/usr/bin/perl" ... but Strawberry Perl (strawberryperl.com) use their own unique path of "/strawberry/perl/bin" (!!) (I tried installing into a different directory as allowed by the prompt, but it wouldn't work at all then! I read somewhere that some files within the installation are 'hardcoded' to the above path.)
I am not looking forward to having to rename all the shebangs of around 400 offline files, and then having to change them all again when uploaded, and I sought another solution. I found it in something called a "symbolic link".
Basically, it's an internal Windows redirect. It basically says "If you see the path as 'usr/bin/perl' then instead go to 'strawberry/perl/bin' " There are two ways to set this up.
The first is to open up a command line terminal ("CMD" in Windows search box, then click "cmd.exe") You use "cd.." to get back to the "C:>" prompt, and then enter "/d usr\bin\perl starwberry\perl\bin\perl.exe" and click enter. This will set up the <==> symbolic link. (Note directions of the slashes) That's OK for a one time use. (It may work without adding ".exe", but to be sure...)
But I design websites offline, so I need the redirect to be set up each time I boot up. You can do this as well with a batch file.
Using a text file, enter the same data as you did at the prompt, and save it as a ".bat" file to your startup folder, (as found in the left menu when clicking "Start" button lower left) You may well find other icons for programs that also initiate at startup within this folder.
I'm 99% certain this is working, because I went into the 'usr/bin/perl' and renamed the executable files as 'perl_old.exe' and 'perl_5.12.4_old.exe" and "wperl_old.exe" (so that if a Perl script DID access "usr\bin\perl" it wouldn't find any program to run) ... and the file still ran when I put URL into the browser.
So why the switch from ActiveState? I wanted to install a particular library. I tried it via PPM and was told I didn't have authorisation. No, this isn't an "Administrator Rights" issue of Windows; it's the fact that ActiveState now want to charge $999 for access to certain files. "Well, you can still use 'dmake' to create the files downloaded direct from CPAN" Er, no, you can't ... because "dmake" is one of the files under lock and key! And without that, you cannot install ANY file from CPAN. (The term "Holding You To Ransom" springs to mind.)
Using Strawberry Perl, it's just a case of starting a command line terminal, (CMD) moving back to the root (C:>) and typing "cpan". You now type "install MODULE::name". Boom! All the files for that particular module are downloaded and installed using the "make.pl" associated with that program.
We won't get into the debate of a company charging to access items in the public domain; they're a business after all.
I know this might be teaching your grandmother to such eggs to some of the more advanced users, but there may be other people on the verge of renaming all their files when switching to Strawberry Perl. Oh, I believe their program suite also include C, C++ and Fortran compilers (no, I've no idea either!). One downside: Due to all the extra program features they install, the directory is THREE TIMES LARGER than the "ActiveState" installation!
I'm pretty sure your problem with ActivePerl is that you're using an older version. I've just done:
C:\Users\myaccount\Documents>perl -MCPAN -e shell
It looks like you don't have a C compiler and make utility installed. Trying
to install dmake and the MinGW GCC compiler using the Perl Package Manager.
This may take a a few minutes...
Downloading ActiveState Package Repository dbimage...done
Downloading MinGW-4.6.3...done
Downloading dmake-4.11.20080107...done
Unpacking MinGW-4.6.3...done
Unpacking dmake-4.11.20080107...done
Generating HTML for MinGW-4.6.3...done
Generating HTML for dmake-4.11.20080107...done
Updating files in site area...done
2759 files installed
Please use the `dmake` program to run commands from a Makefile!
cpan shell -- CPAN exploration and modules installation (v2.05)
Enter 'h' for help.
cpan>
Using version:
This is perl 5, version 20, subversion 1 (v5.20.1) built for MSWin32-x86-multi-thread-64int
ActiveState has a policy of not keeping fully up to date on older versions, because of the support overhead. You can see - for example - their builds of dmake here:
https://code.activestate.com/ppm/dmake/
From their web page:
Looking for access to older versions of ActivePerl?
Community Edition offers access to the newest versions of ActivePerl.
Access to older versions (Perl 5.6, 5.8, 5.10, 5.12, 5.14, 5.16) is available in Business Edition and Enterprise Edition.
E.g. to use the version you're currently using (5.12), you'd need to buy support. But you could use 5.18 or 5.20 for free.
I would also note: Windows doesn't use shebang paths anyway; it uses file associations.
Related
I have a question concerning software updates. Currently I install new releases into a different folder each time. The user is then required to re-enter configuration parameters. This of course is not too optimal. The software is Windows forms and I use the settings. Settings file.
So the question is what happens if I install a newer version into the same folder as a previous install? Will files just get replaced? What about if I have added settings in the new version? Will they be merged?
Anything to watch out for?
Thanks
When the MSIs are related, typically you can only have one instance of it installed at a time. If that's the case, first the earlier version may be uninstalled, so the question is whether the files that store the settings are removed by uninstalling your MSI.
If the MSIs are not related, you can get into a world of pain by overlapping their installations (probably breaking component rules by having two different components describe the same file in the same location, but with a different component code), yet the core question comes down to the same thing: will the updated installation lay down the file that stores the settings.
These are likely the same question, as the easiest way to remove or install a file is by including it in the MSI directly. (There are other ways, but I'm assuming you're not using those yet.) If the file is not part of the installation, nothing will happen to it, and the answer to your question comes down to what your application does when it runs with a settings file created in a different version. If the file is part of the installation, and component rules are not being broken, it will either be uninstalled then freshly installed (wiping any configuration), or per File Versioning Rules and Default File Versioning, the file will either be left untouched or completely replaced with the new version. Windows Installer doesn't know how to merge your settings file.
Thanks for taking the time to answer my question.
So bottom line I should just avoid these issues and install in another folder. I should also make a copy of the settings and put them in my own file which can be used to update my new installation. That would be the safest route I guess.
Thanks
Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 10 years ago.
Improve this question
I'm struggling to understand how Bash works (I'm using Mac OS X Lion).
I use the terminal for things like Git Version Control and SSH'ing onto our servers and doing basic interactions like that. But I don't really understand Bash scripts and the whole unix set-up past that.
So when I need to install software and it asks me to set environment variables (and PATH variables like $PATH e.g. export PATH=/usr/local/bin) or add paths to a file like /usr/local/bin/:usr/bin/:$PATH - I just have no idea of what I'm doing or more importantly "why" - it is just really confusing to me.
For example, why is there a /usr/local/bin/ and a /usr/bin/ (one local and one not?) and why does some software get installed in one and not the other?
And what about files like .bashrc, .profile and .bash_profile - I understand that .bashrc is executed when a shell starts up and it checks the paths inside that file for application settings and stuff like that, but why do I not have either .profile and .bash_profile on my work computer, but on my home laptop I have .bash_profile and in some places I've seen articles where people ask the user to set-up a .profile if it doesn't exist? Why not just one file for the shell to go to to look for stuff.
I've got NodeJs installed on my laptop at home and that has a path set-up under .bash_profile. I've recently tried installing rvm so I can try out some Ruby programming (I needed rvm so I could upgrade to the latest version of Ruby) but that has settings inside .bashrc such as PATH=$PATH:$HOME/.rvm/bin # Add RVM to PATH for scripting.
Sorry if I'm just repeating myself, but it seems like there just aren't any good articles about this sort of stuff. Articles are either non-existent OR they are over-kill so you never really understand the bits you're interested in (i.e. I don't want to know everything about UNIX just enough to understand these common items that seem to crop up a lot).
Again, this is a bit of a strange question because there isn't a specific thing I want to know, just the common stuff that crops us when you need to install software via the Terminal and you're asked to do things like setting paths and variables and choosing locations of where to install stuff (which bin folder to use) and stuff like that, so a general overview of all this would be amazing!
Any help I can get understanding how the above items work and why would be great!
Thanks.
Your questions is rather 'general'. So the best I can think of is point you to definitive resources on the topic [which may or may not satisfy you].
1: The TLDP book Bash Guide for Beginners, especially Chapter 3 on The Bash environment which talks about PATH and the bash configuration files you mentioned.
2: The Filesystem Hierarchy Standard which basically sets out requirements for how a UNIX(like) Operating System's filesystem should be laid out. The section on /usr goes into considerable detail.
And in case those links go down in the future, here is the gist of what they say about your specific questions:
1: PATH is basically an environment variable, which contains a ':' separated list of directories. When you type a command in Bash, Bash will go through the directories (in the order they are listed) listed in PATH to search for an executable file corresponding to the command. You can see the current contents of PATH by executing:
echo $PATH
in your terminal.
2: /usr contains files/packages installed by your distribution. In my case [I use 'Archlinux'], this means packages which get installed when I install Archlinux, or which I can choose to install via the official package manager for Archlinux. In your case, I guess this means stuff that came along with Mac OS X, officially packaged by Apple.
/usr/local is where things get installed when I locally install packages [bypassing the package management system]. e.g. if I want the latest copy of GCC, I download the sources, build it for myself, and then when I execute 'make install' it goes into /usr/local. But the 'official' copy of GCC that comes with Archlinux goes into /usr. And when that official copy gets updated, my own copy in /usr/local is untouched.
So on a freshly installed system [e.g. a spanking new MacBook], /usr/local should be empty. Because the local administrator (you) has installed nothing yet.
Is it possible to install the entire database(postgresql8.2) via command prompt or batch file or registry file bypassing the trivial procedure for installation. But then to a question comes that, how can we supply default parameters such as name,password,language,default location of database? Currently I'm working on 'Windows XP' platform.
Thank you.
For 8.3 and lower the obvious answer is: http://pginstaller.projects.pgfoundry.org/ which supports or supported silent installations. For more recent versions, please read: http://forums.enterprisedb.com/posts/list/2135.page
Use of existing installers would simplify your life and be where I would start.
This being said there is no reason you can't generate a script to register dll's properly run initdb, etc. This will take some extra knowledge of both PostgreSQL and Windows, and will be mostly suitable for custom solutions (i.e. not cases where you merely are packaging software that runs with PostgreSQL). I don't think an complete answer can be given here because once you need such a solution you need to design your installation around if. Books could be written on that topic. The docs http://www.postgresql.org/docs/9.0/static/install-windows.html should get you started however since the only difference really between installing from source and installing from the precompiled source is just that you need to compile the source files first.
Failing that you could take a look at the binary zip packages. Typically these can be extracted and PostgreSQL can be run from inside them.
I currently have a project with an installer I made with NSIS, but I would like to have an update to new versions that only has the changed files and will show a changelog. The target platform is windows. What methods/suggestions do you have to do this?
You might want to reconsider using NSIS. If you are into patching and distributing updates you will probably get the most benefit from using an installer technology that utilises the Windows Installer capabilities (msiexec).
NSIS is basically a program that runs and does what you want whereas a Windows Installer type installer forces you to split your application into features and components which can be managed by the windows installer msi service. MSI will track things like what versions of products you have installed, whether running the installer again will run in maintenance mode, whether you are allowed to install 2 products of different versions, whether a patch can be applied to a particular version of a product or any other question relating to updates and installs.
Basically most of the stuff you are requesting will be available out-of-the-box if you change to a Windows Installer technology. Whereas if you use NSIS (which doesn't use Windows Installer technology) then you will have to implement it all yourself.
Just as an example there is a pretty comprehensive installer builder called AdvancedInstaller ( http://www.advancedinstaller.com/ ) that sounds like what you want.
Alternatively, if you want to spend the rest of your life trawling forums and newsgroups then there is an open source product called WiX that does something similar ;)
In spite of my previous comment I have written a 5000 line installer using NSIS with 13 custom pages. I have even looked at patching and it's a bit of a hack. The main bit of advice is to make sure you are patching the version you think you are patching then use one of the patching plugins available.
There are several patching technologies that compare files and produce patch change files and the NSIS code required to "install" them. I have found that NSIS Patch Gen did what I wanted pretty well with the least amount of hassle. The documentation is a bit thin but once you figure it out you think "Oh yeh".
You are probably going to have a little bit of trouble with an automatically generated Change Log. I would suggest that you create the Change Log yourself (or at least add the extra changes to it with each application change you make) and just include it as if it was a normal application file and let the patch generator update it.
http://sourceforge.net/projects/nsispatchgen/
One possible way would be to store an XML file on your download server that has each released version and a list of files that changed for each release. The installer would write a registry key on install of the version of files it installed.
Then, on update, the installer downloads and parses the XML file, and finds any nodes that have higher version numbers than what is currently installed. You display all the files in a text box on an installer page, and when the user confirms, the installer downloads all the files, and then updates the registry to the latest version.
are you familiar with cURL?
http://www.shininglightpro.com/products/Win32OpenSSL.html
http://curl.haxx.se/download.html#openssl
it will download any protocol, and you can use it to download your files. it's a commandline app.
in the installer, schedule a program which should check first to see if the main program is running or not and quit if it is running if not, calls curl to download a batch file from your site with the updates, then runs the batch file.
the batch file it downloads updates the app by downloading the correct files using curl.
the process should run maybe every 2 weeks or once a month, depending on how often you update.
the uninstall part of the installer should be capable of removing all parts of the app in question,including any updates. this can be accomplished by removing all files from that subdir of program files.
RMDir /r /REBOOTOK '$INSTDIR'
RMDir /r /REBOOTOK "$SMPROGRAMS\$StartMenuFolder"
Delete '$SMPROGRAMS\$StartMenuFolder\gpl3license.lnk'
Delete '$SMPROGRAMS\$StartMenuFolder\readme.lnk'
Delete '$SMPROGRAMS\$StartMenuFolder\${PRODUCT_TITLE}.lnk'
DeleteRegKey HKCU "Software\Your major subkey\${PRODUCT_NAME}"
DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PRODUCT_NAME}"
DeleteRegKey /ifempty HKCU "Software\${PRODUCT_NAME}"
PRODUCT_NAME is a !define I made because I use these nsi files like a template.
this is only a piece of the installer file's uninstaller section.
I've been able to create a patch updater program for my Windows app (a CLI which uses NSIS as its installer) by releasing the app to my personal CDN (or some hosting platform) and taking advantage of Node.js modules like path to replace the binary (using a similar procedure to equinox.io) with a given version from the CDN and winreg to update the Windows Registry accordingly. Since I've namespaced my Windows Registry key, the uninstaller still works for it.
If anyone wants more details on this, please ask. I'm happy to help.
Some compilers like Delphi make a lot of changes in the final executable even if you change a little part of your code.
So first you should see if it worth patching.
Another consideration is patching by itself.
Patching maybe blocked by some Anti Virus Software specially in some system folders.
and finally incremental patching data size can grow beyond the original files.
Based on above subjects I don't suggest you patching.
Use full installers instead
Where are the Windows binaries for the command-line version of SVN? Everywhere I search, it has to be some company's fancy client software with an installer.
I'm working on a machine where I don't have administrator account. Just give me the plain command-line binaries, where the hell are they?
The former direct links don't work, but the subversion project now provides several offsite links to Windows binaries:
http://subversion.apache.org/packages.html#windows
I use Slik SVN. It doesn't require a bunch of registration information like the CollabNet one does.
Get the version from Slik SVN, which doesn't require registration, and you should be able to install it anywhere you want (and have permissions).
If you can't run the installer, you could always try extracting the files from it using UniExtract, or possibly Total Commander with the MSI plugin.
You could always use cygwin and install the subversion package during install which would make it accessible in command prompt (with some $PATH changes) but I understand if this doesn't fit your criteria of 'just binaries'.
Edit: I understand why people are downvoting but it was just a last resort suggestion to getting the binaries for subversion. To answer the question 'why install all of cygwin if you just need subversion': I find that originally being a linux app that I'd be more comfortable using subversion in a *nix environment such as cygwin and could consequently leverage GNU utils such as find, grep, bash etc to perform file based operations, which subversion primarily deals with.
I suggested it because of this and I thought it would be the easiest and quickest way to get subversion as the OP had expressed dismay about finding legitimate binaries: a few clicks and you're done. It was a suggestion that was asked for and in my original comment I had the caveat of installing cygwin right there.
I have hust found this: http://alagazam.net/ . This is really the same project as http://sourceforge.net/projects/win32svn/ , which was suggested in another answer.
This is the closest solution to the original, pre-Apache binary. I've been using it without problems for the last two-three years.
http://subversion.tigris.org/
The client-side binaries ship with the source, as well as several other packaged installers.
The Command Line Client from CollabNet, while it does have an installer for windows, all it asks you is where you want to put the files, and then finish. Its just the command line client, like it says, nothing else. Subversion doesn't distribute their own binaries.
The Subversion project does not
officially endorse or maintain any
binary packages of the Subversion
software. However, volunteers have
created binary packages for different
distributions and platforms, and as a
convenience, we maintain a list of
links to them here. If there are any
problems with or questions about the
different binary packages please send
email to the Subversion users mailing
list.
I've successfully downloaded the binaries in a zip file and used them on windows w/o administrator access from here:
http://sourceforge.net/projects/win32svn/
As already suggested, take a look at the official Apache Subversion Binary Packages page.
If you are looking for zipped binaries of the latest Subversion command-line tools, you can get them at http://www.visualsvn.com/downloads/ (!) without any registration.
Portable binaries can also be found at:
http://www.smartsvn.com/download#svn