[Hdrflow-svn] SF.net SVN: hdrflow: [426] trunk
Status: Pre-Alpha
Brought to you by:
glslang
From: <gl...@us...> - 2008-02-24 14:42:24
|
Revision: 426 http://hdrflow.svn.sourceforge.net/hdrflow/?rev=426&view=rev Author: glslang Date: 2008-02-24 06:42:19 -0800 (Sun, 24 Feb 2008) Log Message: ----------- + new win32 installers Added Paths: ----------- trunk/hdrflow_runtime.nsi trunk/hdrflow_sdk.nsi trunk/rez/ trunk/rez/add_to_path.nsh trunk/rez/hdrflow.bmp trunk/rez/openlibraries.spec trunk/rez/write_env_str.nsh Removed Paths: ------------- trunk/lib/openlibraries/installer/ Added: trunk/hdrflow_runtime.nsi =================================================================== --- trunk/hdrflow_runtime.nsi (rev 0) +++ trunk/hdrflow_runtime.nsi 2008-02-24 14:42:19 UTC (rev 426) @@ -0,0 +1,225 @@ +;-------------------------------- +;NSIS HDRFlow Installation Script +;-------------------------------- + +!ifndef VERSION + !define VERSION 0_5_0 + !define VERSION_DOT 0.5.0 +!endif + +;-------------------------------- +;Configuration + +!ifdef OUTFILE + OutFile "${OUTFILE}" +!else + OutFile hdrflow-${VERSION_DOT}-runtime.exe +!endif + +SetCompressor /SOLID lzma + +InstType "Full" + +InstallDir $PROGRAMFILES\HDRFlow +InstallDirRegKey HKLM Software\HDRFlow "" + +;-------------------------------- +;Header Files + +!define ALL_USERS + +!include "MUI.nsh" +!include "Sections.nsh" +!include "rez\add_to_path.nsh" +!include "rez\write_env_str.nsh" + +;Names +Name "HDRFlow" +Caption "HDRFlow (v.${VERSION_DOT}) Setup" + +;Interface Settings +!define MUI_ABORTWARNING + +!define MUI_HEADERIMAGE +!define MUI_HEADERIMAGE_BITMAP "rez\hdrflow.bmp" ; optional +!define MUI_WELCOMEFINISHPAGE_BITMAP "${NSISDIR}\Contrib\Graphics\Wizard\orange.bmp" + +!define MUI_COMPONENTSPAGE_SMALLDESC + +;Pages +!define MUI_WELCOMEPAGE_TITLE "Welcome to the HDRFlow (v.${VERSION_DOT}) Setup Wizard" +!define MUI_WELCOMEPAGE_TEXT "This wizard will guide you through the installation of HDRFlow.\r\n\r\n$_CLICK" + +!insertmacro MUI_PAGE_WELCOME +!insertmacro MUI_PAGE_LICENSE "lib\openlibraries\COPYING" +!insertmacro MUI_PAGE_COMPONENTS +!insertmacro MUI_PAGE_DIRECTORY +!insertmacro MUI_PAGE_INSTFILES + +!define MUI_FINISHPAGE_LINK "Visit the web site for the latest news, FAQs and support" +!define MUI_FINISHPAGE_LINK_LOCATION "http://www.hdrflow.com/" + +!insertmacro MUI_PAGE_FINISH + +!insertmacro MUI_UNPAGE_CONFIRM +!insertmacro MUI_UNPAGE_INSTFILES + +;-------------------------------- +;Languages + +!insertmacro MUI_LANGUAGE "English" + +Section "HDRFlow" SecCore + + SetDetailsPrint textonly + DetailPrint "Installing HDRFlow..." + SetDetailsPrint listonly + + SectionIn 1 2 3 RO + SetOutPath $INSTDIR + + SetOverwrite on + + SetOutPath $INSTDIR\DLLs + File "lib\openlibraries\Multi-threaded Release DLL\*-vc80-r-${VERSION}.dll" + File "lib\openlibraries\Multi-threaded Release DLL\*.opl" + + ; dependencies + File "C:\Program Files\FFmpeg\lib\avcodec-51.dll" + File "C:\Program Files\FFmpeg\lib\avformat-52.dll" + File "C:\Program Files\FFmpeg\lib\avutil-49.dll" + File "C:\OpenEXR\bin\Release\Half.dll" + File "C:\OpenEXR\bin\Release\Iex.dll" + File "C:\OpenEXR\bin\Release\IlmImf.dll" + File "C:\OpenEXR\bin\Release\Half.dll" + File "C:\OpenEXR\bin\Release\IlmThread.dll" + File "C:\OpenEXR\bin\Release\Imath.dll" + File "C:\Program Files\NVIDIA Corporation\Cg\bin\cg.dll" + File "C:\Program Files\NVIDIA Corporation\Cg\bin\cgGL.dll" + File "C:\zlib\lib\zlib1.dll" + + ; Python + SetOutPath $INSTDIR\python + File "lib\openlibraries\Multi-threaded Release DLL\*.pyd" + + SetOutPath $INSTDIR\shaders + File "lib\openlibraries\effects\shaders\sepia.cg" + File "lib\openlibraries\effects\shaders\sepia.frag" + File "lib\openlibraries\effects\shaders\fixed_function.vert" + File "lib\openlibraries\effects\shaders\passthrough.vert" + File "lib\openlibraries\effects\shaders\passthrough.cg" + File "lib\openlibraries\effects\shaders\rgb_to_yuv444.frag" + File "lib\openlibraries\effects\shaders\yuv444_to_rgb.frag" + File "lib\openlibraries\effects\shaders\yuv444_to_rgb.cg" + File "lib\openlibraries\effects\shaders\yuv444_to_rgb_deinterlace.cg" + File "lib\openlibraries\effects\shaders\yuv444_to_rgb_deinterlace.frag" + File "lib\openlibraries\effects\shaders\histogram.cg" + File "lib\openlibraries\effects\shaders\histogram.frag" + File "lib\openlibraries\effects\shaders\channel_selector.cg" + File "lib\openlibraries\effects\shaders\channel_selector.frag" + + SetDetailsPrint both + +;-------------------------------- +;Path environment variable + + Push "$INSTDIR\DLLs" + Call AddToPath + +;-------------------------------- +;Python environment variable + Push "PYTHONPATH" + Push "$INSTDIR\python" + Call WriteEnvStr + +;-------------------------------- +;Registry + +WriteRegStr HKLM "Software\HDRFlow" "CurrentVersion" "${VERSION_DOT}" +WriteRegStr HKLM "Software\HDRFlow" "PluginsDirRelease" "$INSTDIR\DLLs" +WriteRegStr HKLM "Software\HDRFlow" "KernelsDir" "$INSTDIR\kernels" +WriteRegStr HKLM "Software\HDRFlow" "ShadersDir" "$INSTDIR\shaders" + +WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\HDRFlow" "DisplayName" "HDRFlow" +WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\HDRFlow" "UninstallString" "$INSTDIR\uninst-hdrflow.exe" + +SectionEnd + +Section -post + + WriteUninstaller $INSTDIR\uninst-hdrflow.exe + +SectionEnd + +;-------------------------------- +;Descriptions + +!insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN + !insertmacro MUI_DESCRIPTION_TEXT ${SecCore} "HDRFlow development and runtime files" +!insertmacro MUI_FUNCTION_DESCRIPTION_END + +;-------------------------------- +;Uninstaller Section + +Section Uninstall + + SetDetailsPrint textonly + DetailPrint "Deleting Files..." + SetDetailsPrint listonly + + DeleteRegKey HKLM "Software\HDRFlow" + DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\HDRFlow" + + Push "$INSTDIR\DLLs" + Call un.RemoveFromPath + + Push "PYTHONPATH" + Call un.DeleteEnvStr + + RMDir /r $INSTDIR\DLLs + RMDir /r $INSTDIR\include + RMDir /r $INSTDIR\lib + RMDir /r $INSTDIR\kernels + RMDir /r $INSTDIR\shaders + RMDir /r $INSTDIR + + SetDetailsPrint both + + SectionEnd + + Function .onInit + + ReadRegStr $R0 HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\HDRFlow" "UninstallString" + StrCmp $R0 "" done + + MessageBox MB_OKCANCEL|MB_ICONEXCLAMATION \ + "HDRFlow is already installed. $\n$\nClick `OK` to remove the \ + previous version or `Cancel` to cancel this upgrade." \ + IDOK uninst + Abort + +;Run the uninstaller +uninst: + ClearErrors + ; Copy the uninstaller to a temp location + ;GetTempFileName $0 + ;CopyFiles $R0 $0 + ;Start the uninstaller using the option to not copy itself + ExecWait '$R0 _?=$INSTDIR' + + IfErrors no_remove_uninstaller + ; In most cases the uninstall is successful at this point. + ; You may also consider using a registry key to check whether + ; the user has chosen to uninstall. If you are using an uninstaller + ; components page, make sure all sections are uninstalled. + goto done + no_remove_uninstaller: + MessageBox MB_ICONEXCLAMATION \ + "Unable to remove previous version of HDRFlow" + Abort + +done: + ; remove the copied uninstaller + ;Delete '$0' + +FunctionEnd Added: trunk/hdrflow_sdk.nsi =================================================================== --- trunk/hdrflow_sdk.nsi (rev 0) +++ trunk/hdrflow_sdk.nsi 2008-02-24 14:42:19 UTC (rev 426) @@ -0,0 +1,318 @@ +;-------------------------------- +;NSIS HDRFlow Installation Script +;-------------------------------- + +!ifndef VERSION + !define VERSION 0_5_0 + !define VERSION_DOT 0.5.0 +!endif + +;-------------------------------- +;Configuration + +!ifdef OUTFILE + OutFile "${OUTFILE}" +!else + OutFile hdrflow-${VERSION_DOT}-sdk.exe +!endif + +SetCompressor /SOLID lzma + +InstType "Full" + +InstallDir $PROGRAMFILES\HDRFlow +InstallDirRegKey HKLM Software\HDRFlow "" + +;-------------------------------- +;Header Files + +!define ALL_USERS + +!include "MUI.nsh" +!include "Sections.nsh" +!include "rez\add_to_path.nsh" +!include "rez\write_env_str.nsh" + +;Names +Name "HDRFlow" +Caption "HDRFlow (v.${VERSION_DOT}) Setup" + +;Interface Settings +!define MUI_ABORTWARNING + +!define MUI_HEADERIMAGE +!define MUI_HEADERIMAGE_BITMAP "rez\hdrflow.bmp" ; optional +!define MUI_WELCOMEFINISHPAGE_BITMAP "${NSISDIR}\Contrib\Graphics\Wizard\orange.bmp" + +!define MUI_COMPONENTSPAGE_SMALLDESC + +;Pages +!define MUI_WELCOMEPAGE_TITLE "Welcome to HDRFlow SDK (v.${VERSION_DOT}) Setup Wizard" +!define MUI_WELCOMEPAGE_TEXT "This wizard will guide you through the installation of HDRFlow SDK.\r\n\r\n$_CLICK" + +!insertmacro MUI_PAGE_WELCOME +!insertmacro MUI_PAGE_LICENSE "lib\openlibraries\COPYING" +!insertmacro MUI_PAGE_COMPONENTS +!insertmacro MUI_PAGE_DIRECTORY +!insertmacro MUI_PAGE_INSTFILES + +!define MUI_FINISHPAGE_LINK "Visit the web site for the latest news, FAQs and support" +!define MUI_FINISHPAGE_LINK_LOCATION "http://www.hdrflow.com/" + +!insertmacro MUI_PAGE_FINISH + +!insertmacro MUI_UNPAGE_CONFIRM +!insertmacro MUI_UNPAGE_INSTFILES + +;-------------------------------- +;Languages + +!insertmacro MUI_LANGUAGE "English" + +Section "HDRFlow" SecCore + + SetDetailsPrint textonly + DetailPrint "Installing HDRFlow SDK..." + SetDetailsPrint listonly + + SectionIn 1 2 3 RO + SetOutPath $INSTDIR + + SetOverwrite on + + SetOutPath $INSTDIR\include\hdrflow-${VERSION_DOT}\openpluginlib\pl + File lib\openlibraries\src\openpluginlib\pl\allocatorstringstorage.h + File lib\openlibraries\src\openpluginlib\pl\bind_info.hpp + File lib\openlibraries\src\openpluginlib\pl\cg.hpp + File lib\openlibraries\src\openpluginlib\pl\config.hpp + File lib\openlibraries\src\openpluginlib\pl\content_handler_libxml.hpp + File lib\openlibraries\src\openpluginlib\pl\content_handler_msxml.hpp + File lib\openlibraries\src\openpluginlib\pl\cowstringopt.h + File lib\openlibraries\src\openpluginlib\pl\discovery_traits.hpp + File lib\openlibraries\src\openpluginlib\pl\flex_string.h + File lib\openlibraries\src\openpluginlib\pl\flex_string_details.h + File lib\openlibraries\src\openpluginlib\pl\flex_string_shell.h + File lib\openlibraries\src\openpluginlib\pl\geometry.hpp + File lib\openlibraries\src\openpluginlib\pl\GL_utility.hpp + File lib\openlibraries\src\openpluginlib\pl\openplugin.hpp + File lib\openlibraries\src\openpluginlib\pl\openpluginlib.hpp + File lib\openlibraries\src\openpluginlib\pl\pool.hpp + File lib\openlibraries\src\openpluginlib\pl\property.hpp + File lib\openlibraries\src\openpluginlib\pl\registry.hpp + File lib\openlibraries\src\openpluginlib\pl\shader_manager.hpp + File lib\openlibraries\src\openpluginlib\pl\simplestringstorage.h + File lib\openlibraries\src\openpluginlib\pl\smallstringopt.h + File lib\openlibraries\src\openpluginlib\pl\stream.hpp + File lib\openlibraries\src\openpluginlib\pl\string.hpp + File lib\openlibraries\src\openpluginlib\pl\timer.hpp + File lib\openlibraries\src\openpluginlib\pl\utf8_utils.hpp + File lib\openlibraries\src\openpluginlib\pl\vectorstringstorage.h + + SetOutPath $INSTDIR\include\hdrflow-${VERSION_DOT}\openpluginlib\pl\pcos + File lib\openlibraries\src\openpluginlib\pl\pcos\iproperty_container.hpp + File lib\openlibraries\src\openpluginlib\pl\pcos\isubject.hpp + File lib\openlibraries\src\openpluginlib\pl\pcos\iclonable.hpp + File lib\openlibraries\src\openpluginlib\pl\pcos\key.hpp + File lib\openlibraries\src\openpluginlib\pl\pcos\observer.hpp + File lib\openlibraries\src\openpluginlib\pl\pcos\property.hpp + File lib\openlibraries\src\openpluginlib\pl\pcos\property_container.hpp + File lib\openlibraries\src\openpluginlib\pl\pcos\subject.hpp + File lib\openlibraries\src\openpluginlib\pl\pcos\visitor.hpp + + SetOutPath $INSTDIR\include\hdrflow-${VERSION_DOT}\openimagelib\il + File lib\openlibraries\src\openimagelib\il\basic_image.hpp + File lib\openlibraries\src\openimagelib\il\compression_traits.hpp + File lib\openlibraries\src\openimagelib\il\config.hpp + File lib\openlibraries\src\openimagelib\il\float_traits.hpp + File lib\openlibraries\src\openimagelib\il\il.hpp + File lib\openlibraries\src\openimagelib\il\openimagelib_plugin.hpp + File lib\openlibraries\src\openimagelib\il\rgb_traits.hpp + File lib\openlibraries\src\openimagelib\il\traits.hpp + File lib\openlibraries\src\openimagelib\il\utility.hpp + File lib\openlibraries\src\openimagelib\il\yuv_traits.hpp + File lib\openlibraries\src\openimagelib\il\lut_functions.hpp + + SetOutPath $INSTDIR\include\hdrflow-${VERSION_DOT}\openmedialib\ml + File lib\openlibraries\src\openmedialib\ml\audio.hpp + File lib\openlibraries\src\openmedialib\ml\config.hpp + File lib\openlibraries\src\openmedialib\ml\filter.hpp + File lib\openlibraries\src\openmedialib\ml\frame.hpp + File lib\openlibraries\src\openmedialib\ml\input.hpp + File lib\openlibraries\src\openmedialib\ml\ml.hpp + File lib\openlibraries\src\openmedialib\ml\openmedialib_plugin.hpp + File lib\openlibraries\src\openmedialib\ml\store.hpp + File lib\openlibraries\src\openmedialib\ml\utilities.hpp + + SetOutPath $INSTDIR\DLLs + File "lib\openlibraries\Multi-threaded Debug DLL\*-vc80-d-${VERSION}.dll" + File "lib\openlibraries\Multi-threaded Debug DLL\*.opl" + File "lib\openlibraries\Multi-threaded Release DLL\*-vc80-r-${VERSION}.dll" + + ; dependencies + File "C:\Program Files\FFmpeg\lib\avcodec-51.dll" + File "C:\Program Files\FFmpeg\lib\avformat-52.dll" + File "C:\Program Files\FFmpeg\lib\avutil-49.dll" + File "C:\OpenEXR\bin\Debug\Half.dll" + File "C:\OpenEXR\bin\Debug\Iex.dll" + File "C:\OpenEXR\bin\Debug\IlmImf.dll" + File "C:\OpenEXR\bin\Debug\Half.dll" + File "C:\OpenEXR\bin\Debug\IlmThread.dll" + File "C:\OpenEXR\bin\Debug\Imath.dll" + File "C:\Program Files\NVIDIA Corporation\Cg\bin\cg.dll" + File "C:\Program Files\NVIDIA Corporation\Cg\bin\cgGL.dll" + File "C:\zlib\lib\zlib1.dll" + + ; Python + SetOutPath $INSTDIR\python + File "lib\openlibraries\Multi-threaded Debug DLL\HDRFlowPlugin.pyd" + File "lib\openlibraries\Multi-threaded Debug DLL\HDRFlowImage.pyd" + File "lib\openlibraries\Multi-threaded Debug DLL\HDRFlowMedia.pyd" + + SetOutPath $INSTDIR\lib + File "lib\openlibraries\Multi-threaded Debug DLL\*_pl-vc80-d-${VERSION}.lib" + File "lib\openlibraries\Multi-threaded Debug DLL\*_il-vc80-d-${VERSION}.lib" + File "lib\openlibraries\Multi-threaded Debug DLL\*_ml-vc80-d-${VERSION}.lib" + File "lib\openlibraries\Multi-threaded Release DLL\*_pl-vc80-r-${VERSION}.lib" + File "lib\openlibraries\Multi-threaded Release DLL\*_il-vc80-r-${VERSION}.lib" + File "lib\openlibraries\Multi-threaded Release DLL\*_ml-vc80-r-${VERSION}.lib" + + SetOutPath $INSTDIR\shaders + File "lib\openlibraries\effects\shaders\sepia.cg" + File "lib\openlibraries\effects\shaders\sepia.frag" + File "lib\openlibraries\effects\shaders\fixed_function.vert" + File "lib\openlibraries\effects\shaders\passthrough.vert" + File "lib\openlibraries\effects\shaders\passthrough.cg" + File "lib\openlibraries\effects\shaders\rgb_to_yuv444.frag" + File "lib\openlibraries\effects\shaders\yuv444_to_rgb.frag" + File "lib\openlibraries\effects\shaders\yuv444_to_rgb.cg" + File "lib\openlibraries\effects\shaders\yuv444_to_rgb_deinterlace.cg" + File "lib\openlibraries\effects\shaders\yuv444_to_rgb_deinterlace.frag" + File "lib\openlibraries\effects\shaders\histogram.cg" + File "lib\openlibraries\effects\shaders\histogram.frag" + File "lib\openlibraries\effects\shaders\channel_selector.cg" + File "lib\openlibraries\effects\shaders\channel_selector.frag" + + SetDetailsPrint both + +;-------------------------------- +;Path environment variable + + Push "$INSTDIR\DLLs" + Call AddToPath + +;-------------------------------- +;Include environment variable + Push "HDRFLOW_INCLUDE_PATH" + Push "$INSTDIR\include\hdrflow-${VERSION_DOT}" + Call WriteEnvStr + +;-------------------------------- +;Lib environment variable + Push "HDRFLOW_LIB_PATH" + Push "$INSTDIR\lib" + Call WriteEnvStr + +;-------------------------------- +;Python environment variable + Push "PYTHONPATH" + Push "$INSTDIR\python" + Call WriteEnvStr + +;-------------------------------- +;Registry + +WriteRegStr HKLM "Software\HDRFlow" "CurrentVersion" "${VERSION_DOT}" +WriteRegStr HKLM "Software\HDRFlow" "PluginsDirDebug" "$INSTDIR\DLLs" +WriteRegStr HKLM "Software\HDRFlow" "PluginsDirRelease" "$INSTDIR\DLLs" +WriteRegStr HKLM "Software\HDRFlow" "KernelsDir" "$INSTDIR\kernels" +WriteRegStr HKLM "Software\HDRFlow" "ShadersDir" "$INSTDIR\shaders" + +WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\HDRFlow" "DisplayName" "HDRFlow" +WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\HDRFlow" "UninstallString" "$INSTDIR\uninst-hdrflow.exe" + +SectionEnd + +Section -post + + WriteUninstaller $INSTDIR\uninst-hdrflow.exe + +SectionEnd + +;-------------------------------- +;Descriptions + +!insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN + !insertmacro MUI_DESCRIPTION_TEXT ${SecCore} "HDRFlow development and runtime files" +!insertmacro MUI_FUNCTION_DESCRIPTION_END + +;-------------------------------- +;Uninstaller Section + +Section Uninstall + + SetDetailsPrint textonly + DetailPrint "Deleting Files..." + SetDetailsPrint listonly + + DeleteRegKey HKLM "Software\HDRFlow" + DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\HDRFlow" + + Push "$INSTDIR\DLLs" + Call un.RemoveFromPath + + Push "HDRFLOW_LIB_PATH" + Call un.DeleteEnvStr + + Push "HDRFLOW_INCLUDE_PATH" + Call un.DeleteEnvStr + + Push "PYTHONPATH" + Call un.DeleteEnvStr + + RMDir /r $INSTDIR\DLLs + RMDir /r $INSTDIR\include + RMDir /r $INSTDIR\lib + RMDir /r $INSTDIR\plugins + RMDir /r $INSTDIR\kernels + RMDir /r $INSTDIR\shaders + RMDir /r $INSTDIR + + SetDetailsPrint both + + SectionEnd + + Function .onInit + + ReadRegStr $R0 HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\HDRFlow" "UninstallString" + StrCmp $R0 "" done + + MessageBox MB_OKCANCEL|MB_ICONEXCLAMATION \ + "HDRFlow is already installed. $\n$\nClick `OK` to remove the \ + previous version or `Cancel` to cancel this upgrade." \ + IDOK uninst + Abort + +;Run the uninstaller +uninst: + ClearErrors + ; Copy the uninstaller to a temp location + ;GetTempFileName $0 + ;CopyFiles $R0 $0 + ;Start the uninstaller using the option to not copy itself + ExecWait '$R0 _?=$INSTDIR' + + IfErrors no_remove_uninstaller + ; In most cases the uninstall is successful at this point. + ; You may also consider using a registry key to check whether + ; the user has chosen to uninstall. If you are using an uninstaller + ; components page, make sure all sections are uninstalled. + goto done + no_remove_uninstaller: + MessageBox MB_ICONEXCLAMATION "Unable to remove previous version of HDRFlow" + Abort + +done: + ; remove the copied uninstaller + ;Delete '$0' + +FunctionEnd Added: trunk/rez/add_to_path.nsh =================================================================== --- trunk/rez/add_to_path.nsh (rev 0) +++ trunk/rez/add_to_path.nsh 2008-02-24 14:42:19 UTC (rev 426) @@ -0,0 +1,419 @@ +;---------------------------------------- +; from nsis.sourceforge.net + +!ifndef _AddToPath_nsh +!define _AddToPath_nsh + +!verbose 3 +!include "WinMessages.NSH" +!verbose 4 + +!ifndef WriteEnvStr_RegKey + !ifdef ALL_USERS + !define WriteEnvStr_RegKey \ + 'HKLM "SYSTEM\CurrentControlSet\Control\Session Manager\Environment"' + !else + !define WriteEnvStr_RegKey 'HKCU "Environment"' + !endif +!endif + +; AddToPath - Adds the given dir to the search path. +; Input - head of the stack +; Note - Win9x systems requires reboot + +Function AddToPath + Exch $0 + Push $1 + Push $2 + Push $3 + + # don't add if the path doesn't exist + IfFileExists "$0\*.*" "" AddToPath_done + ReadEnvStr $1 PATH + Push "$1;" + Push "$0;" + Call StrStr + Pop $2 + ;StrCmp $2 "" "" AddToPath_done + Push "$1;" + Push "$0\;" + Call StrStr + Pop $2 + ;StrCmp $2 "" "" AddToPath_done + GetFullPathName /SHORT $3 $0 + Push "$1;" + Push "$3;" + Call StrStr + Pop $2 + ;StrCmp $2 "" "" AddToPath_done + Push "$1;" + Push "$3\;" + Call StrStr + Pop $2 + ;StrCmp $2 "" "" AddToPath_done + + Call IsNT + Pop $1 + StrCmp $1 1 AddToPath_NT + ; Not on NT + StrCpy $1 $WINDIR 2 + FileOpen $1 "$1\autoexec.bat" a + FileSeek $1 -1 END + FileReadByte $1 $2 + IntCmp $2 26 0 +2 +2 # DOS EOF + FileSeek $1 -1 END # write over EOF + FileWrite $1 "$\r$\nSET PATH=%PATH%;$3$\r$\n" + FileClose $1 + SetRebootFlag true + Goto AddToPath_done + + AddToPath_NT: + ReadRegStr $1 ${WriteEnvStr_RegKey} "PATH" + StrCpy $2 $1 1 -1 # copy last char + StrCmp $2 ";" 0 +2 # if last char == ; + StrCpy $1 $1 -1 # remove last char + StrCmp $1 "" AddToPath_NTdoIt + StrCpy $0 "$1;$0" + AddToPath_NTdoIt: + WriteRegExpandStr ${WriteEnvStr_RegKey} "PATH" $0 + SendMessage ${HWND_BROADCAST} ${WM_WININICHANGE} 0 "STR:Environment" /TIMEOUT=5000 + + AddToPath_done: + Pop $3 + Pop $2 + Pop $1 + Pop $0 +FunctionEnd + +; RemoveFromPath - Remove a given dir from the path +; Input: head of the stack + +Function un.RemoveFromPath + Exch $0 + Push $1 + Push $2 + Push $3 + Push $4 + Push $5 + Push $6 + + IntFmt $6 "%c" 26 # DOS EOF + + Call un.IsNT + Pop $1 + StrCmp $1 1 unRemoveFromPath_NT + ; Not on NT + StrCpy $1 $WINDIR 2 + FileOpen $1 "$1\autoexec.bat" r + GetTempFileName $4 + FileOpen $2 $4 w + GetFullPathName /SHORT $0 $0 + StrCpy $0 "SET PATH=%PATH%;$0" + Goto unRemoveFromPath_dosLoop + + unRemoveFromPath_dosLoop: + FileRead $1 $3 + StrCpy $5 $3 1 -1 # read last char + StrCmp $5 $6 0 +2 # if DOS EOF + StrCpy $3 $3 -1 # remove DOS EOF so we can compare + StrCmp $3 "$0$\r$\n" unRemoveFromPath_dosLoopRemoveLine + StrCmp $3 "$0$\n" unRemoveFromPath_dosLoopRemoveLine + StrCmp $3 "$0" unRemoveFromPath_dosLoopRemoveLine + StrCmp $3 "" unRemoveFromPath_dosLoopEnd + FileWrite $2 $3 + Goto unRemoveFromPath_dosLoop + unRemoveFromPath_dosLoopRemoveLine: + SetRebootFlag true + Goto unRemoveFromPath_dosLoop + + unRemoveFromPath_dosLoopEnd: + FileClose $2 + FileClose $1 + StrCpy $1 $WINDIR 2 + Delete "$1\autoexec.bat" + CopyFiles /SILENT $4 "$1\autoexec.bat" + Delete $4 + Goto unRemoveFromPath_done + + unRemoveFromPath_NT: + ReadRegStr $1 ${WriteEnvStr_RegKey} "PATH" + StrCpy $5 $1 1 -1 # copy last char + StrCmp $5 ";" +2 # if last char != ; + StrCpy $1 "$1;" # append ; + Push $1 + Push "$0;" + Call un.StrStr ; Find `$0;` in $1 + Pop $2 ; pos of our dir + StrCmp $2 "" unRemoveFromPath_done + ; else, it is in path + # $0 - path to add + # $1 - path var + StrLen $3 "$0;" + StrLen $4 $2 + StrCpy $5 $1 -$4 # $5 is now the part before the path to remove + StrCpy $6 $2 "" $3 # $6 is now the part after the path to remove + StrCpy $3 $5$6 + + StrCpy $5 $3 1 -1 # copy last char + StrCmp $5 ";" 0 +2 # if last char == ; + StrCpy $3 $3 -1 # remove last char + + WriteRegExpandStr ${WriteEnvStr_RegKey} "PATH" $3 + SendMessage ${HWND_BROADCAST} ${WM_WININICHANGE} 0 "STR:Environment" /TIMEOUT=5000 + + unRemoveFromPath_done: + Pop $6 + Pop $5 + Pop $4 + Pop $3 + Pop $2 + Pop $1 + Pop $0 +FunctionEnd + + + +; AddToEnvVar - Adds the given value to the given environment var +; Input - head of the stack $0 environement variable $1=value to add +; Note - Win9x systems requires reboot + +Function AddToEnvVar + + Exch $1 ; $1 has environment variable value + Exch + Exch $0 ; $0 has environment variable name + + DetailPrint "Adding $1 to $0" + Push $2 + Push $3 + Push $4 + + + ReadEnvStr $2 $0 + Push "$2;" + Push "$1;" + Call StrStr + Pop $3 + ;StrCmp $3 "" "" AddToEnvVar_done + + Push "$2;" + Push "$1\;" + Call StrStr + Pop $3 + ;StrCmp $3 "" "" AddToEnvVar_done + + + Call IsNT + Pop $2 + StrCmp $2 1 AddToEnvVar_NT + ; Not on NT + StrCpy $2 $WINDIR 2 + FileOpen $2 "$2\autoexec.bat" a + FileSeek $2 -1 END + FileReadByte $2 $3 + IntCmp $3 26 0 +2 +2 # DOS EOF + FileSeek $2 -1 END # write over EOF + FileWrite $2 "$\r$\nSET $0=%$0%;$4$\r$\n" + FileClose $2 + SetRebootFlag true + Goto AddToEnvVar_done + + AddToEnvVar_NT: + ReadRegStr $2 ${WriteEnvStr_RegKey} $0 + StrCpy $3 $2 1 -1 # copy last char + StrCmp $3 ";" 0 +2 # if last char == ; + StrCpy $2 $2 -1 # remove last char + StrCmp $2 "" AddToEnvVar_NTdoIt + StrCpy $1 "$2;$1" + AddToEnvVar_NTdoIt: + WriteRegExpandStr ${WriteEnvStr_RegKey} $0 $1 + SendMessage ${HWND_BROADCAST} ${WM_WININICHANGE} 0 "STR:Environment" /TIMEOUT=5000 + + AddToEnvVar_done: + Pop $4 + Pop $3 + Pop $2 + Pop $1 + Pop $0 + +FunctionEnd + +; RemoveFromEnvVar - Remove a given value from a environment var +; Input: head of the stack + +Function un.RemoveFromEnvVar + + Exch $1 ; $1 has environment variable value + Exch + Exch $0 ; $0 has environment variable name + + DetailPrint "Removing $1 from $0" + Push $2 + Push $3 + Push $4 + Push $5 + Push $6 + Push $7 + + IntFmt $7 "%c" 26 # DOS EOF + + Call un.IsNT + Pop $2 + StrCmp $2 1 unRemoveFromEnvVar_NT + ; Not on NT + StrCpy $2 $WINDIR 2 + FileOpen $2 "$2\autoexec.bat" r + GetTempFileName $5 + FileOpen $3 $5 w + GetFullPathName /SHORT $1 $1 + StrCpy $1 "SET $0=%$0%;$1" + Goto unRemoveFromEnvVar_dosLoop + + unRemoveFromEnvVar_dosLoop: + FileRead $2 $4 + StrCpy $6 $4 1 -1 # read last char + StrCmp $6 $7 0 +2 # if DOS EOF + StrCpy $4 $4 -1 # remove DOS EOF so we can compare + StrCmp $4 "$1$\r$\n" unRemoveFromEnvVar_dosLoopRemoveLine + StrCmp $4 "$1$\n" unRemoveFromEnvVar_dosLoopRemoveLine + StrCmp $4 "$1" unRemoveFromEnvVar_dosLoopRemoveLine + StrCmp $4 "" unRemoveFromEnvVar_dosLoopEnd + FileWrite $3 $4 + Goto unRemoveFromEnvVar_dosLoop + unRemoveFromEnvVar_dosLoopRemoveLine: + SetRebootFlag true + Goto unRemoveFromEnvVar_dosLoop + + unRemoveFromEnvVar_dosLoopEnd: + FileClose $3 + FileClose $2 + StrCpy $2 $WINDIR 2 + Delete "$2\autoexec.bat" + CopyFiles /SILENT $5 "$2\autoexec.bat" + Delete $5 + Goto unRemoveFromEnvVar_done + + unRemoveFromEnvVar_NT: + ReadRegStr $2 ${WriteEnvStr_RegKey} $0 + StrCpy $6 $2 1 -1 # copy last char + StrCmp $6 ";" +2 # if last char != ; + StrCpy $2 "$2;" # append ; + Push $2 + Push "$1;" + Call un.StrStr ; Find `$1;` in $2 + Pop $3 ; pos of our dir + StrCmp $3 "" unRemoveFromEnvVar_done + ; else, it is in path + # $1 - path to add + # $2 - path var + StrLen $4 "$1;" + StrLen $5 $3 + StrCpy $6 $2 -$5 # $6 is now the part before the path to remove + StrCpy $7 $3 "" $4 # $7 is now the part after the path to remove + StrCpy $4 $6$7 + + StrCpy $6 $4 1 -1 # copy last char + StrCmp $6 ";" 0 +2 # if last char == ; + StrCpy $4 $4 -1 # remove last char + + WriteRegExpandStr ${WriteEnvStr_RegKey} $0 $4 + SendMessage ${HWND_BROADCAST} ${WM_WININICHANGE} 0 "STR:Environment" /TIMEOUT=5000 + + unRemoveFromEnvVar_done: + Pop $7 + Pop $6 + Pop $5 + Pop $4 + Pop $3 + Pop $2 + Pop $1 + Pop $0 +FunctionEnd + + + + +!ifndef IsNT_KiCHiK +!define IsNT_KiCHiK + +########################################### +# Utility Functions # +########################################### + +; IsNT +; no input +; output, top of the stack = 1 if NT or 0 if not +; +; Usage: +; Call IsNT +; Pop $R0 +; ($R0 at this point is 1 or 0) + +!macro IsNT un +Function ${un}IsNT + Push $0 + ReadRegStr $0 HKLM "SOFTWARE\Microsoft\Windows NT\CurrentVersion" CurrentVersion + StrCmp $0 "" 0 IsNT_yes + ; we are not NT. + Pop $0 + Push 0 + Return + + IsNT_yes: + ; NT!!! + Pop $0 + Push 1 +FunctionEnd +!macroend +!insertmacro IsNT "" +!insertmacro IsNT "un." + +!endif ; IsNT_KiCHiK + +; StrStr +; input, top of stack = string to search for +; top of stack-1 = string to search in +; output, top of stack (replaces with the portion of the string remaining) +; modifies no other variables. +; +; Usage: +; Push "this is a long ass string" +; Push "ass" +; Call StrStr +; Pop $R0 +; ($R0 at this point is "ass string") + +!macro StrStr un +Function ${un}StrStr +Exch $R1 ; st=haystack,old$R1, $R1=needle + Exch ; st=old$R1,haystack + Exch $R2 ; st=old$R1,old$R2, $R2=haystack + Push $R3 + Push $R4 + Push $R5 + StrLen $R3 $R1 + StrCpy $R4 0 + ; $R1=needle + ; $R2=haystack + ; $R3=len(needle) + ; $R4=cnt + ; $R5=tmp + loop: + StrCpy $R5 $R2 $R3 $R4 + StrCmp $R5 $R1 done + StrCmp $R5 "" done + IntOp $R4 $R4 + 1 + Goto loop +done: + StrCpy $R1 $R2 "" $R4 + Pop $R5 + Pop $R4 + Pop $R3 + Pop $R2 + Exch $R1 +FunctionEnd +!macroend +!insertmacro StrStr "" +!insertmacro StrStr "un." + +!endif ; _AddToPath_nsh Added: trunk/rez/hdrflow.bmp =================================================================== (Binary files differ) Property changes on: trunk/rez/hdrflow.bmp ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/rez/openlibraries.spec =================================================================== --- trunk/rez/openlibraries.spec (rev 0) +++ trunk/rez/openlibraries.spec 2008-02-24 14:42:19 UTC (rev 426) @@ -0,0 +1,101 @@ + +# +# RPM spec file for OpenLibraries +# + +%define _prefix /usr + +Summary: OpenLibraries - a library suite for non-linear editing, visual effects and rich media applications. +Name: openlibraries +Version: 0.4.0 +Release: 4 +License: LGPL +Group: Development/Frameworks +Source: openlibraries-%{version}.tar.gz +Vendor: OpenLibraries +Packager: Goncalo de Carvalho <go...@vm...> +URL: http://www.openlibraries.org +BuildRoot: %{_tmppath}/%name-%{version}-root +Requires: olib-glew >= 1.3.4-4 olib-mlt >= 0.2.2-1 olib-mlt++ >= 0.2.2-1 +BuildRequires: olib-glew-devel >= 1.3.4-4 olib-mlt-devel >= 0.2.2-1 olib-mlt++-devel >= 0.2.2-1 +Prefix: %{_prefix} + +%description +OpenLibraries - a library suite for non-linear editing, visual effects and rich media applications. + +%package devel +Summary: OpenLibraries development headers. +Group: Development/Frameworks +Requires: openlibraries = %{version} +Requires: olib-glew >= 1.3.4-4 olib-mlt >= 0.2.2-1 olib-mlt++ >= 0.2.2-1 +BuildRequires: olib-glew-devel >= 1.3.4-4 olib-mlt-devel >= 0.2.2-1 olib-mlt++-devel >= 0.2.2-1 + +%description devel +OpenLibraries development headers/libs. + +%package media +Summary: OpenLibraries sample media files. +Group: Development/Frameworks +Requires: openlibraries = %{version} + +%description media +OpenLibraries sample media files. + +%prep +rm -rf $RPM_BUILD_ROOT + +%setup -q -n openlibraries-%{version} + +%build +%configure "LDFLAGS=-Wl,--rpath=/usr/olib/0.4.0/lib" --prefix=%{_prefix} --enable-gpl --with-qtinclude=/usr/lib/qt-3.3/include --with-qtlib=/usr/lib/qt-3.3/lib --with-glewprefix=/usr/olib/0.4.0/ +make +#find . -name "*.so" -exec strip {} \; + +%install +OPENLIBRARIES_INCLUDEPATH="$RPM_BUILD_ROOT$OPENLIBRARIES_INCLUDEPATH" OPENLIBRARIES_LIBPATH="$RPM_BUILD_ROOT$OPENLIBRARIES_LIBPATH" DESTDIR=$RPM_BUILD_ROOT make install + +%clean +rm -rf $RPM_BUILD_ROOT + +%post +/sbin/ldconfig + +%postun +/sbin/ldconfig + +%files devel +%defattr(-,root,root) +%{_prefix}/include/openlibraries-%{version}/ +%{_prefix}/lib/openlibraries-%{version}/include/ +%{_prefix}/lib/pkgconfig/openlibraries.pc + +%files media +%defattr(-,root,root) +%{_prefix}/share/openlibraries-%{version}/ + +%files +%defattr(-,root,root) +%{_prefix}/lib/openlibraries-%{version}/openpluginlib +%{_prefix}/lib/openlibraries-%{version}/openimagelib +%{_prefix}/lib/openlibraries-%{version}/openmedialib +%{_prefix}/lib/openlibraries-%{version}/openobjectlib +%{_prefix}/lib/openlibraries-%{version}/openassetlib +%{_prefix}/lib/openlibraries-%{version}/openeffectslib +%{_prefix}/lib/python2.4/site-packages/openpluginlib.so +%{_prefix}/lib/python2.4/site-packages/openimagelib.so +%{_prefix}/lib/python2.4/site-packages/openassetlib.so + +%changelog +* Tue Sep 19 2006 Goncalo de Carvalho <go...@vm...> +- increased the release number for Jahshaka 2.0 +* Mon Aug 16 2006 Goncalo de Carvalho <go...@vm...> +- increased the release number for Jahshaka 2.0 RC4 +- increased version number +* Mon Jul 24 2006 Goncalo de Carvalho <go...@vm...> +- increased the release number for Jahshaka 2.0 RC4 +* Mon Nov 21 2005 Goncalo de Carvalho <go...@vm...> +- fixes to for installation on FC4 +* Sun Nov 20 2005 Goncalo de Carvalho <go...@vm...> +- fixes to allow for custom built Boost and GLEW rpms +* Wed Nov 12 2005 Goncalo de Carvalho <go...@vm...> +- initial packaging Added: trunk/rez/write_env_str.nsh =================================================================== --- trunk/rez/write_env_str.nsh (rev 0) +++ trunk/rez/write_env_str.nsh 2008-02-24 14:42:19 UTC (rev 426) @@ -0,0 +1,149 @@ + +!ifndef _WriteEnvStr_nsh +!define _WriteEnvStr_nsh + +!include WinMessages.nsh + +!ifndef WriteEnvStr_RegKey + !ifdef ALL_USERS + !define WriteEnvStr_RegKey \ + 'HKLM "SYSTEM\CurrentControlSet\Control\Session Manager\Environment"' + !else + !define WriteEnvStr_RegKey 'HKCU "Environment"' + !endif +!endif + +# +# WriteEnvStr - Writes an environment variable +# Note: Win9x systems requires reboot +# +# Example: +# Push "HOMEDIR" # name +# Push "C:\New Home Dir\" # value +# Call WriteEnvStr +# +Function WriteEnvStr + Exch $1 ; $1 has environment variable value + Exch + Exch $0 ; $0 has environment variable name + Push $2 + + Call IsNT + Pop $2 + StrCmp $2 1 WriteEnvStr_NT + ; Not on NT + StrCpy $2 $WINDIR 2 ; Copy drive of windows (c:) + FileOpen $2 "$2\autoexec.bat" a + FileSeek $2 0 END + FileWrite $2 "$\r$\nSET $0=$1$\r$\n" + FileClose $2 + SetRebootFlag true + Goto WriteEnvStr_done + + WriteEnvStr_NT: + WriteRegExpandStr ${WriteEnvStr_RegKey} $0 $1 + SendMessage ${HWND_BROADCAST} ${WM_WININICHANGE} \ + 0 "STR:Environment" /TIMEOUT=5000 + + WriteEnvStr_done: + Pop $2 + Pop $0 + Pop $1 +FunctionEnd + +# +# un.DeleteEnvStr - Removes an environment variable +# Note: Win9x systems requires reboot +# +# Example: +# Push "HOMEDIR" # name +# Call un.DeleteEnvStr +# +Function un.DeleteEnvStr + Exch $0 ; $0 now has the name of the variable + Push $1 + Push $2 + Push $3 + Push $4 + Push $5 + + Call un.IsNT + Pop $1 + StrCmp $1 1 DeleteEnvStr_NT + ; Not on NT + StrCpy $1 $WINDIR 2 + FileOpen $1 "$1\autoexec.bat" r + GetTempFileName $4 + FileOpen $2 $4 w + StrCpy $0 "SET $0=" + SetRebootFlag true + + DeleteEnvStr_dosLoop: + FileRead $1 $3 + StrLen $5 $0 + StrCpy $5 $3 $5 + StrCmp $5 $0 DeleteEnvStr_dosLoop + StrCmp $5 "" DeleteEnvStr_dosLoopEnd + FileWrite $2 $3 + Goto DeleteEnvStr_dosLoop + + DeleteEnvStr_dosLoopEnd: + FileClose $2 + FileClose $1 + StrCpy $1 $WINDIR 2 + Delete "$1\autoexec.bat" + CopyFiles /SILENT $4 "$1\autoexec.bat" + Delete $4 + Goto DeleteEnvStr_done + + DeleteEnvStr_NT: + DeleteRegValue ${WriteEnvStr_RegKey} $0 + SendMessage ${HWND_BROADCAST} ${WM_WININICHANGE} \ + 0 "STR:Environment" /TIMEOUT=5000 + + DeleteEnvStr_done: + Pop $5 + Pop $4 + Pop $3 + Pop $2 + Pop $1 + Pop $0 +FunctionEnd + +!ifndef IsNT_KiCHiK +!define IsNT_KiCHiK + +# +# [un.]IsNT - Pushes 1 if running on NT, 0 if not +# +# Example: +# Call IsNT +# Pop $0 +# StrCmp $0 1 +3 +# MessageBox MB_OK "Not running on NT!" +# Goto +2 +# MessageBox MB_OK "Running on NT!" +# +!macro IsNT UN +Function ${UN}IsNT + Push $0 + ReadRegStr $0 HKLM \ + "SOFTWARE\Microsoft\Windows NT\CurrentVersion" CurrentVersion + StrCmp $0 "" 0 IsNT_yes + ; we are not NT. + Pop $0 + Push 0 + Return + + IsNT_yes: + ; NT!!! + Pop $0 + Push 1 +FunctionEnd +!macroend +!insertmacro IsNT "" +!insertmacro IsNT "un." + +!endif ; IsNT_KiCHiK + +!endif ; _WriteEnvStr_nsh This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |