| Index: Installer/dxgl.nsi |
| — | — | @@ -14,6 +14,13 @@ |
| 15 | 15 | !define PRODUCT_UNINST_ROOT_KEY "HKLM"
|
| 16 | 16 | !include "..\common\version.nsh"
|
| 17 | 17 |
|
| | 18 | +!ifdef _DEBUG
|
| | 19 | +!define SRCDIR "Debug"
|
| | 20 | +!else
|
| | 21 | +!define SRCDIR "Release"
|
| | 22 | +!endif
|
| | 23 | +
|
| | 24 | +
|
| 18 | 25 | ; MUI2
|
| 19 | 26 | !include "MUI2.nsh"
|
| 20 | 27 |
|
| — | — | @@ -58,7 +65,11 @@ |
| 59 | 66 | !define GetVersion "Kernel32::GetVersion() i"
|
| 60 | 67 | Var SUBKEY
|
| 61 | 68 |
|
| | 69 | +!ifdef _DEBUG
|
| | 70 | +Name "${PRODUCT_NAME} ${PRODUCT_VERSION} DEBUG BUILD"
|
| | 71 | +!else
|
| 62 | 72 | Name "${PRODUCT_NAME} ${PRODUCT_VERSION}"
|
| | 73 | +!endif
|
| 63 | 74 | OutFile "DXGL-${PRODUCT_VERSION}-win32.exe"
|
| 64 | 75 | InstallDir "$PROGRAMFILES\DXGL"
|
| 65 | 76 | InstallDirRegKey HKLM "${PRODUCT_DIR_REGKEY}" ""
|
| — | — | @@ -65,7 +76,7 @@ |
| 66 | 77 | ShowInstDetails show
|
| 67 | 78 | ShowUnInstDetails show
|
| 68 | 79 |
|
| 69 | | -VIProductVersion "${PRODUCT_VERSION}.0"
|
| | 80 | +VIProductVersion "${PRODUCT_VERSION}.${PRODUCT_REVISION}"
|
| 70 | 81 | VIAddVersionKey /LANG=${LANG_ENGLISH} "FileDescription" "DXGL ${PRODUCT_VERSION} Installer"
|
| 71 | 82 | VIAddVersionKey /LANG=${LANG_ENGLISH} "FileVersion" "${PRODUCT_VERSION}"
|
| 72 | 83 | VIAddVersionKey /LANG=${LANG_ENGLISH} "InternalName" "DXGL"
|
| — | — | @@ -78,12 +89,12 @@ |
| 79 | 90 | SectionIn RO
|
| 80 | 91 | SetOutPath "$INSTDIR"
|
| 81 | 92 | SetOverwrite ifnewer
|
| 82 | | - File "..\Release\dxgltest.exe"
|
| | 93 | + File "..\${SRCDIR}\dxgltest.exe"
|
| 83 | 94 | CreateDirectory "$SMPROGRAMS\DXGL"
|
| 84 | 95 | CreateShortCut "$SMPROGRAMS\DXGL\DXGL Test.lnk" "$INSTDIR\dxgltest.exe"
|
| 85 | | - File "..\Release\dxglcfg.exe"
|
| | 96 | + File "..\${SRCDIR}\dxglcfg.exe"
|
| 86 | 97 | CreateShortCut "$SMPROGRAMS\DXGL\Configure DXGL.lnk" "$INSTDIR\dxglcfg.exe"
|
| 87 | | - File "..\Release\ddraw.dll"
|
| | 98 | + File "..\${SRCDIR}\ddraw.dll"
|
| 88 | 99 | File "..\ReadMe.txt"
|
| 89 | 100 | File "..\COPYING.txt"
|
| 90 | 101 | File "..\Help\dxgl.chm"
|
| — | — | @@ -153,11 +164,11 @@ |
| 154 | 165 | goto regloop
|
| 155 | 166 | regdone:
|
| 156 | 167 | SetPluginUnload manual
|
| 157 | | - ReadRegDWORD $0 HKLM SOFTWARE\Microsoft\VisualStudio\10.0\VC\VCRedist\x86 Installed
|
| 158 | 168 | WriteRegStr HKLM "Software\DXGL" "InstallDir" "$INSTDIR"
|
| 159 | | - ExecWait '"$INSTDIR\dxgltest.exe" install'
|
| | 169 | + ExecWait '"$INSTDIR\dxgltest.exe" instaill'
|
| 160 | 170 | SectionEnd
|
| 161 | 171 |
|
| | 172 | +!ifndef _DEBUG
|
| 162 | 173 | Section "Download Visual C++ 2010 Redistributable" SEC_VCREDIST
|
| 163 | 174 | DetailPrint "Downloading Visual C++ 2010 Runtime"
|
| 164 | 175 | NSISdl::download http://www.williamfeely.info/download/vc10/vcredist_x86.exe $TEMP\vcredist_x86.exe
|
| — | — | @@ -165,6 +176,7 @@ |
| 166 | 177 | ExecWait '"$TEMP\vcredist_x86.exe" /q /norestart'
|
| 167 | 178 | Delete $TEMP\vcredist_x86.exe
|
| 168 | 179 | SectionEnd
|
| | 180 | +!endif
|
| 169 | 181 |
|
| 170 | 182 | Section "Fix DDraw COM registration" SEC_COMFIX
|
| 171 | 183 | DetailPrint "Setting DDraw Runtime path in registry"
|
| — | — | @@ -199,6 +211,10 @@ |
| 200 | 212 |
|
| 201 | 213 |
|
| 202 | 214 | Function .onInit
|
| | 215 | + !ifdef _DEBUG
|
| | 216 | + MessageBox MB_OK|MB_ICONEXCLAMATION "This is a debug build of DXGL. It is not meant for regular \
|
| | 217 | + usage and requires the debug version of the Visual C++ runtime to work."
|
| | 218 | + !else
|
| 203 | 219 | ReadRegDWORD $0 HKLM SOFTWARE\Microsoft\VisualStudio\10.0\VC\VCRedist\x86 Installed
|
| 204 | 220 | StrCmp $0 1 skipvcredist
|
| 205 | 221 | goto vcinstall
|
| — | — | @@ -206,6 +222,7 @@ |
| 207 | 223 | SectionSetFlags ${SEC_VCREDIST} 0
|
| 208 | 224 | SectionSetText ${SEC_VCREDIST} ""
|
| 209 | 225 | vcinstall:
|
| | 226 | + !endif
|
| 210 | 227 |
|
| 211 | 228 | System::Call "${GetVersion} () .r0"
|
| 212 | 229 | IntOp $1 $0 & 255
|
| Index: buildtool/buildtool.cpp |
| — | — | @@ -160,7 +160,7 @@ |
| 161 | 161 | {
|
| 162 | 162 | if(revision)
|
| 163 | 163 | {
|
| 164 | | - strcpy(verbuffer,"\"r");
|
| | 164 | + strcpy(verbuffer,"\"");
|
| 165 | 165 | _itoa(revision,numstring,10);
|
| 166 | 166 | strcat(verbuffer,numstring);
|
| 167 | 167 | strcat(verbuffer,"\"\n");
|
| — | — | @@ -169,7 +169,7 @@ |
| 170 | 170 | else strncpy(findptr,"\"\"\n",17);
|
| 171 | 171 | }
|
| 172 | 172 | #ifdef _DEBUG
|
| 173 | | - if(strstr(buffer,";!define DEBUG")) strcpy(buffer,"!define DEBUG");
|
| | 173 | + if(strstr(buffer,";!define _DEBUG")) strcpy(buffer,"!define _DEBUG");
|
| 174 | 174 | #endif
|
| 175 | 175 | fputs(buffer,fileout);
|
| 176 | 176 | }
|
| Index: common/version.nsh.in |
| — | — | @@ -1,3 +1,3 @@ |
| 2 | 2 | !define PRODUCT_VERSION $PRODUCTVERSTRING
|
| 3 | 3 | !define PRODUCT_REVISION $PRODUCTREVISION
|
| 4 | | -;!define DEBUG |
| \ No newline at end of file |
| | 4 | +;!define _DEBUG |
| \ No newline at end of file |