Project

General

Profile

Actions

Bug #238

closed

Fix up svn_rev.h generation script issues with paths with spaces

Added by buzz almost 11 years ago. Updated almost 11 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Other (un-categorized)
Target version:
Start date:
28/05/2013
Due date:
% Done:

100%

Resolution:
fixed
Affected Version:

Description

Fix up svn_rev.h generation script so it can handle it when xbmc4xbox source is installed to a path that contains a folder. Just needs some quotes etc.

user contributed a modified version. Need to diff / compare (it probably doesn't need to be as verbose with the comments either)

@echo off
rem subwcrev is included in the tortoise svn client: http://tortoisesvn.net/downloads

REM == Assume this batch file is in the root of xbmc svn repo ==
SET CWD=%~dp0

REM == Quotes to handle paths with spaces ==
SET REV_FILE="%CWD%xbmc\xbox\svn_rev.h" 
SET SVN_TEMPLATE="%CWD%xbmc\xbox\svn_rev.tmpl" 

IF EXIST %REV_FILE% del %REV_FILE%

SET SUBWCREV="" 

IF EXIST "%ProgramFiles(x86)%\TortoiseSVN\bin\subwcrev.exe" SET SUBWCREV="%ProgramFiles(x86)%\TortoiseSVN\bin\subwcrev.exe" 
IF EXIST "%ProgramFiles%\TortoiseSVN\bin\subwcrev.exe"      SET SUBWCREV="%ProgramFiles%\TortoiseSVN\bin\subwcrev.exe" 
IF EXIST "%ProgramW6432%\TortoiseSVN\bin\subwcrev.exe" SET SUBWCREV="%ProgramW6432%\TortoiseSVN\bin\subwcrev.exe" 

IF NOT EXIST %SUBWCREV% (
   ECHO subwcrev.exe not found in expected locations, skipping generation
   GOTO SKIPSUBWCREV
)

%SUBWCREV% %SVN_TEMPLATE% %REV_FILE% -f

REM == Generate the SVN revision header if it does not exist ==
IF NOT EXIST %REV_FILE% (
   ECHO Generating SVN revision header from SVN repo
   %SUBWCREV% "%CWD%." %SVN_TEMPLATE% %REV_FILE% -f
)

:SKIPSUBWCREV

REM == Copy the default unknown revision header if the generation did not occur ==
IF NOT EXIST %REV_FILE% (
   ECHO using default svn revision unknown header
   copy %CWD%xbmc\xbox\svn_rev.unknown %REV_FILE%
)

SET REV_FILE=
SET SUBWCREV=
Actions #1

Updated by buzz almost 11 years ago

  • Status changed from New to Closed
  • % Done changed from 0 to 100
  • Resolution set to fixed

fixed in r31787

Actions

Also available in: Atom PDF