OSDN Git Service

WinGui:
authorsr55 <sr55@b64f7644-9d1e-0410-96f1-a4d463321fa5>
Wed, 21 Apr 2010 19:22:58 +0000 (19:22 +0000)
committersr55 <sr55@b64f7644-9d1e-0410-96f1-a4d463321fa5>
Wed, 21 Apr 2010 19:22:58 +0000 (19:22 +0000)
- Tag the Assembly Version with the svn revision so the GUI can be identified correctly. This is for the nightly builds.

git-svn-id: svn://localhost/HandBrake/trunk@3250 b64f7644-9d1e-0410-96f1-a4d463321fa5

win/C#/HandBrakeCS.csproj
win/C#/Installer/MakeNightly.nsi
win/C#/Installer/MakeNightly.nsi.tmpl [new file with mode: 0644]
win/C#/Properties/AssemblyInfo.cs
win/C#/Properties/AssemblyInfo.cs.tmpl [new file with mode: 0644]

index 9990bc9..44b8113 100644 (file)
       <DesignTime>True</DesignTime>\r
     </Compile>\r
     <None Include="app.config" />\r
+    <None Include="Installer\MakeNightly.nsi.tmpl" />\r
     <None Include="Installer\MakeNightly.nsi" />\r
     <None Include="Installer\Installer.nsi" />\r
     <None Include="Properties\Settings.settings">\r
        makensis MakeNightly.nsi\r
        </PostBuildEvent>\r
   </PropertyGroup>\r
+  <PropertyGroup Condition=" '$(Configuration)' == 'NightlyBuild' ">\r
+    <PreBuildEvent>subwcrev.exe "$(ProjectDir)." "$(ProjectDir)Properties\AssemblyInfo.cs.tmpl" "$(ProjectDir)Properties\AssemblyInfo.cs"\r
+subwcrev.exe "$(ProjectDir)." "$(ProjectDir)Installer\MakeNightly.nsi.tmpl" "$(ProjectDir)Installer\MakeNightly.nsi"</PreBuildEvent>\r
+  </PropertyGroup>\r
 </Project>
\ No newline at end of file
index 8e8e38c..f1011a4 100644 (file)
@@ -8,8 +8,8 @@
 \r
 ; HM NIS Edit Wizard helper defines\r
 !define PRODUCT_NAME "Handbrake"\r
-!define PRODUCT_VERSION "Nightly SVN Snapshot"\r
-!define PRODUCT_VERSION_NUMBER "Nightly"\r
+!define PRODUCT_VERSION "3247 Nightly"\r
+!define PRODUCT_VERSION_NUMBER "svn3247"\r
 !define PRODUCT_DIR_REGKEY "Software\Microsoft\Windows\CurrentVersion\App Paths\Handbrake.exe"\r
 !define PRODUCT_UNINST_KEY "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PRODUCT_NAME}"\r
 !define PRODUCT_UNINST_ROOT_KEY "HKLM"\r
