HydrogenAudio

Lossy Audio Compression => AAC => AAC - General => Topic started by: Nologic on 2012-08-01 07:45:00

Title: Make Portable FHGaacEnc From Installer
Post by: Nologic on 2012-08-01 07:45:00
This is a sibling script to the one I did for Qaac & QTaacEnc (http://www.hydrogenaudio.org/forums/index.php?showtopic=78072&view=findpost&p=803958) however ever so slightly more original.

This is written in AutoIt, and will extract the required files from the WinAMP installer. This depends on having 7-zip ether installed on your system or extracted to a folder somewhere on your system.

You will still need to download FHGaacEnc (https://github.com/tmkk/fhgaacenc) and install the VC2008 Runtimes (http://www.microsoft.com/downloads/details.aspx?familyid=A5C84275-3B97-4AB7-A40D-3802B2AF5FC2)...but it does help simplify things.

http://www.mediafire.com/?4spc7is4l36wvi6 (http://www.mediafire.com/?4spc7is4l36wvi6)

Source:
Code: [Select]
Dim $Files[3] = [ 'enc_fhgaac.dll' , 'libmp4v2.dll' , 'nsutil.dll' ]

; Handle 7-zip
If FileExists( @ScriptDir & '\7z.exe' ) Then
$Path_7zip = @ScriptDir
Else
$Path_7zip = RegRead( 'HKEY_LOCAL_MACHINE\SOFTWARE\7-Zip', 'Path' )
If $Path_7zip = '' OR FileExists( $Path_7zip & '\7z.exe' ) = 0 Then
While 1
$7zip = FileOpenDialog( 'Select 7-zip Executable.' , '' , 'Executables (*.exe)' , 1 + 4 )
If @Error Then
MsgBox( 4096 , 'Error:' , 'No Executable Chosen.' )
Exit
Else
$Path_7zip = StringLeft( $7zip , StringInStr ( $7zip , '\' , 0 , -1 ) - 1 )
If FileExists( $Path_7zip & '\7z.exe' ) Then ExitLoop
MsgBox( 4096 , 'Error:' , '7z.exe Not Present.' )
EndIf
WEnd
EndIf
EndIf

; Handle Installers
$Installer = ''
$search = FileFindFirstFile( @ScriptDir & '\winamp*.exe' )
If NOT @Error Then
$Installer = @ScriptDir & '\' & FileFindNextFile( $search )
EndIf
While 1
If $Installer = '' Then
$Installer = FileOpenDialog( 'Select WinAMP Installer.' , '' , 'Executables (*.exe)' , 1 + 4 )
If @Error Then
MsgBox( 4096 , 'Error:' , 'No Installer Chosen.' )
Exit
EndIf
EndIf
; Start Extracting Files
For $Element In $Files
RunWait( @ComSpec & ' /c 7z.exe e -y -r -o"' & @ScriptDir & '" "' & $Installer & '" ' & $Element , $Path_7zip , @SW_HIDE )
If NOT FileExists( @ScriptDir & '\' & $Element ) Then
MsgBox( 4096 , 'Error:' , 'Installer Does Not Contain Required Files.' & @LF & @LF & 'Please Use Another Installer.' )
$Installer = ''
ContinueLoop 2
EndIf
Next
ExitLoop
WEnd

MsgBox( 0 , 'Finished' , 'All files Processed.' )
Title: Make Portable FHGaacEnc From Installer
Post by: Nologic on 2013-01-10 06:59:41
Since I updated the one for Qaac & QTaacEnc (http://www.hydrogenaudio.org/forums/index.php?showtopic=78072&view=findpost&p=819976) I figured I might as well update this one as well.

This is a bit faster much like the other one...and requires the WinAMP installer (http://www.winamp.com/media-player/en).

MediaFire Link (http://www.mediafire.com/?gxescywtqzzpjlt) to Script.