Search This Blog

Monday, October 10, 2011

NSIS - nullsoft scriptable install system 2.46



Recently I was tasked with automating the installation of a few customized applications. As a requirement for my production site, I must always have the most up to date version of the following:
  • Apache Web Server (HTTPD) 2.2.21
  • OpenSSL 1.0.0e
  • PHP 5.3.8
  • Java Runtime 1.6
  • ElasticSearch 0.17.1
  • Databases supported MySQL, Oracle, MS-SQL Server (various php extensions needed)
  • Custom PHP Web Application w/ ExtJS 4.0.6
Maintaining the updates for these products can be a pain when you do not have access to the production system. My original Install guide was quite lengthly and was a pain to keep up to date everytime my installation procedures changed. I was able to fix all of this will Nullsoft's NSIS.

There are a variety of plugins available to help with different tasks. Currently my Installer uses a splash screen, modifys system variables, creates and starts windows services, and uninstalls everything cleanly.
Splash Screen - Just Modify the Splash.bmp's Absolute path in quotes. Add to the NSI file just before you Installer Information. (Name, Outfile, installDir, etc.)
;====================================================
;Splash Screen Information

Function .onInit
SetOutPath $TEMP
File /oname=spltmp.bmp "C:\Users\Charles\Desktop\Splash.bmp"
advsplash::show 1000 600 400 -1 $TEMP\spltmp
Pop $0 ; $0 has '1' if the user closed the splash screen early,
; '0' if everything closed normally, and '-1' if some error occurred.
Delete $TEMP\spltmp.bmp
FunctionEnd
If you want your installer to run with elevated Privledges (Vista, Windows 7)
;====================================================
;Elevate Privs for Installation
RequestExecutionLevel admin
Check Java Version
;====================================================
;Java Installation Check
Section "find java" FINDJAVA

StrCpy $1 "SOFTWARE\JavaSoft\Java Runtime Environment"
StrCpy $2 0
ReadRegStr $2 HKLM "$1" "CurrentVersion"
StrCmp $2 "" DetectTry2
ReadRegStr $5 HKLM "$1\$2" "JavaHome"
StrCmp $5 "" DetectTry2
goto done

DetectTry2:
ReadRegStr $2 HKLM "SOFTWARE\JavaSoft\Java Development Kit" "CurrentVersion"
StrCmp $2 "" NoJava
ReadRegStr $5 HKLM "SOFTWARE\JavaSoft\Java Development Kit\$2" "JavaHome"
StrCMP $5 "" NoJava done

done:
;All done.

NoJava:
;Install Java script
nsExec::Exec "start http:\\www.java.com"
SectionEnd

Check the nullsoft site for downloads and additional information. I used the nsSCM & nsEXEC plugins for manipulation of window's services and other batch script tasks.


Wednesday, September 21, 2011

Record.dat << Streaming Audio

Recently I was trying to record audio from my sound card's playback device, and could not get any software to perform the job. I was googling and fiddling through Audacity's settings without troubleshooting the situation from its root.
Updating my drivers from the PC Manufactor's website presented me with a list of devices in Audacity's available sources that were not available before. Even though my Device Manager showed my devices as being up to date, it was using a Microsoft Proprietary driver for my audio device instead of the more appropraite device available from Dell.
Had I used the original Dell Image from the factory, I am sure this would not have been an issue. But if you are installing your own custom Windows Instance, remember to update all drivers no matter how insignificant the additional features of them may seem at the time.

Friday, September 9, 2011

My Apologies to Rockstar

A few months back I posted about my issues with Rockstar games. I still stand by my original statement that it did freeze A LOT. But I have figured out the cause of a majority of my PS3 Freezing.

Overheating.

I did some research online and found a few articles and blogs about the thermal paste that helps conduct heat from the GPUs to the aluminum conduits during high performance calculations of verticies in games. Apparently the paste that is used at the factory when creating the original PS3 is sub-par and become degraded over years of use. This results in poor cooling and can cause all types of unpredictable errors.

So I ordered some Arctic Silver 5 Thermal paste from www.newegg.com and started taking apart the PS3.

One piece of advice. While taking apart the PS3, you will notice that as you disassemble each layer, there are arrows pointing out which screws to extract. keep the screws with the component you are taking out and everything will go together much easier. There is one screw just below the wires where the power cable connects that does not have an arrow.


I instantly saw that the factory thermal paste was dried out and flaky. I cleaned it off the processors and heat conductors using 91% isopropyl alcohol and coffee filters, which dont leave particles behind. (they sell 75% isopropyl alcohol, however this can leave 16% more residue on the processors...dont know if it matters though). I used wooden toothpicks to get the excess paste off the edge of the processors.

One other note, be cautious when screwing in the metal pieces that apply pressure to the processors against the aluminum heat conductors. They can be easily cross threaded.

I used a plastic bag over my finger and applied the paste to both the processors and heat conductors evenly using about 90% of the thermal paste in the tube.

Paste does not need time to dry. Actually you don't want it to dry at all. When it becomes dry, it does not conduct heat well and needs to be replaced.

Also thanks Tim, for helping me with this project!

Tuesday, August 16, 2011

Solaris 10, Increasing swap space


How to increase swap space in your global zone to make swap available for local zones.

Monday, July 11, 2011

Rockstar Games Freeze

My PS3 was purchased around Christmas in 2007. I remember when I was deployed earlier in '07 to Djibouti with the Marine Corp. and one of the Marines in my tent was able to get his hands on a PS3. I thought this system was amazing and had a beautiful shiny black and chrome chassis. The graphics were amazing and I was thrilled to be getting my hands on the new Metal Gear Solid: Guns of the Patriots.

Since I got my PS3 my Xbox 360 started collecting dust. All the newest games I purchased were for the PS3. Using my common sense I assumed that the PS3 had newer hardware, thus would run newer games faster and with better graphics than the Xbox.

Sony finally decided to stop production on the expensive 'Fat PS3' and started making a cheaper product with newer technology and a slim case. These electronics are supposed to be smaller, run cooler and make more efficient use of the electricity they require.

Recently I have purchased 2 games that have been causing my "old" PS3 to freeze. Battlefield: Bad Company 2 & Red Dead Redemption. I actually purchased both games at the same time from Amazon.com. Since the recent freezes with these games, no other games cause my system to freeze. However these games still occasionally lock up. Red Dead Redemption locks up so often it is unplayable, however Bad Company 2 seems to go through a fit in which it locks up many times in one hour, yet not at all for other weeks on end. The game seemed to freeze more often when playing online. When looking online at Amazon reviews, I have noticed that others with this older system tend to have newer games lock up more and more often. Especially with L.A. Noire. (Rockstar titles seem to be full of fail lately)

I understand that older hardware eventually falls apart, as the circuits begin to develop oxidation and the alloys become degraded providing poor conductivity of electrons. However I have taken great care of my PS3, ensuring to package it in original box with Styrofoam each time I move it (3 times total). So why is my system which will be 4 years old this December freezing with newer games only?

My theory is that these more graphics intensive games that everyone is demanding require pushing the hardware of the PS3. Thus, your older system will overheat, since the hardware is not as efficient as the newer PS3. So why don't we old PS3 owners all go out and buy the newest PS3? One good reason is because money doesn't grow on trees like it does at Sony's Headquarters. Another is because we enjoy playing PS2 titles on the same system. Also we paid full price for this system when it first came out, supporting the efforts of Sony to compete with Microsoft's Xbox 360. And this is how we are treated by Sony's Quality Assurance Team? The idea of maintaining compatibility between hardware revisions must have slipped the minds of their development team. Also I highly doubt Rockstar's Test team is testing their software on an expensive system that does not exist anymore.

After the recent exploitation of my personal information via Sony's Online services coupled with the lack of product support and maintaining compatibility, I will no longer be purchasing products from Sony. Also the remote for my Sony surround sound system cannot be programmed to turn my TV on/off unless its a Sony TV. (according to the manual that came with the surround sound system.)

Saturday, May 14, 2011

new PSN update available

A new PSN update is available. I just downloaded it and am still not able to login to PSN. Does this mean it will be up soon? Hopefully they will. Don't care much for any other sony product line but the playstation. Might go back to PC gaming with surround sound, hi def and hdmi output.

Monday, February 28, 2011

Solaris 10, Services on Root Ports

By default only root may host services on ports < 1024. (i.e. Port 80, 443, etc).

The following command allows a user to utilize privledged ports:


# usermod -K defaultpriv=basic,net_privaddr username

Wednesday, February 23, 2011

Battlefield 3







This game looks like it is going to be good.