Show
Ignore:
Timestamp:
17.09.2010 15:13:02 (9 years ago)
Author:
ak19
Message:

Dr Bainbridge got gssetup.exe (for the export to cdrom installer) to work again for a later version of Visual Studio: now it works with Visual Studio 9 and does not use STLPort anymore. Changed .rc reference to including afxres.h to windows.h in vcinstall.rc, and there were changes to dereferencing File elements in an STL iterator (in fileCopier.cpp). Also needed to change references to unsigned double to double since the former seems to no longer be supported in later versions of Vis Studio.

Location:
other-projects/gs2-export-cdrom-installer/trunk
Files:
7 modified

Legend:

Unmodified
Added
Removed
  • other-projects/gs2-export-cdrom-installer/trunk/DiskSpace.cpp

    r15927 r22919  
    5454} 
    5555 
    56 unsigned double DiskSpace::totalFreeSpace() 
     56double DiskSpace::totalFreeSpace() 
    5757{   return this->freeClusters * (((double) (this->sectorsPerCluster * this->bytesPerSector)) / (double) (1024)); 
    5858} 
  • other-projects/gs2-export-cdrom-installer/trunk/DiskSpace.h

    r15927 r22919  
    1515  int                   fileClusters(int fileSize); 
    1616  BOOL                  initialisedOk(); 
    17   unsigned double totalFreeSpace(); 
     17  double totalFreeSpace(); 
    1818}; 
    1919 
  • other-projects/gs2-export-cdrom-installer/trunk/README.txt

    r15927 r22919  
    1212cannot be recompiled. (The source for it is in the "really-really-old-stuff" directory.) 
    1313 
    14 The gssetup.exe program can be compiled using Microsoft Visual C++ 4.2 on kohekohe: 
     14The gssetup.exe program can be compiled using Microsoft Visual Studio 9.0 on the  
     15Vista machine as follows: 
     16[If using Microsoft Visual C++ 4.2 or older, you want to check out an older version  
     17of gs2-export-cdrom-installer and follow its README instructions.] 
    1518 
    16 1. C:\MSDEV\bin\VCVARS32.bat 
     19(0. For windows.h includes: 
     20call "C:\Program Files\Microsoft SDKs\Windows\v6.1\Bin\SetEnv.cmd") 
     211. call "C:\Program Files\Microsoft Visual Studio 9.0\VC\bin\vcvars32.bat" 
    17222. nmake /f win32.mak (in the gsinstaller directory) 
    1823 
    19 Note: stlport.zip is required for compiling. This file is avaible in Greenstone SVN at http://svn.greenstone.org/gsdl/trunk/packages/windows/stlport/. Download and unzip the zip file, and change the include path in win32.mak accordingly. 
     24 
     25 
  • other-projects/gs2-export-cdrom-installer/trunk/fileCopier.cpp

    r15927 r22919  
    66#include <direct.h> 
    77 
     8#if defined (GSDL_USE_IOS_H) 
    89#include <fstream.h> 
     10#else  
     11#include <fstream> 
     12#endif 
    913 
    1014fileCopySet::fileCopySet() 
     
    185189      while (here != end) 
    186190    { 
    187       this->copy(here, monitor, progressBar); 
     191        File& file_here = (*here); // to the best of our understanding, this returns a reference to the object (rather than a local copy) 
     192      this->copy(&file_here, monitor, progressBar); 
    188193      here ++; 
    189194    } 
     
    211216  while (here != end) 
    212217    { 
    213       this->copy(here, monitor, progressBar); 
    214       here ++; 
    215     } 
    216 } 
    217  
    218 unsigned double fileCopySet::getCopiedSize(DiskSpace &space) 
     218        File& file_here = (*here); // to the best of our understanding, this returns a reference to the object (rather than a local copy) 
     219        this->copy(&file_here, monitor, progressBar); 
     220        here ++; 
     221    } 
     222} 
     223 
     224double fileCopySet::getCopiedSize(DiskSpace &space) 
    219225{ 
    220226  // initialise counters for size 
  • other-projects/gs2-export-cdrom-installer/trunk/fileCopier.h

    r15927 r22919  
    2929  unsigned long getOriginalSize(); 
    3030  unsigned long getOriginalFiles(); 
    31   unsigned double getCopiedSize(DiskSpace &space); 
     31  double getCopiedSize(DiskSpace &space); 
    3232  bool ensureParent(FilePath &child, fileCopyMonitor *monitor); 
    3333  bool copyFile(File *file, fileCopyMonitor *monitor, copyProgressBar *progressBar); 
  • other-projects/gs2-export-cdrom-installer/trunk/vcinstall.rc

    r11702 r22919  
    88// Generated from the TEXTINCLUDE 2 resource. 
    99// 
    10 #include "afxres.h" 
     10// afxres.h not part of Visual Studio Express. Changed to windows.h 
     11// here and in "2 TEXTINCLUDE DISCARDABLE " section 
     12//#include "afxres.h" 
     13#include "windows.h" 
    1114 
    1215///////////////////////////////////////////////////////////////////////////// 
     
    35382 TEXTINCLUDE DISCARDABLE  
    3639BEGIN 
    37     "#include ""afxres.h""\r\n" 
     40    "#include ""windows.h""\r\n" 
    3841    "\0" 
    3942END 
  • other-projects/gs2-export-cdrom-installer/trunk/win32.mak

    r11684 r22919  
    2626CC = cl 
    2727CPPFLAGS = -GX 
    28 DEFS = -DGSDL_NAMESPACE_BROKEN -D__STL_NO_NEW_IOSTREAMS 
    29 INCLUDES = -I"C:\mdewsnip\gsdl-cvs.new\packages\windows\stlport\stlport" 
     28DEFS =  
     29INCLUDES =  
    3030 
    3131COMPILE = $(CC) -nologo -c $(CPPFLAGS) $(DEFS) $(INCLUDES)