diff --git a/win/C#/Installer/MakeNightly.nsi.tmpl b/win/C#/Installer/MakeNightly.nsi.tmpl
new file mode 100644 (file)
index 0000000..26f177d
--- /dev/null
@@ -0,0 +1,149 @@
+/*  Resources.Designer.cs $\r
+\r
+          This file is part of the HandBrake source code.\r
+          Homepage: <http://handbrake.fr/>.\r
+          It may be used under the terms of the GNU General Public License. */\r
+\r
+; Script generated by the HM NIS Edit Script Wizard.\r
+\r
+; HM NIS Edit Wizard helper defines\r
+!define PRODUCT_NAME "Handbrake"\r
+!define PRODUCT_VERSION "$WCREV$ Nightly"\r
+!define PRODUCT_VERSION_NUMBER "svn$WCREV$"\r
+!define PRODUCT_DIR_REGKEY "Software\Microsoft\Windows\CurrentVersion\App Paths\Handbrake.exe"\r
+!define PRODUCT_UNINST_KEY "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PRODUCT_NAME}"\r
+!define PRODUCT_UNINST_ROOT_KEY "HKLM"\r
+\r
+SetCompressor lzma\r
+\r
+; MUI 1.67 compatible ------\r
+!include "MUI.nsh"\r
+\r
+; MUI Settings\r
+!define MUI_ABORTWARNING\r
+!define MUI_ICON "handbrakepineapple.ico"\r
+!define MUI_UNICON "handbrakepineapple.ico"\r
+\r
+; Welcome page\r
+!insertmacro MUI_PAGE_WELCOME\r
+; License page\r
+!insertmacro MUI_PAGE_LICENSE "doc\COPYING"\r
+; Directory page\r
+!insertmacro MUI_PAGE_DIRECTORY\r
+; Instfiles page\r
+!insertmacro MUI_PAGE_INSTFILES\r
+; Finish page\r
+!define MUI_FINISHPAGE_RUN "$INSTDIR\Handbrake.exe"\r
+!insertmacro MUI_PAGE_FINISH\r
+\r
+; Uninstaller pages\r
+!insertmacro MUI_UNPAGE_INSTFILES\r
+\r
+; Language files\r
+!insertmacro MUI_LANGUAGE "English"\r
+\r
+; MUI end ------\r
+\r
+Name "${PRODUCT_NAME} ${PRODUCT_VERSION}"\r
+OutFile "HandBrake-${PRODUCT_VERSION_NUMBER}-Win_GUI.exe"\r
+\r
+!include WordFunc.nsh\r
+!insertmacro VersionCompare\r
+!include LogicLib.nsh\r
+\r
+; Check to see if .NET Framework 2.0 or above is Installed.\r
+Function .onInit\r
+  Call GetDotNETVersion\r
+  Pop $0\r
+  ${If} $0 == "not found"\r
+    MessageBox MB_OK|MB_ICONSTOP ".NET runtime library is not installed. $\r$\n You can download .Net Framework 2.0 redistributable from the microsoft website. $\r$\n Alternatively you can use google for a direct download URL"\r
+    Abort\r
+  ${EndIf}\r
+\r
+  StrCpy $0 $0 "" 1 # skip "v"\r
+\r
+  ${VersionCompare} $0 "2.0" $1\r
+  ${If} $1 == 2\r
+    MessageBox MB_OK|MB_ICONSTOP ".NET runtime library v2.0 or newer is required. You have $0. $\r$\n You can download .Net Framework 2.0 redistributable from the Microsoft website. $\r$\n Alternatively you can use google for a direct download URL"\r
+    Abort\r
+  ${EndIf}\r
+FunctionEnd\r
+\r
+Function GetDotNETVersion\r
+  Push $0\r
+  Push $1\r
+\r
+  System::Call "mscoree::GetCORVersion(w .r0, i ${NSIS_MAX_STRLEN}, *i) i .r1 ?u"\r
+  StrCmp $1 "error" 0 +2\r
+    StrCpy $0 "not found"\r
+\r
+  Pop $1\r
+  Exch $0\r
+FunctionEnd\r
+\r
+\r
+InstallDir "$PROGRAMFILES\Handbrake"\r
+InstallDirRegKey HKLM "${PRODUCT_DIR_REGKEY}" ""\r
+ShowInstDetails show\r
+ShowUnInstDetails show\r
+\r
+Section "Handbrake" SEC01\r
+  SetOutPath "$INSTDIR"\r
+  SetOverwrite ifnewer\r
+  File "Handbrake.exe"\r
+  CreateDirectory "$SMPROGRAMS\Handbrake"\r
+  CreateShortCut "$SMPROGRAMS\Handbrake\Handbrake.lnk" "$INSTDIR\Handbrake.exe"\r
+  CreateShortCut "$DESKTOP\Handbrake.lnk" "$INSTDIR\Handbrake.exe"\r
+  File "Interop.QTOLibrary.dll"\r
+  File "Interop.QTOControlLib.dll"\r
+  File "AxInterop.QTOControlLib.dll"\r
+  File "Growl.Connector.dll"\r
+  File "Growl.CoreLibrary.dll"\r
+  File "Handbrake.exe.config"\r
+SectionEnd\r
+\r
+Section -AdditionalIcons\r
+  CreateShortCut "$SMPROGRAMS\Handbrake\Uninstall.lnk" "$INSTDIR\uninst.exe"\r
+SectionEnd\r
+\r
+Section -Post\r
+  WriteUninstaller "$INSTDIR\uninst.exe"\r
+  WriteRegStr HKLM "${PRODUCT_DIR_REGKEY}" "" "$INSTDIR\Handbrake.exe"\r
+  WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "DisplayName" "$(^Name)"\r
+  WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "UninstallString" "$INSTDIR\uninst.exe"\r
+  WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "DisplayIcon" "$INSTDIR\Handbrake.exe"\r
+  WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "DisplayVersion" "${PRODUCT_VERSION}"\r
+SectionEnd\r
+\r
+\r
+Function un.onUninstSuccess\r
+  HideWindow\r
+  MessageBox MB_ICONINFORMATION|MB_OK "$(^Name) was successfully removed from your computer."\r
+FunctionEnd\r
+\r
+Function un.onInit\r
+  MessageBox MB_ICONQUESTION|MB_YESNO|MB_DEFBUTTON2 "Are you sure you want to completely remove $(^Name) and all of its components?" IDYES +2\r
+  Abort\r
+FunctionEnd\r
+\r
+Section Uninstall\r
+  Delete "$INSTDIR\uninst.exe"\r
+  \r
+  Delete "$INSTDIR\Interop.QTOLibrary.dll"\r
+  Delete "$INSTDIR\Interop.QTOControlLib.dll"\r
+  Delete "$INSTDIR\AxInterop.QTOControlLib.dll"\r
+  Delete "$INSTDIR\Handbrake.exe"\r
+  Delete "$INSTDIR\Handbrake.exe.config"\r
+  Delete "$INSTDIR\Growl.Connector.dll"\r
+  Delete "$INSTDIR\Growl.CoreLibrary.dll"\r
+  RMDir  "$INSTDIR"\r
+  Delete "$SMPROGRAMS\Handbrake\Uninstall.lnk"\r
+  Delete "$DESKTOP\Handbrake.lnk"\r
+  Delete "$SMPROGRAMS\Handbrake\Handbrake.lnk"\r
+  RMDir  "$SMPROGRAMS\Handbrake"\r
+  RMDir  "$INSTDIR"\r
+\r
+  DeleteRegKey ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}"\r
+  DeleteRegKey HKLM "${PRODUCT_DIR_REGKEY}"\r
+  SetAutoClose true\r
+SectionEnd
\ No newline at end of file
index 0068ddd..85dbe5e 100644 (file)
@@ -38,6 +38,5 @@ using System.Runtime.InteropServices;
 //      Revision\r
 //\r
 \r
