[Scummvm-cvs-logs] scummvm master -> 00e3f920d01be56b5882f721a3eaf40ea6210f44
Littleboy
littleboy22 at gmail.com
Fri Jul 1 07:20:32 CEST 2011
This automated email contains information about 7 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
a5398bd663 LASTEXPRESS: Fix loading of subtitles from sound name
02b03bc6c1 CONFIGURE: Rename $WIN32BUILD to $STAGING
ac165d6f19 DISTS: Add missing IDI_COUNT to scummvm.rc.in
db1ec4a42d TOOLS: Update NSIS script location
1f1367bb5a NSIS: Convert line endings on the fly during installation
f38a31e208 NSIS: Always pass ARCH variable to script and handle case when the variable is empty
00e3f920d0 CREATE_PROJECT: Update with new location of NSIS script and updated parameters
Commit: a5398bd663064d3ebca61c3e49eeb7773eadd612
https://github.com/scummvm/scummvm/commit/a5398bd663064d3ebca61c3e49eeb7773eadd612
Author: Littleboy (littleboy at users.sourceforge.net)
Date: 2011-06-30T22:17:08-07:00
Commit Message:
LASTEXPRESS: Fix loading of subtitles from sound name
Changed paths:
engines/lastexpress/sound/entry.cpp
engines/lastexpress/sound/sound.cpp
diff --git a/engines/lastexpress/sound/entry.cpp b/engines/lastexpress/sound/entry.cpp
index 4bdb9f7..2840d85 100644
--- a/engines/lastexpress/sound/entry.cpp
+++ b/engines/lastexpress/sound/entry.cpp
@@ -752,7 +752,7 @@ void SubtitleEntry::load(Common::String filename, SoundEntry *soundEntry) {
_sound = soundEntry;
// Load subtitle data
- if (_engine->getResourceManager()->hasFile(filename)) {
+ if (_engine->getResourceManager()->hasFile(_filename)) {
if (getSoundQueue()->getSubtitleFlag() & 2)
return;
@@ -786,6 +786,8 @@ void SubtitleEntry::setupAndDraw() {
}
getSoundQueue()->setCurrentSubtitle(this);
+
+ // TODO Missing code
}
void SubtitleEntry::draw() {
@@ -801,13 +803,11 @@ void SubtitleEntry::draw() {
}
void SubtitleEntry::drawOnScreen() {
- getSoundQueue()->setSubtitleFlag(getSoundQueue()->getSubtitleFlag() & -1);
-
if (_data == NULL)
return;
- if (getSoundQueue()->getSubtitleFlag() & 1)
- _engine->getGraphicsManager()->draw(_data, GraphicsManager::kBackgroundOverlay);
+ getSoundQueue()->setSubtitleFlag(getSoundQueue()->getSubtitleFlag() & -2);
+ _engine->getGraphicsManager()->draw(_data, GraphicsManager::kBackgroundOverlay);
}
} // End of namespace LastExpress
diff --git a/engines/lastexpress/sound/sound.cpp b/engines/lastexpress/sound/sound.cpp
index ff9e7e5..c04b6d3 100644
--- a/engines/lastexpress/sound/sound.cpp
+++ b/engines/lastexpress/sound/sound.cpp
@@ -162,7 +162,8 @@ bool SoundManager::playSoundWithSubtitles(Common::String filename, SoundFlag fla
entry->setStatus(entry->getStatus().status | kSoundStatus_8000);
} else {
// Get subtitles name
- while (filename.size() > 4)
+ uint32 size = filename.size();
+ while (filename.size() > size - 4)
filename.deleteLastChar();
entry->showSubtitle(filename);
Commit: 02b03bc6c10be7b1591468106007f4624f8525bd
https://github.com/scummvm/scummvm/commit/02b03bc6c10be7b1591468106007f4624f8525bd
Author: Littleboy (littleboy at users.sourceforge.net)
Date: 2011-06-30T22:17:10-07:00
Commit Message:
CONFIGURE: Rename $WIN32BUILD to $STAGING
Changed paths:
.gitignore
configure
ports.mk
diff --git a/.gitignore b/.gitignore
index 4ad9f07..9990206 100644
--- a/.gitignore
+++ b/.gitignore
@@ -28,6 +28,7 @@ lib*.a
/Icon.*
/build
+/staging
/backends/platform/dc/gui
/backends/platform/dc/graphics
diff --git a/configure b/configure
index 932ab9a..78998f8 100755
--- a/configure
+++ b/configure
@@ -174,7 +174,7 @@ _strip=strip
_ar="ar cru"
_as="as"
_windres=windres
-_win32build="build/x86"
+_stagingpath="staging"
_win32path="c:/scummvm"
_aos4path="Games:ScummVM"
_staticlibpath=/sw
@@ -3519,7 +3519,7 @@ AS := $_as
ASFLAGS := $ASFLAGS
WINDRES := $_windres
WINDRESFLAGS := $WINDRESFLAGS
-WIN32BUILD=$_win32build
+STAGINGPATH=$_stagingpath
WIN32PATH=$_win32path
AOS4PATH=$_aos4path
STATICLIBPATH=$_staticlibpath
diff --git a/ports.mk b/ports.mk
index 495037a..80d2cd7 100644
--- a/ports.mk
+++ b/ports.mk
@@ -186,22 +186,18 @@ endif
# Special target to create a win32 NSIS installer
win32setup: $(EXECUTABLE)
- mkdir -p $(srcdir)/$(WIN32BUILD)
- cp $(srcdir)/AUTHORS $(srcdir)/$(WIN32BUILD)
- cp $(srcdir)/COPYING $(srcdir)/$(WIN32BUILD)
- cp $(srcdir)/COPYING.LGPL $(srcdir)/$(WIN32BUILD)
- cp $(srcdir)/COPYRIGHT $(srcdir)/$(WIN32BUILD)
- cp $(srcdir)/NEWS $(srcdir)/$(WIN32BUILD)
- cp $(srcdir)/README $(srcdir)/$(WIN32BUILD)
- cp /usr/local/README-SDL.txt $(srcdir)/$(WIN32BUILD)/README-SDL
- unix2dos $(srcdir)/$(WIN32BUILD)/*.*
- $(STRIP) $(EXECUTABLE) -o $(srcdir)/$(WIN32BUILD)/$(EXECUTABLE)
- cp $(DIST_FILES_THEMES) $(srcdir)/$(WIN32BUILD)
-ifdef DIST_FILES_ENGINEDATA
- cp $(DIST_FILES_ENGINEDATA) $(srcdir)/$(WIN32BUILD)
-endif
- cp /usr/local/bin/SDL.dll $(srcdir)/$(WIN32BUILD)
- makensis -V2 -Dtop_srcdir="../.." -Dtext_dir="../../$(WIN32BUILD)" -Dbuild_dir="../../$(WIN32BUILD)" $(srcdir)/dists/win32/scummvm.nsi
+ mkdir -p $(srcdir)/$(STAGINGPATH)
+ cp $(srcdir)/AUTHORS $(srcdir)/$(STAGINGPATH)
+ cp $(srcdir)/COPYING $(srcdir)/$(STAGINGPATH)
+ cp $(srcdir)/COPYING.LGPL $(srcdir)/$(STAGINGPATH)
+ cp $(srcdir)/COPYRIGHT $(srcdir)/$(STAGINGPATH)
+ cp $(srcdir)/NEWS $(srcdir)/$(STAGINGPATH)
+ cp $(srcdir)/README $(srcdir)/$(STAGINGPATH)
+ cp /usr/local/README-SDL.txt $(srcdir)/$(STAGINGPATH)/README-SDL
+ unix2dos $(srcdir)/$(STAGINGPATH)/*.*
+ $(STRIP) $(EXECUTABLE) -o $(srcdir)/$(STAGINGPATH)/$(EXECUTABLE)
+ cp /usr/local/bin/SDL.dll $(srcdir)/$(STAGINGPATH)
+ makensis -V2 -Dtop_srcdir="../.." -Dtext_dir="../../$(STAGINGPATH)" -Dbuild_dir="../../$(STAGINGPATH)" $(srcdir)/dists/win32/scummvm.nsi
#
# AmigaOS specific
Commit: ac165d6f19c1d701a545e5879f252957d2c48130
https://github.com/scummvm/scummvm/commit/ac165d6f19c1d701a545e5879f252957d2c48130
Author: Littleboy (littleboy at users.sourceforge.net)
Date: 2011-06-30T22:17:12-07:00
Commit Message:
DISTS: Add missing IDI_COUNT to scummvm.rc.in
Changed paths:
dists/scummvm.rc.in
diff --git a/dists/scummvm.rc.in b/dists/scummvm.rc.in
index 8186e0e..2fd3946 100644
--- a/dists/scummvm.rc.in
+++ b/dists/scummvm.rc.in
@@ -5,9 +5,11 @@
#endif
#define FILE 256
-#define IDI_ICON 1001
+#define IDI_ICON 1001
+#define IDI_COUNT 1002
IDI_ICON ICON DISCARDABLE "icons/scummvm.ico"
+IDI_COUNT ICON DISCARDABLE "icons/count.ico"
scummmodern.zip FILE "gui/themes/scummmodern.zip"
#ifdef USE_TRANSLATION
Commit: db1ec4a42daf2d267b703598f7080d6c60712bd7
https://github.com/scummvm/scummvm/commit/db1ec4a42daf2d267b703598f7080d6c60712bd7
Author: Littleboy (littleboy at users.sourceforge.net)
Date: 2011-06-30T22:17:14-07:00
Commit Message:
TOOLS: Update NSIS script location
Changed paths:
devtools/update-version.pl
diff --git a/devtools/update-version.pl b/devtools/update-version.pl
index 788cbc7..169fba7 100755
--- a/devtools/update-version.pl
+++ b/devtools/update-version.pl
@@ -39,7 +39,7 @@ my @subs_files = qw(
dists/macosx/Info.plist
dists/iphone/Info.plist
dists/irix/scummvm.spec
- dists/nsis/scummvm.nsi
+ dists/win32/scummvm.nsi
dists/wii/meta.xml
dists/android/AndroidManifest.xml
dists/android/plugin-manifest.xml
Commit: 1f1367bb5adb4239779064245eb8acb2d3c2ca95
https://github.com/scummvm/scummvm/commit/1f1367bb5adb4239779064245eb8acb2d3c2ca95
Author: Littleboy (littleboy at users.sourceforge.net)
Date: 2011-06-30T22:17:16-07:00
Commit Message:
NSIS: Convert line endings on the fly during installation
Changed paths:
dists/win32/scummvm.nsi
ports.mk
diff --git a/dists/win32/scummvm.nsi b/dists/win32/scummvm.nsi
index 50ccada..c5b6100 100644
--- a/dists/win32/scummvm.nsi
+++ b/dists/win32/scummvm.nsi
@@ -18,7 +18,7 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-#!define _DEBUG
+!define _DEBUG
#!define _INCLUDE_DATA_FILES
Name ScummVM
@@ -31,8 +31,7 @@ Name ScummVM
#########################################################################################
#!define top_srcdir ""
-#!define build_dir ""
-#!define text_dir ""
+#!define staging_dir ""
#!define ARCH "" ;(optional, defaults to win32)
# Check parameters
@@ -40,12 +39,8 @@ Name ScummVM
!error "Top source folder has not been passed to command line!"
!endif
-!ifndef build_dir
- !error "Build folder has not been passed to command line (this folder should contain the executable and linked DLLs)!"
-!endif
-
-!ifndef text_dir
- !error "Text folder has not been passed to command line (this folder should contain all the text files used by the installer)!"
+!ifndef staging_dir
+ !error "Staging folder has not been passed to command line (this folder should contain the executable and linked DLLs)!"
!endif
!ifndef ARCH
@@ -72,7 +67,7 @@ Name ScummVM
#########################################################################################
# Installer configuration
#########################################################################################
-OutFile ${build_dir}\scummvm-${VERSION}-${ARCH}.exe
+OutFile ${staging_dir}\scummvm-${VERSION}-${ARCH}.exe
InstallDir $PROGRAMFILES\ScummVM ; Default installation folder
InstallDirRegKey HKCU "Software\ScummVM\ScummVM" "InstallPath" ; Get installation folder from registry if available
; The application name needs to be refered directly instead of through ${REGKEY}
@@ -224,13 +219,26 @@ Section "ScummVM" SecMain
SetOverwrite on
# Text files
- File /oname=AUTHORS.txt "${text_dir}\AUTHORS"
- File /oname=COPYING.LGPL.txt "${text_dir}\COPYING.LGPL"
- File /oname=COPYING.txt "${text_dir}\COPYING"
- File /oname=COPYRIGHT.txt "${text_dir}\COPYRIGHT"
- File /oname=NEWS.txt "${text_dir}\NEWS"
- File /oname=README.txt "${text_dir}\README"
- File /oname=README-SDL.txt "${build_dir}\README-SDL"
+ File /oname=AUTHORS.txt "${top_srcdir}\AUTHORS"
+ File /oname=COPYING.LGPL.txt "${top_srcdir}\COPYING.LGPL"
+ File /oname=COPYING.txt "${top_srcdir}\COPYING"
+ File /oname=COPYRIGHT.txt "${top_srcdir}\COPYRIGHT"
+ File /oname=NEWS.txt "${top_srcdir}\NEWS"
+ File /oname=README.txt "${top_srcdir}\README"
+
+ # Convert line endings
+ Push "$INSTDIR\AUTHORS.txt"
+ Call unix2dos
+ Push "$INSTDIR\COPYING.LGPL.txt"
+ Call unix2dos
+ Push "$INSTDIR\COPYING.txt"
+ Call unix2dos
+ Push "$INSTDIR\COPYRIGHT.txt"
+ Call unix2dos
+ Push "$INSTDIR\NEWS.txt"
+ Call unix2dos
+ Push "$INSTDIR\README.txt"
+ Call unix2dos
!ifdef _INCLUDE_DATA_FILES
# Engine data
@@ -253,8 +261,8 @@ Section "ScummVM" SecMain
!endif
# Main exe and dlls
- File "${build_dir}\scummvm.exe"
- File "${build_dir}\SDL.dll"
+ File "${staging_dir}\scummvm.exe"
+ File "${staging_dir}\SDL.dll"
WriteRegStr HKCU "${REGKEY}" InstallPath "$INSTDIR" ; Store installation folder
SectionEnd
@@ -354,3 +362,61 @@ Function un.onInit
ReadRegStr $INSTDIR HKCU "${REGKEY}" InstallPath
!insertmacro MUI_STARTMENU_GETFOLDER Application $StartMenuGroup
FunctionEnd
+
+
+#########################################################################################
+# Helper functions
+#########################################################################################
+
+;-------------------------------------------------------------------------------
+; strips all CRs and then converts all LFs into CRLFs
+; (this is roughly equivalent to "cat file | dos2unix | unix2dos")
+;
+; Usage:
+; Push "infile"
+; Call unix2dos
+;
+; Note: this function destroys $0 $1 $2
+Function unix2dos
+ ClearErrors
+
+ Pop $2
+ Rename $2 $2.U2D
+ FileOpen $1 $2 w
+
+ FileOpen $0 $2.U2D r
+
+ Push $2 ; save name for deleting
+
+ IfErrors unix2dos_done
+
+ ; $0 = file input (opened for reading)
+ ; $1 = file output (opened for writing)
+
+unix2dos_loop:
+ ; read a byte (stored in $2)
+ FileReadByte $0 $2
+ IfErrors unix2dos_done ; EOL
+ ; skip CR
+ StrCmp $2 13 unix2dos_loop
+ ; if LF write an extra CR
+ StrCmp $2 10 unix2dos_cr unix2dos_write
+
+unix2dos_cr:
+ FileWriteByte $1 13
+
+unix2dos_write:
+ ; write byte
+ FileWriteByte $1 $2
+ ; read next byte
+ Goto unix2dos_loop
+
+unix2dos_done:
+ ; close files
+ FileClose $0
+ FileClose $1
+
+ ; delete original
+ Pop $0
+ Delete $0.U2D
+FunctionEnd
diff --git a/ports.mk b/ports.mk
index 80d2cd7..8e7ac23 100644
--- a/ports.mk
+++ b/ports.mk
@@ -187,17 +187,9 @@ endif
# Special target to create a win32 NSIS installer
win32setup: $(EXECUTABLE)
mkdir -p $(srcdir)/$(STAGINGPATH)
- cp $(srcdir)/AUTHORS $(srcdir)/$(STAGINGPATH)
- cp $(srcdir)/COPYING $(srcdir)/$(STAGINGPATH)
- cp $(srcdir)/COPYING.LGPL $(srcdir)/$(STAGINGPATH)
- cp $(srcdir)/COPYRIGHT $(srcdir)/$(STAGINGPATH)
- cp $(srcdir)/NEWS $(srcdir)/$(STAGINGPATH)
- cp $(srcdir)/README $(srcdir)/$(STAGINGPATH)
- cp /usr/local/README-SDL.txt $(srcdir)/$(STAGINGPATH)/README-SDL
- unix2dos $(srcdir)/$(STAGINGPATH)/*.*
$(STRIP) $(EXECUTABLE) -o $(srcdir)/$(STAGINGPATH)/$(EXECUTABLE)
cp /usr/local/bin/SDL.dll $(srcdir)/$(STAGINGPATH)
- makensis -V2 -Dtop_srcdir="../.." -Dtext_dir="../../$(STAGINGPATH)" -Dbuild_dir="../../$(STAGINGPATH)" $(srcdir)/dists/win32/scummvm.nsi
+ makensis -V2 -Dtop_srcdir="../.." -Dstaging_dir="../../$(STAGINGPATH)" $(srcdir)/dists/win32/scummvm.nsi
#
# AmigaOS specific
Commit: f38a31e208cc50bfbe1e49122f66b7534a05e836
https://github.com/scummvm/scummvm/commit/f38a31e208cc50bfbe1e49122f66b7534a05e836
Author: Littleboy (littleboy at users.sourceforge.net)
Date: 2011-06-30T22:17:18-07:00
Commit Message:
NSIS: Always pass ARCH variable to script and handle case when the variable is empty
Changed paths:
dists/win32/scummvm.nsi
dists/win32/scummvm.nsi.in
ports.mk
diff --git a/dists/win32/scummvm.nsi b/dists/win32/scummvm.nsi
index c5b6100..480f8f4 100644
--- a/dists/win32/scummvm.nsi
+++ b/dists/win32/scummvm.nsi
@@ -18,7 +18,7 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-!define _DEBUG
+#!define _DEBUG
#!define _INCLUDE_DATA_FILES
Name ScummVM
@@ -31,7 +31,7 @@ Name ScummVM
#########################################################################################
#!define top_srcdir ""
-#!define staging_dir ""
+#!define staging_dir ""
#!define ARCH "" ;(optional, defaults to win32)
# Check parameters
@@ -46,6 +46,12 @@ Name ScummVM
!ifndef ARCH
!warning "ARCH has not been defined, defaulting to 'win32'"
!define ARCH "win32"
+!else
+ !if "${ARCH}" == ""
+ !warning "ARCH was empty, defaulting to 'win32'"
+ !undef ARCH
+ !define ARCH "win32"
+ !endif
!endif
#########################################################################################
@@ -219,7 +225,7 @@ Section "ScummVM" SecMain
SetOverwrite on
# Text files
- File /oname=AUTHORS.txt "${top_srcdir}\AUTHORS"
+ File /oname=AUTHORS.txt "${top_srcdir}\AUTHORS"
File /oname=COPYING.LGPL.txt "${top_srcdir}\COPYING.LGPL"
File /oname=COPYING.txt "${top_srcdir}\COPYING"
File /oname=COPYRIGHT.txt "${top_srcdir}\COPYRIGHT"
@@ -228,15 +234,15 @@ Section "ScummVM" SecMain
# Convert line endings
Push "$INSTDIR\AUTHORS.txt"
- Call unix2dos
+ Call unix2dos
Push "$INSTDIR\COPYING.LGPL.txt"
- Call unix2dos
+ Call unix2dos
Push "$INSTDIR\COPYING.txt"
- Call unix2dos
+ Call unix2dos
Push "$INSTDIR\COPYRIGHT.txt"
- Call unix2dos
+ Call unix2dos
Push "$INSTDIR\NEWS.txt"
- Call unix2dos
+ Call unix2dos
Push "$INSTDIR\README.txt"
Call unix2dos
diff --git a/dists/win32/scummvm.nsi.in b/dists/win32/scummvm.nsi.in
index c94e594..a87f5d6 100644
--- a/dists/win32/scummvm.nsi.in
+++ b/dists/win32/scummvm.nsi.in
@@ -31,8 +31,7 @@ Name ScummVM
#########################################################################################
#!define top_srcdir ""
-#!define build_dir ""
-#!define text_dir ""
+#!define staging_dir ""
#!define ARCH "" ;(optional, defaults to win32)
# Check parameters
@@ -40,17 +39,19 @@ Name ScummVM
!error "Top source folder has not been passed to command line!"
!endif
-!ifndef build_dir
- !error "Build folder has not been passed to command line (this folder should contain the executable and linked DLLs)!"
-!endif
-
-!ifndef text_dir
- !error "Text folder has not been passed to command line (this folder should contain all the text files used by the installer)!"
+!ifndef staging_dir
+ !error "Staging folder has not been passed to command line (this folder should contain the executable and linked DLLs)!"
!endif
!ifndef ARCH
!warning "ARCH has not been defined, defaulting to 'win32'"
!define ARCH "win32"
+!else
+ !if "${ARCH}" == ""
+ !warning "ARCH was empty, defaulting to 'win32'"
+ !undef ARCH
+ !define ARCH "win32"
+ !endif
!endif
#########################################################################################
@@ -72,7 +73,7 @@ Name ScummVM
#########################################################################################
# Installer configuration
#########################################################################################
-OutFile ${build_dir}\scummvm-${VERSION}-${ARCH}.exe
+OutFile ${staging_dir}\scummvm-${VERSION}-${ARCH}.exe
InstallDir $PROGRAMFILES\ScummVM ; Default installation folder
InstallDirRegKey HKCU "Software\ScummVM\ScummVM" "InstallPath" ; Get installation folder from registry if available
; The application name needs to be refered directly instead of through ${REGKEY}
@@ -224,13 +225,26 @@ Section "ScummVM" SecMain
SetOverwrite on
# Text files
- File /oname=AUTHORS.txt "${text_dir}\AUTHORS"
- File /oname=COPYING.LGPL.txt "${text_dir}\COPYING.LGPL"
- File /oname=COPYING.txt "${text_dir}\COPYING"
- File /oname=COPYRIGHT.txt "${text_dir}\COPYRIGHT"
- File /oname=NEWS.txt "${text_dir}\NEWS"
- File /oname=README.txt "${text_dir}\README"
- File /oname=README-SDL.txt "${build_dir}\README-SDL"
+ File /oname=AUTHORS.txt "${top_srcdir}\AUTHORS"
+ File /oname=COPYING.LGPL.txt "${top_srcdir}\COPYING.LGPL"
+ File /oname=COPYING.txt "${top_srcdir}\COPYING"
+ File /oname=COPYRIGHT.txt "${top_srcdir}\COPYRIGHT"
+ File /oname=NEWS.txt "${top_srcdir}\NEWS"
+ File /oname=README.txt "${top_srcdir}\README"
+
+ # Convert line endings
+ Push "$INSTDIR\AUTHORS.txt"
+ Call unix2dos
+ Push "$INSTDIR\COPYING.LGPL.txt"
+ Call unix2dos
+ Push "$INSTDIR\COPYING.txt"
+ Call unix2dos
+ Push "$INSTDIR\COPYRIGHT.txt"
+ Call unix2dos
+ Push "$INSTDIR\NEWS.txt"
+ Call unix2dos
+ Push "$INSTDIR\README.txt"
+ Call unix2dos
!ifdef _INCLUDE_DATA_FILES
# Engine data
@@ -253,8 +267,8 @@ Section "ScummVM" SecMain
!endif
# Main exe and dlls
- File "${build_dir}\scummvm.exe"
- File "${build_dir}\SDL.dll"
+ File "${staging_dir}\scummvm.exe"
+ File "${staging_dir}\SDL.dll"
WriteRegStr HKCU "${REGKEY}" InstallPath "$INSTDIR" ; Store installation folder
SectionEnd
@@ -354,3 +368,61 @@ Function un.onInit
ReadRegStr $INSTDIR HKCU "${REGKEY}" InstallPath
!insertmacro MUI_STARTMENU_GETFOLDER Application $StartMenuGroup
FunctionEnd
+
+
+#########################################################################################
+# Helper functions
+#########################################################################################
+
+;-------------------------------------------------------------------------------
+; strips all CRs and then converts all LFs into CRLFs
+; (this is roughly equivalent to "cat file | dos2unix | unix2dos")
+;
+; Usage:
+; Push "infile"
+; Call unix2dos
+;
+; Note: this function destroys $0 $1 $2
+Function unix2dos
+ ClearErrors
+
+ Pop $2
+ Rename $2 $2.U2D
+ FileOpen $1 $2 w
+
+ FileOpen $0 $2.U2D r
+
+ Push $2 ; save name for deleting
+
+ IfErrors unix2dos_done
+
+ ; $0 = file input (opened for reading)
+ ; $1 = file output (opened for writing)
+
+unix2dos_loop:
+ ; read a byte (stored in $2)
+ FileReadByte $0 $2
+ IfErrors unix2dos_done ; EOL
+ ; skip CR
+ StrCmp $2 13 unix2dos_loop
+ ; if LF write an extra CR
+ StrCmp $2 10 unix2dos_cr unix2dos_write
+
+unix2dos_cr:
+ FileWriteByte $1 13
+
+unix2dos_write:
+ ; write byte
+ FileWriteByte $1 $2
+ ; read next byte
+ Goto unix2dos_loop
+
+unix2dos_done:
+ ; close files
+ FileClose $0
+ FileClose $1
+
+ ; delete original
+ Pop $0
+ Delete $0.U2D
+FunctionEnd
diff --git a/ports.mk b/ports.mk
index 8e7ac23..3481b12 100644
--- a/ports.mk
+++ b/ports.mk
@@ -189,7 +189,7 @@ win32setup: $(EXECUTABLE)
mkdir -p $(srcdir)/$(STAGINGPATH)
$(STRIP) $(EXECUTABLE) -o $(srcdir)/$(STAGINGPATH)/$(EXECUTABLE)
cp /usr/local/bin/SDL.dll $(srcdir)/$(STAGINGPATH)
- makensis -V2 -Dtop_srcdir="../.." -Dstaging_dir="../../$(STAGINGPATH)" $(srcdir)/dists/win32/scummvm.nsi
+ makensis -V2 -Dtop_srcdir="../.." -Dstaging_dir="../../$(STAGINGPATH)" -Darch=$(ARCH) $(srcdir)/dists/win32/scummvm.nsi
#
# AmigaOS specific
Commit: 00e3f920d01be56b5882f721a3eaf40ea6210f44
https://github.com/scummvm/scummvm/commit/00e3f920d01be56b5882f721a3eaf40ea6210f44
Author: Littleboy (littleboy at users.sourceforge.net)
Date: 2011-06-30T22:17:20-07:00
Commit Message:
CREATE_PROJECT: Update with new location of NSIS script and updated parameters
Changed paths:
devtools/create_project/scripts/installer.vbs
diff --git a/devtools/create_project/scripts/installer.vbs b/devtools/create_project/scripts/installer.vbs
index d752355..19b4eee 100644
--- a/devtools/create_project/scripts/installer.vbs
+++ b/devtools/create_project/scripts/installer.vbs
@@ -72,10 +72,9 @@ Sub CreateInstaller()
' Build command line
Dim commandLine : commandLine = """" & nsisPath & "\makensis.exe"" /V2" & _
" /Dtop_srcdir=""" & rootFolder & """" & _
- " /Dbuild_dir=""" & targetFolder & """" & _
- " /Dtext_dir=""" & rootFolder & """" & _
+ " /Dstaging_dir=""" & targetFolder & """" & _
" /DARCH=""" & arch & """" & _
- " """ & rootFolder & "\dists\nsis\scummvm.nsi"""
+ " """ & rootFolder & "\dists\win32\scummvm.nsi"""
Dim oExec: Set oExec = WshShell.Exec(commandline)
If Err.Number <> 0 Then
More information about the Scummvm-git-logs
mailing list