-[assembly: AssemblyVersion("0.9.4.4")]\r
-[assembly: AssemblyFileVersion("0.9.4.4")]\r
+[assembly: AssemblyVersion("0.9.4.3247")]\r
 [assembly: NeutralResourcesLanguage("")]
\ No newline at end of file
diff --git a/win/C#/Properties/AssemblyInfo.cs.tmpl b/win/C#/Properties/AssemblyInfo.cs.tmpl
new file mode 100644 (file)
index 0000000..eab0c05
--- /dev/null
@@ -0,0 +1,42 @@
+/*  AssemblyInfo.cs $\r
+    This file is part of the HandBrake source code.\r
+    Homepage: <http://handbrake.fr>.\r
+    It may be used under the terms of the GNU General Public License. */\r
+\r
+using System.Reflection;\r
+using System.Resources;\r
+using System.Runtime.InteropServices;\r
+\r
+// General Information about an assembly is controlled through the following \r
+// set of attributes. Change these attribute values to modify the information\r
+// associated with an assembly.\r
+\r
+[assembly: AssemblyTitle("HandBrake")]\r
+[assembly: AssemblyDescription("HandBrake is a GPL-licensed, multiplatform, multithreaded video transcoder.")]\r
+[assembly: AssemblyConfiguration("")]\r
+[assembly: AssemblyCompany("HandBrake")]\r
+[assembly: AssemblyProduct("HandBrake")]\r
+[assembly: AssemblyCopyright("Copyright ©  2010")]\r
+[assembly: AssemblyTrademark("")]\r
+[assembly: AssemblyCulture("")]\r
+\r
+// Setting ComVisible to false makes the types in this assembly not visible \r
+// to COM components.  If you need to access a type in this assembly from \r
+// COM, set the ComVisible attribute to true on that type.\r
+\r
+[assembly: ComVisible(false)]\r
+\r
+// The following GUID is for the ID of the typelib if this project is exposed to COM\r
+\r
+[assembly: Guid("5e4e3f97-5252-41f6-aae9-3846f62cbc66")]\r
+\r
+// Version information for an assembly consists of the following four values:\r
+//\r
+//      Major Version\r
+//      Minor Version \r
+//      Build Number\r
+//      Revision\r
+//\r
+\r
+[assembly: AssemblyVersion("0.9.4.$WCREV$")]\r
+[assembly: NeutralResourcesLanguage("")]
\ No newline at end of file