ide, launcher: Move to new directory
This commit is contained in:
@@ -1,118 +0,0 @@
|
||||
|
||||
#include "stdafx.h"
|
||||
#include "prefs.h"
|
||||
#include "libs.h"
|
||||
#include "resource.h"
|
||||
|
||||
#include <mmsystem.h>
|
||||
|
||||
char _credits[]=
|
||||
"\r\n"
|
||||
"Programming and design: Mark Sibly\r\n\r\n"
|
||||
"Documentation: Mark Sibly, Simon Harrison, Paul Gerfen, Shane Monroe and the Blitz Doc Team\r\n\r\n"
|
||||
"Testing and support: James Boyd, Simon Armstrong and the Blitz Dev Team\r\n\r\n"
|
||||
"Image loader courtesy of FreeImage by Floris van den berg\r\n\r\n"
|
||||
"Please visit www.blitzbasic.com for all your Blitz related needs!";
|
||||
|
||||
/*
|
||||
char _credits[]=
|
||||
"\r\n"
|
||||
"Programming and Design: Mark Sibly\r\n\r\n"
|
||||
"Documentation: Simon Harrison; Simon Armstrong; Mark Sibly\r\n\r\n"
|
||||
"Many thanks to: Claire Foley; Janet Sibly; Rick, Kay and Robbie Keam; "
|
||||
"James Boyd; the Blitz Dev Team\r\n\r\n"
|
||||
"Image loader courtesy of FreeImage by Floris van den Berg\r\n\r\n"
|
||||
"Please visit www.blitzbasic.com for all your Blitz related needs!";
|
||||
*/
|
||||
|
||||
class Dialog : public CDialog{
|
||||
bool _quit;
|
||||
public:
|
||||
Dialog():_quit(false){}
|
||||
|
||||
afx_msg void OnOK(){
|
||||
_quit=true;
|
||||
}
|
||||
|
||||
void wait(){
|
||||
_quit=false;
|
||||
MSG msg;
|
||||
while( !_quit && GetMessage( &msg,0,0,0 ) ){
|
||||
if( !AfxGetApp()->PreTranslateMessage(&msg) ){
|
||||
TranslateMessage( &msg );
|
||||
DispatchMessage( &msg );
|
||||
}
|
||||
}
|
||||
EndDialog(0);
|
||||
}
|
||||
|
||||
void wait( int n ){
|
||||
int _expire=(int)timeGetTime()+n;
|
||||
for(;;){
|
||||
int tm=_expire-(int)timeGetTime();
|
||||
if( tm<0 ) tm=0;
|
||||
MsgWaitForMultipleObjects( 0,0,false,tm,QS_ALLEVENTS );
|
||||
|
||||
MSG msg;
|
||||
if( PeekMessage( &msg,0,0,0,PM_REMOVE ) ){
|
||||
if( !AfxGetApp()->PreTranslateMessage(&msg) ){
|
||||
TranslateMessage( &msg );
|
||||
DispatchMessage( &msg );
|
||||
}
|
||||
}
|
||||
if( !tm ) return;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
void aboutBlitz( bool delay ){
|
||||
|
||||
AfxGetMainWnd()->EnableWindow(0);
|
||||
|
||||
Dialog about;
|
||||
|
||||
about.Create( IDD_ABOUT );
|
||||
|
||||
string credits;
|
||||
|
||||
credits+=_credits;
|
||||
|
||||
about.GetDlgItem( IDC_CREDITS )->SetWindowText( credits.c_str() );
|
||||
|
||||
int ide_ver=VERSION&0xffff;
|
||||
int lnk_ver=linker_ver&0xffff;
|
||||
int run_ver=runtime_ver&0xffff;
|
||||
string ide_v=itoa(ide_ver/1000)+"."+itoa(ide_ver%1000);
|
||||
string lnk_v=itoa(lnk_ver/1000)+"."+itoa(lnk_ver%1000);
|
||||
string run_v=itoa(run_ver/1000)+"."+itoa(run_ver%1000);
|
||||
|
||||
string t="";
|
||||
|
||||
t+="BlitzNext";
|
||||
|
||||
about.GetDlgItem( IDC_PRODUCT )->SetWindowText( t.c_str() );
|
||||
|
||||
t="IDE V"+ide_v+" Linker V"+lnk_v+" Runtime V"+run_v;
|
||||
|
||||
about.GetDlgItem( IDC_VERSION )->SetWindowText( t.c_str() );
|
||||
|
||||
#ifdef DEMO
|
||||
|
||||
if( delay ){
|
||||
about.GetDlgItem( IDOK )->ShowWindow( SW_HIDE );
|
||||
about.GetDlgItem( IDC_PROGRESS1 )->ShowWindow( SW_SHOW );
|
||||
for( int k=0;k<100;++k ){
|
||||
((CProgressCtrl*)about.GetDlgItem( IDC_PROGRESS1 ))->SetPos( k+1 );
|
||||
about.wait( 50 );
|
||||
}
|
||||
about.GetDlgItem( IDOK )->ShowWindow( SW_SHOW );
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
about.GetDlgItem( IDC_PROGRESS1 )->ShowWindow( SW_HIDE );
|
||||
about.wait();
|
||||
about.EndDialog(0);
|
||||
AfxGetMainWnd()->EnableWindow(1);
|
||||
}
|
||||
|
||||
@@ -1,262 +0,0 @@
|
||||
# Microsoft Developer Studio Project File - Name="blitzide" - Package Owner=<4>
|
||||
# Microsoft Developer Studio Generated Build File, Format Version 6.00
|
||||
# ** DO NOT EDIT **
|
||||
|
||||
# TARGTYPE "Win32 (x86) Application" 0x0101
|
||||
|
||||
CFG=blitzide - Win32 Debug
|
||||
!MESSAGE This is not a valid makefile. To build this project using NMAKE,
|
||||
!MESSAGE use the Export Makefile command and run
|
||||
!MESSAGE
|
||||
!MESSAGE NMAKE /f "blitzide.mak".
|
||||
!MESSAGE
|
||||
!MESSAGE You can specify a configuration when running NMAKE
|
||||
!MESSAGE by defining the macro CFG on the command line. For example:
|
||||
!MESSAGE
|
||||
!MESSAGE NMAKE /f "blitzide.mak" CFG="blitzide - Win32 Debug"
|
||||
!MESSAGE
|
||||
!MESSAGE Possible choices for configuration are:
|
||||
!MESSAGE
|
||||
!MESSAGE "blitzide - Win32 Release" (based on "Win32 (x86) Application")
|
||||
!MESSAGE "blitzide - Win32 Debug" (based on "Win32 (x86) Application")
|
||||
!MESSAGE "blitzide - Win32 Blitz3DRelease" (based on "Win32 (x86) Application")
|
||||
!MESSAGE "blitzide - Win32 Blitz2DRelease" (based on "Win32 (x86) Application")
|
||||
!MESSAGE
|
||||
|
||||
# Begin Project
|
||||
# PROP AllowPerConfigDependencies 0
|
||||
# PROP Scc_ProjName ""
|
||||
# PROP Scc_LocalPath ""
|
||||
CPP=cl.exe
|
||||
MTL=midl.exe
|
||||
RSC=rc.exe
|
||||
|
||||
!IF "$(CFG)" == "blitzide - Win32 Release"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 0
|
||||
# PROP BASE Output_Dir "Release"
|
||||
# PROP BASE Intermediate_Dir "Release"
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 1
|
||||
# PROP Use_Debug_Libraries 0
|
||||
# PROP Output_Dir "Release"
|
||||
# PROP Intermediate_Dir "Release"
|
||||
# PROP Ignore_Export_Lib 0
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /YX /FD /c
|
||||
# ADD CPP /nologo /MT /W3 /GX /O1 /Ob2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /Yu"stdafx.h" /FD /c
|
||||
# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32
|
||||
# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
|
||||
# ADD BASE RSC /l 0x409 /d "NDEBUG"
|
||||
# ADD RSC /l 0x409 /d "NDEBUG"
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LINK32=link.exe
|
||||
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /machine:I386
|
||||
# ADD LINK32 winmm.lib /nologo /subsystem:windows /machine:I386 /force /out:"..\blitzbasic\bin\ide.exe"
|
||||
# SUBTRACT LINK32 /debug /nodefaultlib
|
||||
|
||||
!ELSEIF "$(CFG)" == "blitzide - Win32 Debug"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 1
|
||||
# PROP BASE Output_Dir "Debug"
|
||||
# PROP BASE Intermediate_Dir "Debug"
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 1
|
||||
# PROP Use_Debug_Libraries 1
|
||||
# PROP Output_Dir "Debug"
|
||||
# PROP Intermediate_Dir "Debug"
|
||||
# PROP Ignore_Export_Lib 0
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /YX /FD /GZ /c
|
||||
# ADD CPP /nologo /MTd /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /Yu"stdafx.h" /FD /GZ /c
|
||||
# SUBTRACT CPP /Gy
|
||||
# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32
|
||||
# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32
|
||||
# ADD BASE RSC /l 0x409 /d "_DEBUG"
|
||||
# ADD RSC /l 0x409 /d "_DEBUG"
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LINK32=link.exe
|
||||
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept
|
||||
# ADD LINK32 ddraw.lib dinput.lib dsound.lib dplayx.lib dxguid.lib winmm.lib /nologo /subsystem:windows /incremental:no /debug /machine:I386 /nodefaultlib:"afxmem.obj" /force /out:"..\blitzbasic\bin\ide.exe" /fixed:no
|
||||
# SUBTRACT LINK32 /pdb:none
|
||||
|
||||
!ELSEIF "$(CFG)" == "blitzide - Win32 Blitz3DRelease"
|
||||
|
||||
# PROP BASE Use_MFC 1
|
||||
# PROP BASE Use_Debug_Libraries 0
|
||||
# PROP BASE Output_Dir "blitzide___Win32_Blitz3DRelease"
|
||||
# PROP BASE Intermediate_Dir "blitzide___Win32_Blitz3DRelease"
|
||||
# PROP BASE Ignore_Export_Lib 0
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 1
|
||||
# PROP Use_Debug_Libraries 0
|
||||
# PROP Output_Dir "blitzide___Win32_Blitz3DRelease"
|
||||
# PROP Intermediate_Dir "blitzide___Win32_Blitz3DRelease"
|
||||
# PROP Ignore_Export_Lib 0
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /MT /W3 /GX /O1 /Ob2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /Yu"stdafx.h" /FD /c
|
||||
# ADD CPP /nologo /G6 /Gz /MT /W3 /GX /O1 /D "_WINDOWS" /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "PRO" /FD /c
|
||||
# SUBTRACT CPP /YX /Yc /Yu
|
||||
# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32
|
||||
# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
|
||||
# ADD BASE RSC /l 0x409 /d "NDEBUG"
|
||||
# ADD RSC /l 0x409 /d "NDEBUG" /d "PRO"
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LINK32=link.exe
|
||||
# ADD BASE LINK32 winmm.lib /nologo /subsystem:windows /machine:I386 /force /out:"..\blitzbasic\bin\ide.exe"
|
||||
# SUBTRACT BASE LINK32 /debug /nodefaultlib
|
||||
# ADD LINK32 winmm.lib /nologo /subsystem:windows /machine:I386 /force /out:"../_release/bin/ide.exe"
|
||||
# SUBTRACT LINK32 /debug /nodefaultlib
|
||||
|
||||
!ELSEIF "$(CFG)" == "blitzide - Win32 Blitz2DRelease"
|
||||
|
||||
# PROP BASE Use_MFC 1
|
||||
# PROP BASE Use_Debug_Libraries 0
|
||||
# PROP BASE Output_Dir "blitzide___Win32_Blitz2DRelease"
|
||||
# PROP BASE Intermediate_Dir "blitzide___Win32_Blitz2DRelease"
|
||||
# PROP BASE Ignore_Export_Lib 0
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 1
|
||||
# PROP Use_Debug_Libraries 0
|
||||
# PROP Output_Dir "blitzide___Win32_Blitz2DRelease"
|
||||
# PROP Intermediate_Dir "blitzide___Win32_Blitz2DRelease"
|
||||
# PROP Ignore_Export_Lib 0
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /MT /W3 /GX /O1 /Ob2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /Yu"stdafx.h" /FD /c
|
||||
# ADD CPP /nologo /MT /W3 /GX /O1 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /Yu"stdafx.h" /FD /c
|
||||
# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32
|
||||
# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
|
||||
# ADD BASE RSC /l 0x409 /d "NDEBUG"
|
||||
# ADD RSC /l 0x409 /d "NDEBUG"
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LINK32=link.exe
|
||||
# ADD BASE LINK32 winmm.lib /nologo /subsystem:windows /machine:I386 /force /out:"..\..\release\blitz3drelease\bin\ide.exe"
|
||||
# SUBTRACT BASE LINK32 /debug /nodefaultlib
|
||||
# ADD LINK32 winmm.lib /nologo /subsystem:windows /machine:I386 /force /out:"..\..\release\blitz2drelease\bin\ide.exe"
|
||||
# SUBTRACT LINK32 /debug /nodefaultlib
|
||||
|
||||
!ENDIF
|
||||
|
||||
# Begin Target
|
||||
|
||||
# Name "blitzide - Win32 Release"
|
||||
# Name "blitzide - Win32 Debug"
|
||||
# Name "blitzide - Win32 Blitz3DRelease"
|
||||
# Name "blitzide - Win32 Blitz2DRelease"
|
||||
# Begin Group "Source Files"
|
||||
|
||||
# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\about.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\blitzide.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\blitzide.rc
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\editor.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\funclist.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\htmlhelp.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\libs.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\mainframe.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\prefs.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\stdafx.cpp
|
||||
# ADD CPP /Yc"stdafx.h"
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\tabber.cpp
|
||||
# End Source File
|
||||
# End Group
|
||||
# Begin Group "Header Files"
|
||||
|
||||
# PROP Default_Filter "h;hpp;hxx;hm;inl"
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\about.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\blitzide.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\editor.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\funclist.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\htmlhelp.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\libs.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\mainframe.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\prefs.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\stdafx.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\tabber.h
|
||||
# End Source File
|
||||
# End Group
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\b3dlogo.bmp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\bplogo.bmp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=".\IDE (logo, no code) 32.ico"
|
||||
# End Source File
|
||||
# End Target
|
||||
# End Project
|
||||
@@ -1,261 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup Label="ProjectConfigurations">
|
||||
<ProjectConfiguration Include="Debug|Win32">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|Win32">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="RelWithDebInfo|Win32">
|
||||
<Configuration>RelWithDebInfo</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
</ItemGroup>
|
||||
<PropertyGroup Label="Globals">
|
||||
<SccProjectName />
|
||||
<SccLocalPath />
|
||||
<Keyword>MFCProj</Keyword>
|
||||
<ProjectGuid>{B61D8348-B715-42B8-A759-C7BBB0C8CD4D}</ProjectGuid>
|
||||
<ProjectName>IDE</ProjectName>
|
||||
<WindowsTargetPlatformVersion>10.0.17763.0</WindowsTargetPlatformVersion>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<PlatformToolset>v141</PlatformToolset>
|
||||
<UseOfMfc>false</UseOfMfc>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='RelWithDebInfo|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<PlatformToolset>v140_xp</PlatformToolset>
|
||||
<UseOfMfc>false</UseOfMfc>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<PlatformToolset>v140_xp</PlatformToolset>
|
||||
<UseOfMfc>false</UseOfMfc>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||
<ImportGroup Label="ExtensionSettings">
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
<Import Project="$(VCTargetsPath)Microsoft.Cpp.UpgradeFromVC60.props" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='RelWithDebInfo|Win32'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
<Import Project="$(VCTargetsPath)Microsoft.Cpp.UpgradeFromVC60.props" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
<Import Project="$(VCTargetsPath)Microsoft.Cpp.UpgradeFromVC60.props" />
|
||||
</ImportGroup>
|
||||
<PropertyGroup Label="UserMacros" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<OutDir>..\#Build\$(ProjectName)\$(Configuration)-$(PlatformTarget)\</OutDir>
|
||||
<IntDir>..\#Intermediate\$(ProjectName)\$(Configuration)-$(PlatformTarget)\</IntDir>
|
||||
<LinkIncremental>false</LinkIncremental>
|
||||
<IncludePath>C:\Program Files (x86)\Windows Kits\10\Include\10.0.14393.0\shared;C:\Program Files (x86)\Windows Kits\10\Include\10.0.14393.0\um;$(IncludePath)</IncludePath>
|
||||
<LibraryPath>C:\Program Files (x86)\Windows Kits\10\Lib\10.0.14393.0\um\x86;$(LibraryPath)</LibraryPath>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<OutDir>..\#Build\$(ProjectName)\$(Configuration)-$(PlatformTarget)\</OutDir>
|
||||
<IntDir>..\#Intermediate\$(ProjectName)\$(Configuration)-$(PlatformTarget)\</IntDir>
|
||||
<LinkIncremental>false</LinkIncremental>
|
||||
<IncludePath>C:\Program Files (x86)\Windows Kits\10\Include\10.0.14393.0\shared;C:\Program Files (x86)\Windows Kits\10\Include\10.0.14393.0\um;$(IncludePath)</IncludePath>
|
||||
<LibraryPath>C:\Program Files (x86)\Windows Kits\10\Lib\10.0.14393.0\um\x86;$(LibraryPath)</LibraryPath>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='RelWithDebInfo|Win32'">
|
||||
<OutDir>..\#Build\$(ProjectName)\$(Configuration)-$(PlatformTarget)\</OutDir>
|
||||
<IntDir>..\#Intermediate\$(ProjectName)\$(Configuration)-$(PlatformTarget)\</IntDir>
|
||||
<LinkIncremental>false</LinkIncremental>
|
||||
<IncludePath>C:\Program Files (x86)\Windows Kits\10\Include\10.0.14393.0\shared;C:\Program Files (x86)\Windows Kits\10\Include\10.0.14393.0\um;$(IncludePath)</IncludePath>
|
||||
<LibraryPath>C:\Program Files (x86)\Windows Kits\10\Lib\10.0.14393.0\um\x86;$(LibraryPath)</LibraryPath>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<ClCompile>
|
||||
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
|
||||
<FunctionLevelLinking>false</FunctionLevelLinking>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<MinimalRebuild>true</MinimalRebuild>
|
||||
<PreprocessorDefinitions>_AFXDLL;_CRT_SECURE_NO_WARNINGS;WIN32;DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<BasicRuntimeChecks>Default</BasicRuntimeChecks>
|
||||
<ControlFlowGuard>false</ControlFlowGuard>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<CallingConvention>StdCall</CallingConvention>
|
||||
<ExceptionHandling>Async</ExceptionHandling>
|
||||
<RemoveUnreferencedCodeData>false</RemoveUnreferencedCodeData>
|
||||
</ClCompile>
|
||||
<Midl>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<TypeLibraryName>.\Debug\blitzide.tlb</TypeLibraryName>
|
||||
<MkTypLibCompatible>true</MkTypLibCompatible>
|
||||
<TargetEnvironment>Win32</TargetEnvironment>
|
||||
</Midl>
|
||||
<ResourceCompile>
|
||||
<Culture>0x0409</Culture>
|
||||
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
</ResourceCompile>
|
||||
<Bscmake>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<OutputFile>.\Debug\blitzide.bsc</OutputFile>
|
||||
</Bscmake>
|
||||
<Link>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<IgnoreSpecificDefaultLibraries>afxmem.obj;%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
|
||||
<OutputFile>..\blitzbasic\bin\ide.exe</OutputFile>
|
||||
<AdditionalOptions> /FIXED:NO</AdditionalOptions>
|
||||
<AdditionalDependencies>ddraw.lib;dinput.lib;dsound.lib;dplayx.lib;dxguid.lib;winmm.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<ClCompile>
|
||||
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
|
||||
<FunctionLevelLinking>false</FunctionLevelLinking>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<PreprocessorDefinitions>_AFXDLL;_CRT_SECURE_NO_WARNINGS;WIN32;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<MinimalRebuild>true</MinimalRebuild>
|
||||
<ControlFlowGuard>false</ControlFlowGuard>
|
||||
<CallingConvention>StdCall</CallingConvention>
|
||||
<ExceptionHandling>Async</ExceptionHandling>
|
||||
<RemoveUnreferencedCodeData>false</RemoveUnreferencedCodeData>
|
||||
<Optimization>Full</Optimization>
|
||||
<InlineFunctionExpansion>AnySuitable</InlineFunctionExpansion>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
|
||||
<OmitFramePointers>true</OmitFramePointers>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<StructMemberAlignment>4Bytes</StructMemberAlignment>
|
||||
<BufferSecurityCheck>false</BufferSecurityCheck>
|
||||
<EnableParallelCodeGeneration>true</EnableParallelCodeGeneration>
|
||||
<EnableEnhancedInstructionSet>StreamingSIMDExtensions2</EnableEnhancedInstructionSet>
|
||||
<FloatingPointModel>Fast</FloatingPointModel>
|
||||
<RuntimeTypeInfo>false</RuntimeTypeInfo>
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
<CompileAsManaged>false</CompileAsManaged>
|
||||
<SDLCheck>
|
||||
</SDLCheck>
|
||||
<MultiProcessorCompilation>false</MultiProcessorCompilation>
|
||||
<EnableFiberSafeOptimizations>true</EnableFiberSafeOptimizations>
|
||||
</ClCompile>
|
||||
<Midl>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<TypeLibraryName>.\Release\blitzide.tlb</TypeLibraryName>
|
||||
<MkTypLibCompatible>true</MkTypLibCompatible>
|
||||
<TargetEnvironment>Win32</TargetEnvironment>
|
||||
</Midl>
|
||||
<ResourceCompile>
|
||||
<Culture>0x0409</Culture>
|
||||
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
</ResourceCompile>
|
||||
<Bscmake>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<OutputFile>.\Release\blitzide.bsc</OutputFile>
|
||||
</Bscmake>
|
||||
<Link>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<GenerateDebugInformation>false</GenerateDebugInformation>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries>
|
||||
<OutputFile>..\blitzbasic\bin\ide.exe</OutputFile>
|
||||
<AdditionalDependencies>winmm.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='RelWithDebInfo|Win32'">
|
||||
<ClCompile>
|
||||
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
|
||||
<FunctionLevelLinking>false</FunctionLevelLinking>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<PreprocessorDefinitions>_AFXDLL;_CRT_SECURE_NO_WARNINGS;WIN32;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<MinimalRebuild>true</MinimalRebuild>
|
||||
<ControlFlowGuard>false</ControlFlowGuard>
|
||||
<CallingConvention>StdCall</CallingConvention>
|
||||
<ExceptionHandling>Async</ExceptionHandling>
|
||||
<RemoveUnreferencedCodeData>false</RemoveUnreferencedCodeData>
|
||||
</ClCompile>
|
||||
<Midl>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<TypeLibraryName>.\Release\blitzide.tlb</TypeLibraryName>
|
||||
<MkTypLibCompatible>true</MkTypLibCompatible>
|
||||
<TargetEnvironment>Win32</TargetEnvironment>
|
||||
</Midl>
|
||||
<ResourceCompile>
|
||||
<Culture>0x0409</Culture>
|
||||
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
</ResourceCompile>
|
||||
<Bscmake>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<OutputFile>.\Release\blitzide.bsc</OutputFile>
|
||||
</Bscmake>
|
||||
<Link>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<GenerateDebugInformation>false</GenerateDebugInformation>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries>
|
||||
<OutputFile>..\blitzbasic\bin\ide.exe</OutputFile>
|
||||
<AdditionalDependencies>winmm.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="about.cpp" />
|
||||
<ClCompile Include="blitzide.cpp" />
|
||||
<ClCompile Include="editor.cpp" />
|
||||
<ClCompile Include="funclist.cpp" />
|
||||
<ClCompile Include="htmlhelp.cpp" />
|
||||
<ClCompile Include="libs.cpp" />
|
||||
<ClCompile Include="mainframe.cpp" />
|
||||
<ClCompile Include="prefs.cpp" />
|
||||
<ClCompile Include="stdafx.cpp">
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Create</PrecompiledHeader>
|
||||
<PrecompiledHeaderFile Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">stdafx.h</PrecompiledHeaderFile>
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Create</PrecompiledHeader>
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='RelWithDebInfo|Win32'">Create</PrecompiledHeader>
|
||||
<PrecompiledHeaderFile Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">stdafx.h</PrecompiledHeaderFile>
|
||||
<PrecompiledHeaderFile Condition="'$(Configuration)|$(Platform)'=='RelWithDebInfo|Win32'">stdafx.h</PrecompiledHeaderFile>
|
||||
</ClCompile>
|
||||
<ClCompile Include="tabber.cpp" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ResourceCompile Include="blitzide.rc" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="about.h" />
|
||||
<ClInclude Include="blitzide.h" />
|
||||
<ClInclude Include="editor.h" />
|
||||
<ClInclude Include="funclist.h" />
|
||||
<ClInclude Include="htmlhelp.h" />
|
||||
<ClInclude Include="libs.h" />
|
||||
<ClInclude Include="mainframe.h" />
|
||||
<ClInclude Include="prefs.h" />
|
||||
<ClInclude Include="stdafx.h" />
|
||||
<ClInclude Include="tabber.h" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Image Include="b3dlogo.bmp" />
|
||||
<Image Include="bplogo.bmp" />
|
||||
<Image Include="IDE (logo, no code) 32.ico" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\config\config.vcxproj">
|
||||
<Project>{3e355353-96d8-4aaf-bf95-8e6ca0d4b1ba}</Project>
|
||||
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
</ImportGroup>
|
||||
</Project>
|
||||
@@ -1,87 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup>
|
||||
<Filter Include="Source Files">
|
||||
<UniqueIdentifier>{9c2049a6-f32f-4502-857f-a4ae3ffa8d7d}</UniqueIdentifier>
|
||||
<Extensions>cpp;c;cxx;rc;def;r;odl;idl;hpj;bat</Extensions>
|
||||
</Filter>
|
||||
<Filter Include="Header Files">
|
||||
<UniqueIdentifier>{a084b10a-802f-4ff7-b0fa-c89f7b661e28}</UniqueIdentifier>
|
||||
<Extensions>h;hpp;hxx;hm;inl</Extensions>
|
||||
</Filter>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="about.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="blitzide.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="editor.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="funclist.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="htmlhelp.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="libs.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="mainframe.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="prefs.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="stdafx.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="tabber.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ResourceCompile Include="blitzide.rc">
|
||||
<Filter>Source Files</Filter>
|
||||
</ResourceCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="about.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="blitzide.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="editor.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="funclist.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="htmlhelp.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="libs.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="mainframe.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="prefs.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="stdafx.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="tabber.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Image Include="b3dlogo.bmp" />
|
||||
<Image Include="bplogo.bmp" />
|
||||
<Image Include="IDE (logo, no code) 32.ico" />
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
@@ -1,72 +0,0 @@
|
||||
|
||||
#include "stdafx.h"
|
||||
#include "funclist.h"
|
||||
|
||||
IMPLEMENT_DYNAMIC( FuncList,CListCtrl )
|
||||
BEGIN_MESSAGE_MAP( FuncList,CListCtrl )
|
||||
ON_WM_CREATE()
|
||||
ON_NOTIFY_REFLECT( NM_CLICK,nm_click )
|
||||
END_MESSAGE_MAP()
|
||||
|
||||
FuncList::FuncList():
|
||||
listener(0){
|
||||
}
|
||||
|
||||
void FuncList::setListener( FuncListListener *l ){
|
||||
listener=l;
|
||||
}
|
||||
|
||||
int FuncList::OnCreate( LPCREATESTRUCT cs ){
|
||||
CListCtrl::OnCreate( cs );
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
void FuncList::nm_click( NMHDR *nmhdr,LRESULT *result ){
|
||||
NMLISTVIEW *lv=(NMLISTVIEW*)nmhdr;
|
||||
|
||||
int k=0;
|
||||
Funcs::iterator it;
|
||||
for( it=funcs.begin();it!=funcs.end() && k<lv->iItem;++k,++it ){
|
||||
}
|
||||
if( it!=funcs.end() ){
|
||||
listener->funcSelected( *it );
|
||||
}
|
||||
*result=0;
|
||||
}
|
||||
|
||||
void FuncList::clear(){
|
||||
funcs.clear();
|
||||
DeleteAllItems();
|
||||
}
|
||||
|
||||
void FuncList::insert( int line,const string &func ){
|
||||
int n=0;
|
||||
Funcs::iterator it;
|
||||
for( it=funcs.begin();it!=funcs.end() && line>*it;++n,++it ){
|
||||
}
|
||||
if( it!=funcs.end() && line==*it ){
|
||||
SetItemText( n,0,func.c_str() );
|
||||
return;
|
||||
}
|
||||
it=funcs.insert( it,line );
|
||||
InsertItem( n,func.c_str() );
|
||||
}
|
||||
|
||||
void FuncList::remove( int begin,int end ){
|
||||
int n=0;
|
||||
Funcs::iterator it;
|
||||
for( it=funcs.begin();it!=funcs.end() && *it<begin;++n,++it ){
|
||||
}
|
||||
while( it!=funcs.end() && *it<end ){
|
||||
funcs.erase( it++ );
|
||||
DeleteItem( n );
|
||||
}
|
||||
}
|
||||
|
||||
void FuncList::relocate( int begin,int offset ){
|
||||
Funcs::iterator it;
|
||||
for( it=funcs.begin();it!=funcs.end();++it ){
|
||||
if( *it>=begin ) *it+=offset;
|
||||
}
|
||||
}
|
||||
@@ -1,38 +0,0 @@
|
||||
|
||||
#include "stdafx.h"
|
||||
#include "htmlhelp.h"
|
||||
#include "mainframe.h"
|
||||
#include "libs.h"
|
||||
|
||||
IMPLEMENT_DYNAMIC( HtmlHelp, CHtmlView )
|
||||
BEGIN_MESSAGE_MAP( HtmlHelp, CHtmlView )
|
||||
ON_WM_ERASEBKGND()
|
||||
END_MESSAGE_MAP()
|
||||
|
||||
string HtmlHelp::getTitle(){
|
||||
return title;
|
||||
}
|
||||
|
||||
void HtmlHelp::OnTitleChange( LPCTSTR t ){
|
||||
listener->helpTitleChange( this,title=t );
|
||||
}
|
||||
|
||||
void HtmlHelp::OnBeforeNavigate2( LPCTSTR url,DWORD flags,LPCTSTR target,CByteArray& posted,LPCTSTR headers,BOOL* cancel ){
|
||||
string t( url );
|
||||
int attr=GetFileAttributes( url );if( attr==-1 ) attr=0;
|
||||
if( (attr & FILE_ATTRIBUTE_DIRECTORY) ||
|
||||
(t.rfind( ".bb" )+3==t.size()) ||
|
||||
(isMediaFile( t )) ){
|
||||
|
||||
listener->helpOpen( this,t );
|
||||
*cancel=true;
|
||||
return;
|
||||
|
||||
}
|
||||
*cancel=false;
|
||||
}
|
||||
|
||||
BOOL HtmlHelp::OnEraseBkgnd( CDC *dc ){
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -1,124 +0,0 @@
|
||||
|
||||
#include "stdafx.h"
|
||||
#include "libs.h"
|
||||
#include "editor.h"
|
||||
#include "blitzide.h"
|
||||
|
||||
static map<string,string> keyhelps;
|
||||
|
||||
int linker_ver,runtime_ver;
|
||||
|
||||
static string execProc( const string &proc ){
|
||||
HANDLE rd,wr;
|
||||
|
||||
SECURITY_ATTRIBUTES sa={sizeof(sa),0,true};
|
||||
|
||||
if( CreatePipe( &rd,&wr,&sa,0 ) ){
|
||||
STARTUPINFO si={sizeof(si)};
|
||||
si.dwFlags=STARTF_USESTDHANDLES;
|
||||
si.hStdOutput=si.hStdError=wr;
|
||||
PROCESS_INFORMATION pi={0};
|
||||
if( CreateProcess( 0,(char*)proc.c_str(),0,0,true,DETACHED_PROCESS,0,0,&si,&pi ) ){
|
||||
CloseHandle( pi.hProcess );
|
||||
CloseHandle( pi.hThread );
|
||||
CloseHandle( wr );
|
||||
|
||||
string t;
|
||||
char *buf=new char[1024];
|
||||
for(;;){
|
||||
unsigned long sz;
|
||||
int n=ReadFile( rd,buf,1024,&sz,0 );
|
||||
if( !n && GetLastError()==ERROR_BROKEN_PIPE ) break;
|
||||
if( !n ){ t="";break; }
|
||||
if( !sz ) break;
|
||||
t+=string( buf,sz );
|
||||
}
|
||||
delete[] buf;
|
||||
CloseHandle(rd);
|
||||
return t;
|
||||
}
|
||||
CloseHandle( rd );
|
||||
CloseHandle( wr );
|
||||
}
|
||||
AfxMessageBox( (proc+" failed").c_str() );
|
||||
ExitProcess(0);
|
||||
return "";
|
||||
}
|
||||
|
||||
int version( string vers,string t ){
|
||||
t+=" version:";
|
||||
int n=vers.find( t );n+=t.size();
|
||||
int maj=atoi( vers.substr(n) );n=vers.find( '.',n )+1;
|
||||
int min=atoi( vers.substr(n) );
|
||||
return maj*100+min;
|
||||
}
|
||||
|
||||
void initLibs(){
|
||||
|
||||
string valid=execProc( prefs.homeDir+"/bin/blitzcc -q" );
|
||||
if( valid.size() ){
|
||||
AfxMessageBox( ("Compiler environment error: "+valid).c_str() );
|
||||
ExitProcess(0);
|
||||
}
|
||||
|
||||
string vers=tolower( execProc( prefs.homeDir+"/bin/blitzcc -v" ) );
|
||||
linker_ver=version( vers,"linker" );
|
||||
runtime_ver=version( vers,"runtime" );
|
||||
|
||||
//generate keywords!
|
||||
string kws=execProc( prefs.homeDir+"/bin/blitzcc +k" );
|
||||
|
||||
if( !kws.size() ){
|
||||
AfxMessageBox( "Error generating keywords" );
|
||||
ExitProcess(0);
|
||||
}
|
||||
|
||||
int pos=0,n;
|
||||
while( (n=kws.find( '\n',pos ))!=string::npos ){
|
||||
string t=kws.substr( pos,n-pos-1 );
|
||||
for( int q=0;(q=t.find('\r',q))!=string::npos; ) t=t.replace( q,1,"" );
|
||||
|
||||
string help=t;
|
||||
int i=t.find(' ');
|
||||
if( i!=string::npos ){
|
||||
t=t.substr(0,i);if( !t.size() ){
|
||||
AfxMessageBox( "Error in keywords" );
|
||||
ExitProcess(0);
|
||||
}
|
||||
if( !isalnum(t[t.size()-1]) ) t=t.substr(0,t.size()-1);
|
||||
}
|
||||
|
||||
Editor::addKeyword(t);
|
||||
keyhelps[t]=help;
|
||||
pos=n+1;
|
||||
}
|
||||
}
|
||||
|
||||
string quickHelp( const string &kw ){
|
||||
map<string,string>::const_iterator it=keyhelps.find(kw);
|
||||
return it==keyhelps.end() ? "" : it->second;
|
||||
}
|
||||
|
||||
bool isMediaFile( const string &f ){
|
||||
|
||||
#ifndef PRO
|
||||
return false;
|
||||
#endif
|
||||
|
||||
static char *exts[]={
|
||||
"bmp","jpg","png","tga","iff","pcx",
|
||||
"wav","mid","mp3","mod","s3m","xm","it","rmi","sgt",
|
||||
"x","3ds",0
|
||||
};
|
||||
|
||||
int i=f.rfind( '.' );
|
||||
if( i==string::npos || i+1==f.size() ) return false;
|
||||
string ext=f.substr( i+1 );
|
||||
char **p=exts;
|
||||
while( const char *e=*p++ ){
|
||||
string t(e);
|
||||
if( i+t.size()+1!=f.size() ) continue;
|
||||
if( ext==t ) return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
@@ -1,939 +0,0 @@
|
||||
|
||||
#include "stdafx.h"
|
||||
#include "resource.h"
|
||||
#include "mainframe.h"
|
||||
#include "about.h"
|
||||
#include "blitzide.h"
|
||||
#include "libs.h"
|
||||
|
||||
#include <mmsystem.h>
|
||||
|
||||
#include <fstream>
|
||||
#include <sstream>
|
||||
|
||||
IMPLEMENT_DYNAMIC( MainFrame,CFrameWnd )
|
||||
BEGIN_MESSAGE_MAP( MainFrame,CFrameWnd )
|
||||
ON_WM_CREATE()
|
||||
ON_WM_CLOSE()
|
||||
ON_WM_DESTROY()
|
||||
ON_WM_ERASEBKGND()
|
||||
ON_WM_SIZE()
|
||||
ON_WM_ACTIVATE()
|
||||
|
||||
ON_COMMAND( Inew,fileNew )
|
||||
ON_COMMAND( ID_OPEN,fileOpen )
|
||||
ON_COMMAND( ID_SAVE,fileSave )
|
||||
ON_COMMAND( ID_SAVEAS,fileSaveAs )
|
||||
ON_COMMAND( ID_SAVEALL,fileSaveAll )
|
||||
ON_COMMAND( ID_PRINT,filePrint )
|
||||
ON_COMMAND( ID_CLOSE,fileClose )
|
||||
ON_COMMAND( ID_CLOSEALL,fileCloseAll )
|
||||
ON_COMMAND( ID_EXIT,fileExit )
|
||||
ON_COMMAND_RANGE( 333,343,fileRecent )
|
||||
ON_COMMAND( ID_CUT,editCut )
|
||||
ON_COMMAND( ID_COPY,editCopy )
|
||||
ON_COMMAND( ID_PASTE,editPaste )
|
||||
ON_COMMAND( ID_SELECTALL,editSelectAll )
|
||||
ON_COMMAND( ID_FIND,editFind )
|
||||
ON_COMMAND( ID_FINDNEXT,editFindNext )
|
||||
ON_COMMAND( ID_REPLACE,editReplace )
|
||||
ON_COMMAND( ID_CTRLTAB,ctrlTab )
|
||||
ON_COMMAND( ID_CTRLSHIFTTAB,ctrlShiftTab )
|
||||
ON_COMMAND( ID_ESCAPE,escape )
|
||||
ON_COMMAND( ID_QUICKHELP,quick_Help )
|
||||
|
||||
ON_COMMAND( ID_EXECUTE,programExecute )
|
||||
ON_COMMAND( ID_REEXECUTE,programReExecute )
|
||||
ON_COMMAND( ID_COMPILE,programCompile )
|
||||
ON_COMMAND( ID_PUBLISH,programPublish )
|
||||
ON_COMMAND( ID_COMMANDLINE,programCommandLine )
|
||||
ON_COMMAND( ID_DEBUG,programDebug )
|
||||
|
||||
ON_COMMAND( ID_HOME,helpHome )
|
||||
ON_COMMAND( ID_BACK,helpBack )
|
||||
ON_COMMAND( ID_FORWARD,helpForward )
|
||||
ON_COMMAND( ID_ABOUT,helpAbout )
|
||||
|
||||
ON_UPDATE_COMMAND_UI( Inew,updateCmdUI )
|
||||
ON_UPDATE_COMMAND_UI( ID_OPEN,updateCmdUI )
|
||||
ON_UPDATE_COMMAND_UI( ID_SAVE,updateCmdUI )
|
||||
ON_UPDATE_COMMAND_UI( ID_SAVEAS,updateCmdUI )
|
||||
ON_UPDATE_COMMAND_UI( ID_SAVEALL,updateCmdUI )
|
||||
ON_UPDATE_COMMAND_UI( ID_PRINT,updateCmdUI )
|
||||
ON_UPDATE_COMMAND_UI( ID_CLOSE,updateCmdUI )
|
||||
ON_UPDATE_COMMAND_UI( ID_CLOSEALL,updateCmdUI )
|
||||
ON_UPDATE_COMMAND_UI( ID_CUT,updateCmdUI )
|
||||
ON_UPDATE_COMMAND_UI( ID_COPY,updateCmdUI )
|
||||
ON_UPDATE_COMMAND_UI( ID_PASTE,updateCmdUI )
|
||||
ON_UPDATE_COMMAND_UI( ID_SELECTALL,updateCmdUI )
|
||||
ON_UPDATE_COMMAND_UI( ID_FIND,updateCmdUI )
|
||||
ON_UPDATE_COMMAND_UI( ID_FINDNEXT,updateCmdUI )
|
||||
ON_UPDATE_COMMAND_UI( ID_REPLACE,updateCmdUI )
|
||||
ON_UPDATE_COMMAND_UI( ID_EXECUTE,updateCmdUI )
|
||||
ON_UPDATE_COMMAND_UI( ID_REEXECUTE,updateCmdUI )
|
||||
ON_UPDATE_COMMAND_UI( ID_COMPILE,updateCmdUI )
|
||||
ON_UPDATE_COMMAND_UI( ID_PUBLISH,updateCmdUI )
|
||||
ON_UPDATE_COMMAND_UI( ID_COMMANDLINE,updateCmdUI )
|
||||
ON_UPDATE_COMMAND_UI( ID_DEBUG,updateCmdUI )
|
||||
ON_UPDATE_COMMAND_UI( ID_HOME,updateCmdUI )
|
||||
ON_UPDATE_COMMAND_UI( ID_BACK,updateCmdUI )
|
||||
ON_UPDATE_COMMAND_UI( ID_FORWARD,updateCmdUI )
|
||||
ON_UPDATE_COMMAND_UI( ID_ESCAPE,updateCmdUI )
|
||||
ON_UPDATE_COMMAND_UI( ID_QUICKHELP,updateCmdUI )
|
||||
ON_UPDATE_COMMAND_UI_RANGE( 333,343,updateCmdUIRange )
|
||||
END_MESSAGE_MAP()
|
||||
|
||||
enum{
|
||||
TAB_INVALID,TAB_EDITOR,TAB_HTMLHELP,TAB_DEBUGLOG
|
||||
};
|
||||
|
||||
static string getFile( const string &f ){
|
||||
int n;
|
||||
string t=f;
|
||||
n=t.rfind( '/' );if( n!=string::npos ) t=t.substr(n+1);
|
||||
n=t.rfind( '\\' );if( n!=string::npos ) t=t.substr(n+1);
|
||||
return t;
|
||||
}
|
||||
|
||||
static string getPath( const string &f ){
|
||||
int n;
|
||||
string t=f;
|
||||
n=t.rfind( '/' );if( n!=string::npos ) t=t.substr(0,n );
|
||||
n=t.rfind( '\\' );if( n!=string::npos ) t=t.substr(0,n);
|
||||
return t;
|
||||
}
|
||||
|
||||
MainFrame::MainFrame():exit_flag(false){
|
||||
}
|
||||
|
||||
int MainFrame::OnCreate( LPCREATESTRUCT lpCreateStruct ){
|
||||
CFrameWnd::OnCreate( lpCreateStruct );
|
||||
|
||||
static HBITMAP toolbmp;
|
||||
static SIZE imgsz,butsz;
|
||||
static UINT toolbuts[]={
|
||||
Inew,ID_OPEN,ID_SAVE,ID_CLOSE,ID_SEPARATOR,
|
||||
ID_CUT,ID_COPY,ID_PASTE,ID_SEPARATOR,
|
||||
ID_FIND,ID_SEPARATOR,
|
||||
ID_EXECUTE,ID_SEPARATOR,
|
||||
ID_HOME,ID_BACK,ID_FORWARD };
|
||||
static int toolcnt=sizeof(toolbuts)/sizeof(UINT);
|
||||
|
||||
if( !toolbmp ){
|
||||
BITMAP bm;
|
||||
string t=prefs.homeDir+"/cfg/ide_toolbar.bmp";
|
||||
toolbmp=(HBITMAP)LoadImage( 0,t.c_str(),IMAGE_BITMAP,0,0,LR_LOADFROMFILE|LR_LOADMAP3DCOLORS );
|
||||
if( !toolbmp ){
|
||||
AfxMessageBox( "toolbar bitmap failed to load!" );
|
||||
ExitProcess(0);
|
||||
}
|
||||
GetObject( toolbmp,sizeof(bm),&bm );
|
||||
int n=0;
|
||||
for( int k=0;k<toolcnt;++k ) if( toolbuts[k]!=ID_SEPARATOR ) ++n;
|
||||
imgsz.cx=bm.bmWidth/n;imgsz.cy=bm.bmHeight;
|
||||
butsz.cx=imgsz.cx+7;butsz.cy=imgsz.cy+6;
|
||||
}
|
||||
toolBar.CreateEx( this,TBSTYLE_FLAT,WS_CHILD|WS_VISIBLE|CBRS_TOP|CBRS_TOOLTIPS );
|
||||
toolBar.SetBitmap( toolbmp );
|
||||
toolBar.SetSizes( butsz,imgsz );
|
||||
toolBar.SetButtons( toolbuts,toolcnt );
|
||||
|
||||
int style;
|
||||
style=WS_CHILD|WS_VISIBLE|CBRS_ALIGN_BOTTOM;
|
||||
statusBar.CreateEx( this,0,style );
|
||||
UINT IDS[]={ ID_STATUSTEXT,ID_COLROWTEXT };
|
||||
statusBar.SetIndicators( IDS,2 );
|
||||
statusBar.SetPaneInfo( 0,ID_STATUSTEXT,SBPS_NOBORDERS|SBPS_STRETCH,0 );
|
||||
statusBar.SetPaneInfo( 1,ID_COLROWTEXT,0,128 );
|
||||
statusBar.SetPaneText( 0,"" );statusBar.SetPaneText( 1,"" );
|
||||
|
||||
tabber.Create( WS_VISIBLE|WS_CHILD|TCS_HOTTRACK,CRect( 0,0,0,0 ),this,1 );
|
||||
tabber.SetFont( &prefs.tabsFont );
|
||||
tabber.setListener( this );
|
||||
|
||||
prefs.win_notoolbar=!prefs.win_notoolbar;
|
||||
escape();
|
||||
|
||||
//create recent file list
|
||||
CMenu menu;
|
||||
menu.CreatePopupMenu();
|
||||
for( int k=0;k<prefs.recentFiles.size();++k ){
|
||||
menu.InsertMenu( k,MF_BYPOSITION|MF_ENABLED,333+k,prefs.recentFiles[k].c_str() );
|
||||
}
|
||||
CMenu *file=GetMenu()->GetSubMenu( 0 );
|
||||
file->InsertMenu( 12,MF_BYPOSITION|MF_ENABLED|MF_POPUP,(UINT)menu.m_hMenu,"&Recent Files" );
|
||||
menu.Detach();
|
||||
|
||||
helpHome();
|
||||
|
||||
trackmem( true );
|
||||
|
||||
if( blitzIDE.m_lpCmdLine[0] ){
|
||||
string t=string( blitzIDE.m_lpCmdLine );
|
||||
if( t[0]=='\"' ) t=t.substr( 1,t.size()-2 );
|
||||
open( t );
|
||||
}else{
|
||||
SetCurrentDirectory( (prefs.homeDir+"/samples").c_str() );
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
void MainFrame::OnDestroy(){
|
||||
trackmem( false );
|
||||
WINDOWPLACEMENT wp={sizeof(wp)};
|
||||
if( GetWindowPlacement( &wp ) ){
|
||||
prefs.win_rect=wp.rcNormalPosition;
|
||||
if( wp.showCmd==SW_SHOWMAXIMIZED ){
|
||||
prefs.win_maximized=true;
|
||||
}else{
|
||||
prefs.win_maximized=false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void MainFrame::setTitle( const string &s ){
|
||||
SetWindowText( ("Blitz3D - "+s ).c_str() );
|
||||
return;
|
||||
}
|
||||
|
||||
void MainFrame::OnClose(){
|
||||
bool exit_flag=true;
|
||||
for( int k=tabber.size()-1;k>=0;--k ){
|
||||
exit_flag=close( k );
|
||||
if( !exit_flag ) break;
|
||||
}
|
||||
if( exit_flag ) DestroyWindow();
|
||||
}
|
||||
|
||||
BOOL MainFrame::OnEraseBkgnd( CDC *dc ){
|
||||
return true;
|
||||
}
|
||||
|
||||
void MainFrame::OnSize( UINT type,int sw,int sh ){
|
||||
CFrameWnd::OnSize( type,sw,sh );
|
||||
|
||||
CRect r,t;GetClientRect( &r );
|
||||
int x=r.left,y=r.top,w=r.Width(),h=r.Height();
|
||||
|
||||
if( !prefs.win_notoolbar ){
|
||||
statusBar.GetWindowRect( &t );h-=t.Height();
|
||||
toolBar.GetWindowRect( &t );y+=t.Height();h-=t.Height();
|
||||
}
|
||||
|
||||
tabber.MoveWindow( x,y,w,h );
|
||||
}
|
||||
|
||||
static char *bbFilter=
|
||||
|
||||
"Blitz Basic files (.bb)|*.bb|"
|
||||
|
||||
"Image files (.bmp,.jpg,.png,.tga,.iff,.pcx)|*.bmp;*.jpg;*.png;*.tga;*.iff;*.pcx|"
|
||||
"Audio files (.wav,.mid,.mod,.mp3,.s3m,.xm,.it,.rmi,.sgt)|*.wav;*.mid;*.mod;*.mp3;*.s3m;*.xm;*.it;*.rmi;*.sgt|"
|
||||
"3D Mesh files (.x,.3ds,.md2)|*.x;*.3ds;*.md2|"
|
||||
|
||||
"All files|*.*||";
|
||||
|
||||
Editor *MainFrame::getEditor(){
|
||||
return getEditor( tabber.getCurrent() );
|
||||
}
|
||||
|
||||
Editor *MainFrame::getEditor( int n ){
|
||||
map<CWnd*,Editor*>::iterator it=editors.find( tabber.getTabWnd( n ) );
|
||||
return it==editors.end() ? 0 : it->second;
|
||||
}
|
||||
|
||||
HtmlHelp *MainFrame::getHelp( int n ){
|
||||
map<CWnd*,HtmlHelp*>::iterator it=helps.find( tabber.getTabWnd( n ) );
|
||||
return it==helps.end() ? 0 : it->second;
|
||||
}
|
||||
|
||||
HtmlHelp *MainFrame::getHelp(){
|
||||
return getHelp( tabber.getCurrent() );
|
||||
}
|
||||
|
||||
HtmlHelp *MainFrame::findHelp(){
|
||||
int n;
|
||||
HtmlHelp *h;
|
||||
for( n=0;n<tabber.size();++n ){
|
||||
if( h=getHelp( n ) ) break;
|
||||
}
|
||||
if( n==tabber.size() ){
|
||||
h=new HtmlHelp( this );
|
||||
h->Create( 0,"Help",WS_CHILD|WS_BORDER,CRect( 0,0,0,0 ),&tabber,1 );
|
||||
helps[h]=h;
|
||||
tabber.insert( n,h,"Help" );
|
||||
}
|
||||
tabber.setCurrent( n );
|
||||
return h;
|
||||
}
|
||||
|
||||
void MainFrame::cursorMoved( Editor *editor ){
|
||||
if( editor!=getEditor() ) return;
|
||||
int row,col;
|
||||
editor->getCursor( &row,&col );
|
||||
char mod=editor->getModified() ? '*' : ' ';
|
||||
char str[64];sprintf( str,"Row:%i Col:%i %c",row,col,mod );
|
||||
statusBar.SetPaneText( 1,str );
|
||||
}
|
||||
|
||||
void MainFrame::currentSet( Tabber *tabber,int index ){
|
||||
if( Editor *e=getEditor() ){
|
||||
string t=e->getName();
|
||||
if( !t.size() ) t="<untitled>";
|
||||
setTitle( t );
|
||||
cursorMoved( e );
|
||||
}else if( HtmlHelp *h=getHelp() ){
|
||||
setTitle( h->getTitle() );
|
||||
statusBar.SetPaneText( 1,"" );
|
||||
}else{
|
||||
setTitle( "no file" );
|
||||
statusBar.SetPaneText( 1,"" );
|
||||
}
|
||||
}
|
||||
|
||||
void MainFrame::helpOpen( HtmlHelp *help,const string &file ){
|
||||
open( file );
|
||||
}
|
||||
|
||||
void MainFrame::helpTitleChange( HtmlHelp *help,const string &title ){
|
||||
if( HtmlHelp *h=getHelp() ) setTitle( h->getTitle() );
|
||||
}
|
||||
|
||||
void MainFrame::insertRecent( const string &file ){
|
||||
//check recent files
|
||||
if( CMenu *list=GetMenu()->GetSubMenu( 0 )->GetSubMenu( 12 ) ){
|
||||
vector<string>::iterator it;
|
||||
vector<string> &f=prefs.recentFiles;
|
||||
for( it=f.begin();it!=f.end();++it ){
|
||||
if( tolower( *it )==tolower( file ) ) break;
|
||||
}
|
||||
if( it!=f.end() ){
|
||||
//move to top
|
||||
string t=*it;
|
||||
f.erase( it );
|
||||
f.insert( f.begin(),t );
|
||||
}else{
|
||||
//insert
|
||||
if( f.size()==10 ){
|
||||
f.pop_back();
|
||||
list->RemoveMenu( 9,MF_BYPOSITION );
|
||||
}
|
||||
f.insert( f.begin(),file );
|
||||
list->InsertMenu( 0,MF_BYPOSITION|MF_ENABLED,333,file.c_str() );
|
||||
}
|
||||
//renumber menu items
|
||||
for( int k=0;k<f.size();++k ){
|
||||
list->ModifyMenu( k,MF_BYPOSITION|MF_ENABLED,333+k,f[k].c_str() );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void MainFrame::newed( const string &t ){
|
||||
|
||||
CRect r( 0,0,0,0 );
|
||||
|
||||
Editor *e=new Editor( this );
|
||||
e->Create( 0,"Editor",WS_CHILD,r,&tabber,1 );
|
||||
e->setName( t );
|
||||
editors[e]=e;
|
||||
int n=tabber.size();
|
||||
string s=t.size() ? getFile( t ) : "<untitled>";
|
||||
tabber.insert( n,e,s.c_str() );
|
||||
tabber.setCurrent( n );
|
||||
}
|
||||
|
||||
bool MainFrame::open( const string &f ){
|
||||
|
||||
string file=f,filter="*.bb";
|
||||
|
||||
int n=f.find( "*." );
|
||||
if( n!=string::npos ){
|
||||
file=f.substr( 0,n );
|
||||
filter=f.substr( n );
|
||||
}
|
||||
|
||||
int attr=GetFileAttributes( file.c_str() );if( attr==-1 ) attr=0;
|
||||
if( !file.size() || (attr & FILE_ATTRIBUTE_DIRECTORY) ){
|
||||
|
||||
int n=OFN_NOCHANGEDIR|OFN_FILEMUSTEXIST;
|
||||
CFileDialog fd( true,"bb",filter.c_str(),n,bbFilter );
|
||||
char *i_dir=strdup( file.c_str() );
|
||||
fd.m_ofn.lpstrInitialDir=i_dir;
|
||||
fd.m_ofn.lpstrTitle="Open Blitz Basic File...";
|
||||
int nn=fd.DoModal();free( i_dir );
|
||||
if( nn==IDCANCEL ) return false;
|
||||
|
||||
file=fd.GetPathName();
|
||||
|
||||
}else{
|
||||
|
||||
char buff[MAX_PATH],*p;
|
||||
if( GetFullPathName( file.c_str(),MAX_PATH,buff,&p ) ) file=buff;
|
||||
else file=f;
|
||||
}
|
||||
|
||||
if( isMediaFile( tolower( file ) ) ){
|
||||
string t=prefs.homeDir+"/bin/mediaview.exe";
|
||||
if( (int)ShellExecute( ::GetDesktopWindow(),0,t.c_str(),file.c_str(),0,SW_SHOW )>32 ){
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
//is file already open?
|
||||
int k;
|
||||
for( k=0;k<tabber.size();++k ){
|
||||
if( Editor *e=getEditor( k ) ){
|
||||
if( tolower( e->getName() )==tolower( file ) ){
|
||||
tabber.setCurrent( k );
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
//open new file
|
||||
ifstream in( file.c_str() );
|
||||
if( !in.good() ){
|
||||
string e="Error reading file \""+f+"\"";
|
||||
AfxMessageBox( e.c_str(),MB_ICONWARNING );
|
||||
return false;
|
||||
}
|
||||
newed( file );
|
||||
tabber.UpdateWindow();
|
||||
Editor *e=getEditor();
|
||||
e->setText( in );
|
||||
e->setName( file );
|
||||
e->setModified( false );
|
||||
insertRecent( file );
|
||||
cursorMoved( e );
|
||||
return true;
|
||||
}
|
||||
|
||||
bool MainFrame::close( int n ){
|
||||
if( Editor *e=getEditor( n ) ){
|
||||
if( e->getModified() ){
|
||||
tabber.setCurrent( n );
|
||||
string t="File "+e->getName()+" has been modified!\nSave changes before closing?";
|
||||
int rt=AfxMessageBox( t.c_str(),MB_YESNOCANCEL|MB_ICONWARNING );
|
||||
if( rt==IDYES ) return save( n );
|
||||
if( rt==IDCANCEL ) return false;
|
||||
}
|
||||
tabber.remove( n );
|
||||
e->DestroyWindow();
|
||||
editors.erase( e );
|
||||
delete e;
|
||||
}else if( HtmlHelp *h=getHelp( n ) ){
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
bool MainFrame::save( int n ){
|
||||
|
||||
Editor *e=getEditor( n );
|
||||
if( !e ) return true;
|
||||
string t=e->getName();
|
||||
if( !t.size() ){
|
||||
tabber.setCurrent( n );
|
||||
int df=OFN_NOCHANGEDIR|OFN_PATHMUSTEXIST|OFN_HIDEREADONLY|OFN_EXPLORER|OFN_OVERWRITEPROMPT;
|
||||
CFileDialog fd( false,"bb","*.bb",df,bbFilter );
|
||||
fd.m_ofn.lpstrTitle="Save Blitz Basic program as...";
|
||||
if( fd.DoModal()==IDCANCEL ) return false;
|
||||
t=fd.GetPathName();
|
||||
tabber.setTabText( n,getFile( t ) );
|
||||
e->setName( t );
|
||||
insertRecent( t );
|
||||
}
|
||||
//Do backups!
|
||||
if( prefs.edit_backup ){
|
||||
for( int k=prefs.edit_backup;k>1;--k ){
|
||||
CopyFile( (t+"_bak"+itoa(k-1)).c_str(),(t+"_bak"+itoa(k)).c_str(),false );
|
||||
}
|
||||
CopyFile( t.c_str(),(t+"_bak1").c_str(),false );
|
||||
}
|
||||
int om=ios_base::binary|ios_base::out|ios_base::trunc;
|
||||
ofstream out( t.c_str(),om );
|
||||
if( !out.good() ){
|
||||
string e="Error writing file \""+t+"\"";
|
||||
AfxMessageBox( e.c_str(),MB_ICONWARNING );
|
||||
return false;
|
||||
}
|
||||
e->getText( out );
|
||||
out.close();
|
||||
e->setModified( false );
|
||||
cursorMoved( e );
|
||||
return true;
|
||||
}
|
||||
|
||||
void MainFrame::fileNew(){
|
||||
newed( "" );
|
||||
}
|
||||
|
||||
void MainFrame::fileOpen(){
|
||||
open( "" );
|
||||
}
|
||||
|
||||
void MainFrame::fileSave(){
|
||||
save( tabber.getCurrent() );
|
||||
}
|
||||
|
||||
void MainFrame::fileSaveAs(){
|
||||
if( Editor *e=getEditor() ){
|
||||
string t=e->getName();
|
||||
e->setName( "" );
|
||||
if( !save( tabber.getCurrent() ) ) e->setName( t );
|
||||
currentSet( &tabber,tabber.getCurrent() );
|
||||
}
|
||||
}
|
||||
|
||||
void MainFrame::fileSaveAll(){
|
||||
for( int k=tabber.size()-1;k>=0;--k ){
|
||||
if( !save( k ) ) return;
|
||||
}
|
||||
}
|
||||
|
||||
void MainFrame::filePrint(){
|
||||
if( Editor *e=getEditor() ) e->print();
|
||||
}
|
||||
|
||||
void MainFrame::fileClose(){
|
||||
close( tabber.getCurrent() );
|
||||
}
|
||||
|
||||
void MainFrame::fileCloseAll(){
|
||||
for( int k=tabber.size()-1;k>=0;--k ){
|
||||
if( !close( k ) ) return;
|
||||
}
|
||||
}
|
||||
|
||||
void MainFrame::fileExit(){
|
||||
PostMessage( WM_CLOSE );
|
||||
}
|
||||
|
||||
void MainFrame::fileRecent( UINT id ){
|
||||
id-=333;
|
||||
if( id<0 || id>=prefs.recentFiles.size() ) return;
|
||||
open( prefs.recentFiles[id] );
|
||||
}
|
||||
|
||||
void MainFrame::editCut(){
|
||||
if( Editor *e=getEditor() ) e->cut();
|
||||
}
|
||||
|
||||
void MainFrame::editCopy(){
|
||||
if( Editor *e=getEditor() ) e->copy();
|
||||
}
|
||||
|
||||
void MainFrame::editPaste(){
|
||||
if( Editor *e=getEditor() ) e->paste();
|
||||
}
|
||||
|
||||
void MainFrame::editSelectAll(){
|
||||
if( Editor *e=getEditor() ) e->selectAll();
|
||||
}
|
||||
|
||||
void MainFrame::editFind(){
|
||||
if( Editor *e=getEditor() ) e->find();
|
||||
}
|
||||
|
||||
void MainFrame::editFindNext(){
|
||||
if( Editor *e=getEditor() ) e->findNext( true );
|
||||
}
|
||||
|
||||
void MainFrame::editReplace(){
|
||||
if( Editor *e=getEditor() ) e->replace();
|
||||
}
|
||||
|
||||
static HANDLE startProc( const string &proc ){
|
||||
HANDLE rd,wr;
|
||||
|
||||
SECURITY_ATTRIBUTES sa={sizeof(sa),0,true};
|
||||
|
||||
if( CreatePipe( &rd,&wr,&sa,0 ) ){
|
||||
STARTUPINFO si={sizeof(si)};
|
||||
si.dwFlags=STARTF_USESTDHANDLES;
|
||||
si.hStdOutput=si.hStdError=wr;
|
||||
PROCESS_INFORMATION pi={0};
|
||||
if( CreateProcess( 0,(char*)proc.c_str(),0,0,true,DETACHED_PROCESS,0,0,&si,&pi ) ){
|
||||
CloseHandle( pi.hProcess );
|
||||
CloseHandle( pi.hThread );
|
||||
CloseHandle( wr );
|
||||
return rd;
|
||||
}
|
||||
CloseHandle( rd );
|
||||
CloseHandle( wr );
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
class PDialog : public CDialog{
|
||||
public:
|
||||
void OnOk(){}
|
||||
void OnCancel(){}
|
||||
};
|
||||
|
||||
void MainFrame::compile( const string &cmd ){
|
||||
|
||||
CDialog compiling;
|
||||
compiling.Create( IDD_COMPILING );
|
||||
|
||||
CProgressCtrl *cp=(CProgressCtrl*)compiling.GetDlgItem( IDC_COMPILEPROGRESS );
|
||||
cp->SetStep(20);
|
||||
|
||||
putenv( "blitzide=1" );
|
||||
|
||||
HANDLE rd=startProc( cmd );
|
||||
|
||||
if( !rd ){
|
||||
putenv( "blitzide" );
|
||||
compiling.DestroyWindow();
|
||||
AfxMessageBox( "Error launching compiler",MB_ICONWARNING|MB_OK );
|
||||
return;
|
||||
}
|
||||
|
||||
string line,err;
|
||||
|
||||
//OK....here we go!
|
||||
for(;;){
|
||||
char buff;
|
||||
unsigned long sz;
|
||||
int n=ReadFile( rd,&buff,1,&sz,0 );
|
||||
|
||||
if( n && !sz ) break; //EOF!
|
||||
if( !n && GetLastError()==ERROR_BROKEN_PIPE ) break; //PROC END!
|
||||
if( !n ){ err="Internal Error";break; }
|
||||
|
||||
if( buff=='\r' ) continue;
|
||||
if( buff!='\n' ){ line+=buff;continue; }
|
||||
if( !line.size() ) continue;
|
||||
|
||||
if( line[0]=='\"' ){
|
||||
err=line;
|
||||
int n=line.find( "\"",1 );
|
||||
if( n==string::npos ) break;
|
||||
if( ++n==line.size() || line[n]!=':' ) break;
|
||||
string file=line.substr( 1,n-2 );line=line.substr(n+1);
|
||||
n=line.find( ':' );if( !n || n==string::npos ) break;
|
||||
int row1=atoi(line.substr(0,n));line=line.substr(n+1);
|
||||
n=line.find( ':' );if( !n || n==string::npos ) break;
|
||||
int col1=atoi(line.substr(0,n));line=line.substr(n+1);
|
||||
n=line.find( ':' );if( !n || n==string::npos ) break;
|
||||
int row2=atoi(line.substr(0,n));line=line.substr(n+1);
|
||||
n=line.find( ':' );if( !n || n==string::npos ) break;
|
||||
int col2=atoi(line.substr(0,n));line=line.substr(n+1);
|
||||
|
||||
int pos=((row1-1)<<16)|(col1-1);
|
||||
|
||||
if( !open( file ) ) return;
|
||||
if( Editor *e=getEditor() ) e->setCursor( pos );
|
||||
|
||||
err=line;
|
||||
break;
|
||||
}else if( line.find( "..." )!=line.size()-3 ){
|
||||
err=line;break;
|
||||
}
|
||||
|
||||
if( line.find( "Executing" )==0 ){
|
||||
//OK, we're running!
|
||||
break;
|
||||
}
|
||||
|
||||
cp->StepIt();
|
||||
line="";
|
||||
}
|
||||
|
||||
compiling.DestroyWindow();
|
||||
|
||||
CloseHandle( rd );
|
||||
putenv( "blitzide" );
|
||||
|
||||
if( !err.size() ) return;
|
||||
|
||||
AfxMessageBox( err.c_str(),MB_ICONWARNING|MB_OK );
|
||||
}
|
||||
|
||||
void MainFrame::build( bool exec,bool publish ){
|
||||
Editor *e=getEditor();
|
||||
if( !e ) return;
|
||||
|
||||
string src_file=e->getName();
|
||||
|
||||
for( int k=tabber.size()-1;k>=0;--k ){
|
||||
if( Editor *e=getEditor( k ) ){
|
||||
if( e->getModified() && e->getName().size() ){
|
||||
if( !save(k) ) return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
string opts=" ";
|
||||
|
||||
if( prefs.prg_debug ) opts+="-d ";
|
||||
|
||||
if( publish ){
|
||||
string exe=src_file;
|
||||
if( exe.size() ){
|
||||
int n=exe.find( '.' );
|
||||
if( n!=string::npos ) exe=exe.substr( 0,n );
|
||||
}else{
|
||||
exe="untitled";
|
||||
}
|
||||
|
||||
static char *exeFilter="Executable files (*.exe)|*.exe||";
|
||||
int t=OFN_NOCHANGEDIR|OFN_PATHMUSTEXIST|OFN_OVERWRITEPROMPT;
|
||||
CFileDialog fd( false,"exe",exe.c_str(),t,exeFilter );
|
||||
fd.m_ofn.lpstrTitle="Select executable filename";
|
||||
fd.m_ofn.lpstrInitialDir="./";
|
||||
if( fd.DoModal()==IDCANCEL ) return;
|
||||
|
||||
opts+="-o \""+string( fd.GetPathName() )+"\" ";
|
||||
}else if( !exec ){
|
||||
opts+="-c ";
|
||||
}
|
||||
|
||||
string src=src_file;
|
||||
|
||||
if( !src.size() ){
|
||||
src=prefs.homeDir+"\\tmp\\tmp.bb";
|
||||
int om=ios_base::binary|ios_base::out|ios_base::trunc;
|
||||
ofstream out( src.c_str(),om );
|
||||
if( !out.good() ){
|
||||
string e="Error writing file \""+src+"\"";
|
||||
AfxMessageBox( e.c_str(),MB_ICONWARNING );
|
||||
return;
|
||||
}
|
||||
e->getText( out );
|
||||
out.close();
|
||||
e->setName( src );
|
||||
}else{
|
||||
prefs.prg_lastbuild=e->getName();
|
||||
}
|
||||
|
||||
compile( prefs.homeDir+"/bin/blitzcc -q "+opts+" \""+src+"\" "+prefs.cmd_line );
|
||||
|
||||
if( !src_file.size() ) e->setName( "" );
|
||||
}
|
||||
|
||||
void MainFrame::programExecute(){
|
||||
build( true,false );
|
||||
}
|
||||
|
||||
void MainFrame::programReExecute(){
|
||||
if( prefs.prg_lastbuild.size() && open( prefs.prg_lastbuild ) ){
|
||||
build( true,false );
|
||||
}
|
||||
}
|
||||
|
||||
void MainFrame::programCompile(){
|
||||
build( false,false );
|
||||
}
|
||||
|
||||
void MainFrame::programPublish(){
|
||||
#ifdef DEMO
|
||||
MessageBox( "Create Executable unavailable in demo version","Sorry!",MB_TOPMOST|MB_SETFOREGROUND|MB_ICONINFORMATION );
|
||||
return;
|
||||
#endif
|
||||
Editor *e=getEditor();if( !e ) return;
|
||||
if( prefs.prg_debug ){
|
||||
string t=
|
||||
"You currently have the debugging feature enabled!\n\n"
|
||||
"This will result in slower executables - continue anyway?";
|
||||
if( MessageBox( t.c_str(),0,MB_OKCANCEL )==IDCANCEL ) return;
|
||||
}
|
||||
build( false,true );
|
||||
}
|
||||
|
||||
struct CmdLineDialog : public CDialog{
|
||||
CmdLineDialog():CDialog( IDD_COMMANDLINE ){
|
||||
}
|
||||
|
||||
BOOL OnInitDialog(){
|
||||
CDialog::OnInitDialog();
|
||||
SetDlgItemText( IDC_CMDLINE,prefs.cmd_line.c_str() );
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
void OnOK(){
|
||||
CString c_str;
|
||||
GetDlgItemText( IDC_CMDLINE,c_str );
|
||||
prefs.cmd_line=c_str;
|
||||
CDialog::OnOK();
|
||||
}
|
||||
};
|
||||
|
||||
void MainFrame::programCommandLine(){
|
||||
CmdLineDialog d;
|
||||
d.DoModal();
|
||||
}
|
||||
|
||||
void MainFrame::programDebug(){
|
||||
prefs.prg_debug=!prefs.prg_debug;
|
||||
}
|
||||
|
||||
void MainFrame::helpHome(){
|
||||
HtmlHelp *h=findHelp();
|
||||
string t;
|
||||
t="index.html";
|
||||
h->Navigate( (prefs.homeDir+"/help/"+t).c_str() );
|
||||
}
|
||||
|
||||
void MainFrame::helpAutodoc(){
|
||||
HtmlHelp *h=findHelp();
|
||||
h->Navigate( (prefs.homeDir+"/help/autodoc.html").c_str() );
|
||||
}
|
||||
|
||||
void MainFrame::helpBack(){
|
||||
if( HtmlHelp *h=findHelp() ) h->GoBack();
|
||||
}
|
||||
|
||||
void MainFrame::helpForward(){
|
||||
if( HtmlHelp *h=findHelp() ) h->GoForward();
|
||||
}
|
||||
|
||||
void MainFrame::helpAbout(){
|
||||
aboutBlitz( false );
|
||||
}
|
||||
|
||||
void MainFrame::ctrlTab(){
|
||||
int n=tabber.getCurrent()+1;
|
||||
if( n>=tabber.size() ) n-=tabber.size();
|
||||
tabber.setCurrent( n );
|
||||
}
|
||||
|
||||
void MainFrame::ctrlShiftTab(){
|
||||
int n=tabber.getCurrent()-1;
|
||||
if( n<0 ) n+=tabber.size();
|
||||
tabber.setCurrent( n );
|
||||
}
|
||||
|
||||
void MainFrame::escape(){
|
||||
if( !prefs.win_notoolbar ){
|
||||
toolBar.ShowWindow( SW_HIDE );
|
||||
statusBar.ShowWindow( SW_HIDE );
|
||||
prefs.win_notoolbar=true;
|
||||
}else{
|
||||
toolBar.ShowWindow( SW_SHOW );
|
||||
statusBar.ShowWindow( SW_SHOW );
|
||||
prefs.win_notoolbar=false;
|
||||
}
|
||||
RECT r;GetClientRect( &r );
|
||||
int w=r.right-r.left,h=r.bottom-r.top;
|
||||
int n=prefs.win_maximized ? SIZE_MAXIMIZED : SIZE_RESTORED;
|
||||
PostMessage( WM_SIZE,n,(h<<16)|w );
|
||||
}
|
||||
|
||||
void MainFrame::updateCmdUIRange( CCmdUI *ui ){
|
||||
int n=ui->m_nID-333;
|
||||
if( n>=0 && n<prefs.recentFiles.size() ){
|
||||
ui->Enable( true );
|
||||
}else{
|
||||
ui->Enable( false );
|
||||
}
|
||||
}
|
||||
|
||||
void MainFrame::updateCmdUI( CCmdUI *ui ){
|
||||
int k;
|
||||
|
||||
Editor *e=getEditor();
|
||||
|
||||
switch( ui->m_nID ){
|
||||
case Inew:case ID_OPEN:case ID_HOME:
|
||||
ui->Enable( true );
|
||||
break;
|
||||
case ID_DEBUG:
|
||||
ui->SetCheck( prefs.prg_debug );ui->Enable( true );
|
||||
break;
|
||||
case ID_CLOSE:case ID_PRINT:
|
||||
ui->Enable( !!e );
|
||||
break;
|
||||
case ID_CLOSEALL:
|
||||
for( k=0;k<tabber.size() && !getEditor(k);++k ){}
|
||||
ui->Enable( k<tabber.size() );
|
||||
break;
|
||||
case ID_CUT:case ID_COPY:
|
||||
if( !!e ){
|
||||
ui->Enable( e->canCutCopy() );
|
||||
}else ui->Enable( false );
|
||||
break;
|
||||
case ID_PASTE:
|
||||
if( !!e ){
|
||||
ui->Enable( e->canPaste() );
|
||||
}else ui->Enable( false );
|
||||
break;
|
||||
case ID_SELECTALL:case ID_QUICKHELP:
|
||||
case ID_FIND:case ID_FINDNEXT:case ID_REPLACE:
|
||||
case ID_EXECUTE:case ID_COMPILE:case ID_PUBLISH:
|
||||
ui->Enable( !!e );
|
||||
break;
|
||||
case ID_REEXECUTE:
|
||||
ui->Enable( prefs.prg_lastbuild.size() );
|
||||
break;
|
||||
case ID_COMMANDLINE:
|
||||
ui->Enable( true );
|
||||
break;
|
||||
case ID_SAVE:case ID_SAVEAS:
|
||||
ui->Enable( !!e );
|
||||
break;
|
||||
case ID_SAVEALL:
|
||||
for( k=0;k<tabber.size() && !getEditor(k);++k ){}
|
||||
ui->Enable( k<tabber.size() );
|
||||
break;
|
||||
case ID_BACK:case ID_FORWARD:
|
||||
ui->Enable( getHelp()!=0 );
|
||||
break;
|
||||
case ID_ESCAPE:
|
||||
ui->SetCheck( !prefs.win_notoolbar );
|
||||
break;
|
||||
default:
|
||||
ui->Enable( false );
|
||||
}
|
||||
}
|
||||
|
||||
static string commandURL( const string &t ){
|
||||
|
||||
static char *dirs[]={
|
||||
"help\\commands\\2d_commands\\",
|
||||
"help\\commands\\3d_commands\\",
|
||||
0
|
||||
};
|
||||
|
||||
char **dir_p=dirs;
|
||||
|
||||
while( char *dir=*dir_p++ ){
|
||||
WIN32_FIND_DATA fd;
|
||||
string path=prefs.homeDir+"/"+dir+t+".htm";
|
||||
HANDLE h=FindFirstFile( path.c_str(),&fd );
|
||||
if( h==INVALID_HANDLE_VALUE ) continue;
|
||||
FindClose( h );
|
||||
return path;
|
||||
}
|
||||
return "";
|
||||
}
|
||||
|
||||
void MainFrame::quick_Help(){
|
||||
if( Editor *e=getEditor() ){
|
||||
//look for keyword at cursor...
|
||||
string t=e->getKeyword();if( !t.size() ) return;
|
||||
statusBar.SetPaneText( 0,quickHelp( t ).c_str() );
|
||||
if( t!=last_quick_help ){
|
||||
last_quick_help=t;
|
||||
return;
|
||||
}
|
||||
string url=commandURL( t );
|
||||
if( !url.size() ){
|
||||
string ex="Unable to open help file for \""+t+"\"";
|
||||
AfxMessageBox( ex.c_str(),MB_ICONWARNING );
|
||||
return;
|
||||
}
|
||||
if( HtmlHelp *h=findHelp() ){
|
||||
h->Navigate( url.c_str(),0,0 );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void MainFrame::OnActivate( UINT state,CWnd *other,BOOL min ){
|
||||
CFrameWnd::OnActivate( state,other,min );
|
||||
|
||||
if( Editor *e=getEditor() ){
|
||||
if( state!=WA_ACTIVE && state!=WA_CLICKACTIVE ) return;
|
||||
e->SetFocus();
|
||||
}
|
||||
}
|
||||
@@ -1,195 +0,0 @@
|
||||
|
||||
#include "stdafx.h"
|
||||
#include <winreg.h>
|
||||
#include <iomanip>
|
||||
#include "resource.h"
|
||||
#include "prefs.h"
|
||||
|
||||
#define SWAPRB(x) ( (((x)>>16)&0xff) | ((x)&0xff00) | (((x)&0xff)<<16) )
|
||||
|
||||
Prefs prefs;
|
||||
|
||||
void Prefs::open(){
|
||||
|
||||
char *p=getenv( "blitzpath" );
|
||||
if( !p ){
|
||||
AfxMessageBox( "blitzpath environment variable not found!",MB_TOPMOST|MB_SETFOREGROUND|MB_ICONINFORMATION );
|
||||
ExitProcess(0);
|
||||
}
|
||||
|
||||
homeDir=p;
|
||||
|
||||
AddFontResource( (homeDir+"/cfg/blitz.fon").c_str() );
|
||||
|
||||
setDefault();
|
||||
|
||||
bool prg_windowed;
|
||||
|
||||
ifstream in( (homeDir+"/cfg/blitzide.prefs").c_str() );
|
||||
if( !in.good() ) return;
|
||||
|
||||
while( !in.eof() ){
|
||||
string t;in>>t;
|
||||
if( !t.size() ) continue;
|
||||
while( in.peek()=='\t' ) in.ignore();
|
||||
if( t=="prg_debug" ) in>>prg_debug;
|
||||
else if( t=="prg_lastbuild" ) getline( in,prg_lastbuild );
|
||||
else if( t=="prg_windowed" ) in>>prg_windowed;
|
||||
else if( t=="win_maximized" ) in>>win_maximized;
|
||||
else if( t=="win_notoolbar" ) in>>win_notoolbar;
|
||||
else if( t=="win_rect" ){
|
||||
in>>win_rect.left;in>>win_rect.top;
|
||||
in>>win_rect.right;in>>win_rect.bottom;
|
||||
}else if( t.substr( 0,5 )=="font_" ){
|
||||
string s;int h;in>>s;in>>h;
|
||||
t=t.substr( 5 );
|
||||
if( t=="editor" ){
|
||||
font_editor=s;font_editor_height=h;
|
||||
}else if( t=="tabs" ){
|
||||
font_tabs=s;font_tabs_height=h;
|
||||
}else if( t=="debug" ){
|
||||
font_debug=s;font_debug_height=h;
|
||||
}
|
||||
}else if( t.substr( 0,4 )=="rgb_" ){
|
||||
t=t.substr(4);
|
||||
string s;in>>s;int rgb=0;
|
||||
for( int k=0;k<s.size();++k ){
|
||||
int n=s[k];rgb=(rgb<<4)|(n<='9'?n-'0':(n&31)+9);
|
||||
}
|
||||
rgb=SWAPRB(rgb);
|
||||
|
||||
if( t=="bkgrnd" ) rgb_bkgrnd=rgb;
|
||||
else if( t=="string" ) rgb_string=rgb;
|
||||
else if( t=="ident" ) rgb_ident=rgb;
|
||||
else if( t=="keyword" ) rgb_keyword=rgb;
|
||||
else if( t=="comment" ) rgb_comment=rgb;
|
||||
else if( t=="digit" ) rgb_digit=rgb;
|
||||
else if( t=="default" ) rgb_default=rgb;
|
||||
}else if( t=="edit_tabs" ){
|
||||
in>>edit_tabs;
|
||||
}else if( t=="edit_blkcursor" ){
|
||||
in>>edit_blkcursor;
|
||||
}else if( t=="edit_backup" ){
|
||||
in>>edit_backup;
|
||||
}else if( t=="img_toolbar" ){
|
||||
getline( in,img_toolbar );
|
||||
}else if( t=="cmd_line" ){
|
||||
getline( in,cmd_line );
|
||||
}else if( t=="file_recent" ){
|
||||
string l;getline( in,l );
|
||||
if( recentFiles.size()<10 ) recentFiles.push_back( l );
|
||||
}else{
|
||||
string s="Unrecognized option '"+t+"' in blitzide.prefs";
|
||||
AfxMessageBox( "Error in preferences file" );
|
||||
setDefault();
|
||||
return;
|
||||
}
|
||||
}
|
||||
createFonts();
|
||||
}
|
||||
|
||||
void Prefs::close(){
|
||||
|
||||
ofstream out( (homeDir+"/cfg/blitzide.prefs").c_str() );
|
||||
if( !out.good() ) return;
|
||||
|
||||
out<<"prg_debug\t"<<prg_debug<<endl;
|
||||
out<<"prg_lastbuild\t"<<prg_lastbuild<<endl;
|
||||
out<<"win_maximized\t"<<win_maximized<<endl;
|
||||
out<<"win_notoolbar\t"<<win_notoolbar<<endl;
|
||||
out<<"win_rect\t"<<win_rect.left<<' '<<win_rect.top<<' '<<win_rect.right<<' '<<win_rect.bottom<<endl;
|
||||
out<<"font_editor\t"<<font_editor<<' '<<font_editor_height<<endl;
|
||||
out<<"font_tabs\t"<<font_tabs<<' '<<font_tabs_height<<endl;
|
||||
out<<"font_debug\t"<<font_debug<<' '<<font_debug_height<<endl;
|
||||
out<<hex;
|
||||
out<<"rgb_bkgrnd\t"<<SWAPRB(rgb_bkgrnd)<<endl;
|
||||
out<<"rgb_string\t"<<SWAPRB(rgb_string)<<endl;
|
||||
out<<"rgb_ident\t"<<SWAPRB(rgb_ident)<<endl;
|
||||
out<<"rgb_keyword\t"<<SWAPRB(rgb_keyword)<<endl;
|
||||
out<<"rgb_comment\t"<<SWAPRB(rgb_comment)<<endl;
|
||||
out<<"rgb_digit\t"<<SWAPRB(rgb_digit)<<endl;
|
||||
out<<"rgb_default\t"<<SWAPRB(rgb_default)<<endl;
|
||||
out<<"edit_tabs\t"<<edit_tabs<<endl;
|
||||
out<<"edit_blkcursor\t"<<edit_blkcursor<<endl;
|
||||
out<<"edit_backup\t"<<edit_backup<<endl;
|
||||
out<<"img_toolbar\t"<<img_toolbar<<endl;
|
||||
out<<"cmd_line\t"<<cmd_line<<endl;
|
||||
for( int k=0;k<recentFiles.size();++k ){
|
||||
out<<"file_recent\t"<<recentFiles[k]<<endl;
|
||||
}
|
||||
out<<dec;
|
||||
|
||||
RemoveFontResource( (homeDir+"/cfg/blitz.fon").c_str() );
|
||||
}
|
||||
|
||||
void Prefs::setDefault(){
|
||||
|
||||
prg_debug=true;
|
||||
|
||||
win_rect.left=win_rect.top=0;
|
||||
win_rect.right=640;win_rect.bottom=480;
|
||||
win_maximized=false;
|
||||
win_notoolbar=false;
|
||||
#ifdef PLUS
|
||||
font_editor="courier";
|
||||
font_editor_height=10;
|
||||
#else
|
||||
font_editor="Consolas";
|
||||
font_editor_height=10;
|
||||
#endif
|
||||
font_tabs="verdana";
|
||||
font_tabs_height=8;
|
||||
font_debug="verdana";
|
||||
font_debug_height=8;
|
||||
|
||||
#ifdef PRO
|
||||
rgb_bkgrnd=RGB( 0x22,0x55,0x88 );
|
||||
rgb_string=RGB( 0x00,0xff,0x66 );
|
||||
rgb_ident=RGB( 0xff,0xff,0xff );
|
||||
rgb_keyword=RGB( 0xaa,0xff,0xff );
|
||||
rgb_comment=RGB( 0xff,0xee,0x00 );
|
||||
rgb_digit=RGB( 0x33,0xff,0xdd );
|
||||
rgb_default=RGB( 0xee,0xee,0xee );
|
||||
#else
|
||||
#ifdef PLUS
|
||||
rgb_bkgrnd= SWAPRB(0x225577);
|
||||
rgb_string= SWAPRB(0x00ffff);
|
||||
rgb_ident= SWAPRB(0xffffff);
|
||||
rgb_keyword=SWAPRB(0xffff00);
|
||||
rgb_comment=SWAPRB(0x00ff00);
|
||||
rgb_digit= SWAPRB(0x00ffff);
|
||||
rgb_default=SWAPRB(0xffffff);
|
||||
#else
|
||||
rgb_bkgrnd=RGB( 32,96,96 );
|
||||
rgb_string=RGB( 0,255,0 );
|
||||
rgb_ident=RGB( 255,255,255 );
|
||||
rgb_keyword=RGB( 255,231,95 );
|
||||
rgb_comment=RGB( 0,255,255 );
|
||||
rgb_digit=RGB( 200,240,255 );
|
||||
rgb_default=RGB( 255,240,200 );
|
||||
#endif
|
||||
#endif
|
||||
|
||||
edit_tabs=4;
|
||||
edit_blkcursor=false;
|
||||
edit_backup=2;
|
||||
|
||||
img_toolbar="toolbar.bmp";
|
||||
|
||||
recentFiles.clear();
|
||||
|
||||
createFonts();
|
||||
}
|
||||
|
||||
void Prefs::createFonts(){
|
||||
|
||||
editFont.Detach();
|
||||
tabsFont.Detach();
|
||||
debugFont.Detach();
|
||||
conFont.Detach();
|
||||
|
||||
editFont.CreatePointFont( font_editor_height*10,font_editor.c_str() );
|
||||
tabsFont.CreatePointFont( font_tabs_height*10,font_tabs.c_str() );
|
||||
debugFont.CreatePointFont( font_debug_height*10,font_debug.c_str() );
|
||||
conFont.CreatePointFont( 80,"courier" );
|
||||
}
|
||||
@@ -1,163 +0,0 @@
|
||||
|
||||
#include "stdafx.h"
|
||||
#include "tabber.h"
|
||||
|
||||
IMPLEMENT_DYNAMIC( Tabber,CTabCtrl )
|
||||
BEGIN_MESSAGE_MAP( Tabber,CTabCtrl )
|
||||
ON_WM_SIZE()
|
||||
ON_WM_ERASEBKGND()
|
||||
ON_NOTIFY_REFLECT( TCN_SELCHANGE,tcn_selChange )
|
||||
END_MESSAGE_MAP()
|
||||
|
||||
static CRect tabsRect( CTabCtrl &t ){
|
||||
CRect r(0,0,0,0);
|
||||
int n=t.GetItemCount();
|
||||
for( int k=0;k<n;++k ){
|
||||
CRect c;
|
||||
t.GetItemRect( k,&c );
|
||||
if( c.left<r.left ) r.left=c.left;
|
||||
if( c.right>r.right ) r.right=c.right;
|
||||
if( c.top<r.top ) r.top=c.top;
|
||||
if( c.bottom>r.bottom ) r.bottom=c.bottom;
|
||||
}
|
||||
return r;
|
||||
}
|
||||
|
||||
CRect Tabber::getInnerRect(){
|
||||
CRect r;
|
||||
GetClientRect( &r );
|
||||
int x=2,y=2,w=r.Width()-4,h=r.Height()-4;
|
||||
|
||||
r=tabsRect( *this );
|
||||
h-=r.Height();y+=r.Height();
|
||||
|
||||
r.left=x;r.top=y;r.right=x+w;r.bottom=y+h;
|
||||
return r;
|
||||
}
|
||||
|
||||
Tabber::Tabber():
|
||||
listener(0),curr(-1){
|
||||
}
|
||||
|
||||
Tabber::~Tabber(){
|
||||
for( ;tabs.size();tabs.pop_back() ) delete tabs.back();
|
||||
}
|
||||
|
||||
void Tabber::OnSize( UINT type,int w,int h ){
|
||||
CTabCtrl::OnSize( type,w,h );
|
||||
refresh();
|
||||
}
|
||||
|
||||
BOOL Tabber::OnEraseBkgnd( CDC *dc ){
|
||||
CRect c;GetClientRect( &c );
|
||||
|
||||
HBRUSH hb=(HBRUSH)GetClassLong( m_hWnd,GCL_HBRBACKGROUND );
|
||||
CBrush br;br.Attach( hb );
|
||||
|
||||
if( curr<0 ) dc->FillRect( &c,&br );
|
||||
else{
|
||||
CRect i=getInnerRect();
|
||||
CRect t( c.left,c.top,i.right,i.top );dc->FillRect( &t,&br );
|
||||
CRect r( i.right,c.top,c.right,i.bottom );dc->FillRect( &r,&br );
|
||||
CRect b( i.left,i.bottom,c.right,c.bottom );dc->FillRect( &b,&br );
|
||||
CRect l( c.left,i.top,i.left,c.bottom );dc->FillRect( &l,&br );
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
void Tabber::setListener( TabberListener *l ){
|
||||
listener=l;
|
||||
}
|
||||
|
||||
void Tabber::refresh(){
|
||||
if( curr<0 ) return;
|
||||
|
||||
CRect r=getInnerRect();
|
||||
CWnd *wnd=getTabWnd( curr );
|
||||
wnd->MoveWindow( r.left,r.top,r.Width(),r.Height() );
|
||||
wnd->ShowWindow( SW_SHOW );
|
||||
wnd->SetFocus();
|
||||
}
|
||||
|
||||
Tabber::Tab *Tabber::getTab( int index )const{
|
||||
if( index<0 || index>=tabs.size() ) return 0;
|
||||
Tabs::const_iterator it=tabs.begin();
|
||||
while( index-- ) ++it;
|
||||
return *it;
|
||||
}
|
||||
|
||||
void Tabber::tcn_selChange( NMHDR *p,LRESULT *result ){
|
||||
setCurrent( GetCurSel() );
|
||||
}
|
||||
|
||||
void Tabber::insert( int index,CWnd *w,const string &t ){
|
||||
if( index<0 || index>tabs.size() ) return;
|
||||
|
||||
Tabs::iterator it=tabs.begin();
|
||||
for( int k=0;k<index;++k ) ++it;
|
||||
Tab *tab=new Tab( w,t );
|
||||
tabs.insert( it,tab );
|
||||
|
||||
InsertItem( index,t.c_str() );
|
||||
if( curr<0 ) setCurrent( index );
|
||||
}
|
||||
|
||||
void Tabber::remove( int index ){
|
||||
if( index<0 || index>=tabs.size() ) return;
|
||||
|
||||
CWnd *w=getTabWnd( index );
|
||||
|
||||
Tabs::iterator it=tabs.begin();
|
||||
for( int k=0;k<index;++k ) ++it;
|
||||
delete *it;tabs.erase( it );
|
||||
DeleteItem( index );
|
||||
|
||||
if( curr>=tabs.size() ) curr=tabs.size()-1;
|
||||
|
||||
refresh();
|
||||
if( curr>=0 ) SetCurSel( curr );
|
||||
if( w ) w->ShowWindow( SW_HIDE );
|
||||
if( listener ) listener->currentSet( this,curr );
|
||||
}
|
||||
|
||||
void Tabber::setCurrent( int index ){
|
||||
if( index<0 || index>=tabs.size() ) return;
|
||||
|
||||
if( index!=curr ){
|
||||
CWnd *w=getTabWnd( curr );
|
||||
curr=index;
|
||||
|
||||
refresh();
|
||||
SetCurSel( curr );
|
||||
if( w ) w->ShowWindow( SW_HIDE );
|
||||
}
|
||||
|
||||
if( listener ) listener->currentSet( this,curr );
|
||||
}
|
||||
|
||||
void Tabber::setTabText( int index,const string &t ){
|
||||
if( index<0 || index>=tabs.size() ) return;
|
||||
|
||||
string s=t+'\0';
|
||||
TCITEM tc={ TCIF_TEXT };
|
||||
tc.pszText=(char*)s.data();
|
||||
SetItem( index,&tc );
|
||||
}
|
||||
|
||||
int Tabber::size()const{
|
||||
return tabs.size();
|
||||
}
|
||||
|
||||
int Tabber::getCurrent()const{
|
||||
return curr;
|
||||
}
|
||||
|
||||
CWnd *Tabber::getTabWnd( int index )const{
|
||||
Tab *t=getTab( index );
|
||||
return t ? t->wnd : 0;
|
||||
}
|
||||
|
||||
string Tabber::getTabText( int index )const{
|
||||
Tab *t=getTab( index );
|
||||
return t ? t->text : "";
|
||||
}
|
||||
@@ -1,80 +0,0 @@
|
||||
|
||||
#include <string>
|
||||
#include <windows.h>
|
||||
|
||||
#include "checkdx.h"
|
||||
#include "checkie.h"
|
||||
|
||||
using namespace std;
|
||||
|
||||
static const char *dx_err=
|
||||
"You must have DirectX version 7 installed to run Blitz Basic.\n\n"
|
||||
"DirectX 7 is provided on the Blitz Basic CD in the DirectX7 folder.\n\n"
|
||||
"The latest version of DirectX is available from www.microsoft.com";
|
||||
|
||||
static const char *ie_err=
|
||||
"You must have Internet Explorer version 4 installed to run Blitz Basic.\n\n"
|
||||
"Internet Explorer 5 is provided on the Blitz Basic CD in the IExplorer5 folder.\n\n"
|
||||
"The latest version of Internet Explorer is available from www.microsoft.com";
|
||||
|
||||
static const char *bb_err=
|
||||
"Unable to run Blitz Basic";
|
||||
|
||||
static const char *md_err=
|
||||
"Your desktop must be in high-colour mode to use Blitz Basic.\n\n"
|
||||
"You can change your display settings from the control panel.";
|
||||
|
||||
static string getAppDir(){
|
||||
char buff[MAX_PATH];
|
||||
if( GetModuleFileName( 0,buff,MAX_PATH ) ){
|
||||
string t=buff;
|
||||
int n=t.find_last_of( '\\' );
|
||||
if( n!=string::npos ) t=t.substr( 0,n );
|
||||
return t;
|
||||
}
|
||||
return "";
|
||||
}
|
||||
|
||||
static void fail( const char *p ){
|
||||
::MessageBox( 0,p,"Blitz Basic Error",MB_SETFOREGROUND|MB_TOPMOST|MB_ICONERROR );
|
||||
ExitProcess(-1);
|
||||
}
|
||||
|
||||
static int desktopDepth(){
|
||||
HDC hdc=GetDC( GetDesktopWindow() );
|
||||
return GetDeviceCaps( hdc,BITSPIXEL );
|
||||
}
|
||||
|
||||
int _stdcall WinMain( HINSTANCE inst,HINSTANCE prev,char *cmd,int show ){
|
||||
|
||||
if( desktopDepth()<16 ) fail( md_err );
|
||||
|
||||
#ifndef PLUS
|
||||
if( getDXVersion()<7 ) fail( dx_err );
|
||||
#endif
|
||||
|
||||
if( getIEVersion()<4 ) fail( ie_err );
|
||||
|
||||
//Ugly hack to get application dir...
|
||||
string blitzIdePath=getAppDir();
|
||||
_putenv( ("blitzpath="+blitzIdePath).c_str() );
|
||||
SetCurrentDirectory( blitzIdePath.c_str() );
|
||||
blitzIdePath=blitzIdePath+"\\bin\\ide.exe "+cmd;
|
||||
|
||||
STARTUPINFO si;
|
||||
PROCESS_INFORMATION pi;
|
||||
ZeroMemory(&si,sizeof(si));si.cb=sizeof(si);
|
||||
if( !CreateProcess( 0,(char*)blitzIdePath.c_str(),0,0,0,0,0,0,&si,&pi ) ){
|
||||
::MessageBox( 0,bb_err,"Blitz Basic Error",MB_SETFOREGROUND|MB_TOPMOST|MB_ICONERROR );
|
||||
ExitProcess(-1);
|
||||
}
|
||||
|
||||
//wait for BB to start
|
||||
WaitForInputIdle( pi.hProcess,INFINITE );
|
||||
|
||||
// Close process and thread handles.
|
||||
CloseHandle( pi.hProcess );
|
||||
CloseHandle( pi.hThread );
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -1,179 +0,0 @@
|
||||
# Microsoft Developer Studio Project File - Name="bblaunch" - Package Owner=<4>
|
||||
# Microsoft Developer Studio Generated Build File, Format Version 6.00
|
||||
# ** DO NOT EDIT **
|
||||
|
||||
# TARGTYPE "Win32 (x86) Application" 0x0101
|
||||
|
||||
CFG=bblaunch - Win32 Debug
|
||||
!MESSAGE This is not a valid makefile. To build this project using NMAKE,
|
||||
!MESSAGE use the Export Makefile command and run
|
||||
!MESSAGE
|
||||
!MESSAGE NMAKE /f "bblaunch.mak".
|
||||
!MESSAGE
|
||||
!MESSAGE You can specify a configuration when running NMAKE
|
||||
!MESSAGE by defining the macro CFG on the command line. For example:
|
||||
!MESSAGE
|
||||
!MESSAGE NMAKE /f "bblaunch.mak" CFG="bblaunch - Win32 Debug"
|
||||
!MESSAGE
|
||||
!MESSAGE Possible choices for configuration are:
|
||||
!MESSAGE
|
||||
!MESSAGE "bblaunch - Win32 Release" (based on "Win32 (x86) Application")
|
||||
!MESSAGE "bblaunch - Win32 Debug" (based on "Win32 (x86) Application")
|
||||
!MESSAGE "bblaunch - Win32 Blitz3DRelease" (based on "Win32 (x86) Application")
|
||||
!MESSAGE "bblaunch - Win32 Blitz2DRelease" (based on "Win32 (x86) Application")
|
||||
!MESSAGE
|
||||
|
||||
# Begin Project
|
||||
# PROP AllowPerConfigDependencies 0
|
||||
# PROP Scc_ProjName ""
|
||||
# PROP Scc_LocalPath ""
|
||||
CPP=cl.exe
|
||||
MTL=midl.exe
|
||||
RSC=rc.exe
|
||||
|
||||
!IF "$(CFG)" == "bblaunch - Win32 Release"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 0
|
||||
# PROP BASE Output_Dir "Release"
|
||||
# PROP BASE Intermediate_Dir "Release"
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 0
|
||||
# PROP Output_Dir "Release"
|
||||
# PROP Intermediate_Dir "Release"
|
||||
# PROP Ignore_Export_Lib 0
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /YX /FD /c
|
||||
# ADD CPP /nologo /MT /W3 /GX /O1 /Ob2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /YX /FD /c
|
||||
# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32
|
||||
# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
|
||||
# ADD BASE RSC /l 0x409 /d "NDEBUG"
|
||||
# ADD RSC /l 0x409 /d "NDEBUG"
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LINK32=link.exe
|
||||
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /machine:I386
|
||||
# ADD LINK32 dxguid.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /machine:I386 /out:"..\blitzbasic\blitzbasic.exe"
|
||||
|
||||
!ELSEIF "$(CFG)" == "bblaunch - Win32 Debug"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 1
|
||||
# PROP BASE Output_Dir "Debug"
|
||||
# PROP BASE Intermediate_Dir "Debug"
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 1
|
||||
# PROP Output_Dir "Debug"
|
||||
# PROP Intermediate_Dir "Debug"
|
||||
# PROP Ignore_Export_Lib 0
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /YX /FD /GZ /c
|
||||
# ADD CPP /nologo /MTd /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /YX /FD /GZ /c
|
||||
# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32
|
||||
# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32
|
||||
# ADD BASE RSC /l 0x409 /d "_DEBUG"
|
||||
# ADD RSC /l 0x409 /d "_DEBUG"
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LINK32=link.exe
|
||||
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept
|
||||
# ADD LINK32 dxguid.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /incremental:no /debug /machine:I386 /out:"..\blitzbasic\blitzbasic.exe" /fixed:no
|
||||
# SUBTRACT LINK32 /pdb:none
|
||||
|
||||
!ELSEIF "$(CFG)" == "bblaunch - Win32 Blitz3DRelease"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 0
|
||||
# PROP BASE Output_Dir "bblaunch___Win32_Blitz3DRelease"
|
||||
# PROP BASE Intermediate_Dir "bblaunch___Win32_Blitz3DRelease"
|
||||
# PROP BASE Ignore_Export_Lib 0
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 0
|
||||
# PROP Output_Dir "bblaunch___Win32_Blitz3DRelease"
|
||||
# PROP Intermediate_Dir "bblaunch___Win32_Blitz3DRelease"
|
||||
# PROP Ignore_Export_Lib 0
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /MT /W3 /GX /O1 /Ob2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /YX /FD /c
|
||||
# ADD CPP /nologo /G6 /Gz /MT /W3 /GX /O1 /D "_WINDOWS" /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "PRO" /FD /c
|
||||
# SUBTRACT CPP /YX
|
||||
# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32
|
||||
# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
|
||||
# ADD BASE RSC /l 0x409 /d "NDEBUG"
|
||||
# ADD RSC /l 0x409 /d "NDEBUG"
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LINK32=link.exe
|
||||
# ADD BASE LINK32 dxguid.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /machine:I386 /out:"..\blitzbasic\blitzbasic.exe"
|
||||
# ADD LINK32 dxguid.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /machine:I386 /out:"../_release/Blitz3D.exe"
|
||||
|
||||
!ELSEIF "$(CFG)" == "bblaunch - Win32 Blitz2DRelease"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 0
|
||||
# PROP BASE Output_Dir "bblaunch___Win32_Blitz2DRelease"
|
||||
# PROP BASE Intermediate_Dir "bblaunch___Win32_Blitz2DRelease"
|
||||
# PROP BASE Ignore_Export_Lib 0
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 0
|
||||
# PROP Output_Dir "bblaunch___Win32_Blitz2DRelease"
|
||||
# PROP Intermediate_Dir "bblaunch___Win32_Blitz2DRelease"
|
||||
# PROP Ignore_Export_Lib 0
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /MT /W3 /GX /O1 /Ob2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /YX /FD /c
|
||||
# ADD CPP /nologo /MT /W3 /GX /O1 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /YX /FD /c
|
||||
# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32
|
||||
# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
|
||||
# ADD BASE RSC /l 0x409 /d "NDEBUG"
|
||||
# ADD RSC /l 0x409 /d "NDEBUG"
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LINK32=link.exe
|
||||
# ADD BASE LINK32 dxguid.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /machine:I386 /out:"..\..\release\blitz3drelease\Blitz3D.exe"
|
||||
# ADD LINK32 dxguid.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /machine:I386 /out:"..\..\release\blitz2drelease\BlitzBasic.exe"
|
||||
|
||||
!ENDIF
|
||||
|
||||
# Begin Target
|
||||
|
||||
# Name "bblaunch - Win32 Release"
|
||||
# Name "bblaunch - Win32 Debug"
|
||||
# Name "bblaunch - Win32 Blitz3DRelease"
|
||||
# Name "bblaunch - Win32 Blitz2DRelease"
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\bblaunch.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\bblaunch.ico
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\bblaunch.rc
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\checkdx.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\checkdx.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\checkie.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\checkie.h
|
||||
# End Source File
|
||||
# End Target
|
||||
# End Project
|
||||
@@ -1,252 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup Label="ProjectConfigurations">
|
||||
<ProjectConfiguration Include="Debug|Win32">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|Win32">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="RelWithDebInfo|Win32">
|
||||
<Configuration>RelWithDebInfo</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
</ItemGroup>
|
||||
<PropertyGroup Label="Globals">
|
||||
<SccProjectName />
|
||||
<SccLocalPath />
|
||||
<ProjectGuid>{C74A383E-81B0-4679-AAC9-535C94C92EA5}</ProjectGuid>
|
||||
<ProjectName>BlitzBasicLauncher</ProjectName>
|
||||
<WindowsTargetPlatformVersion>10.0.17763.0</WindowsTargetPlatformVersion>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<PlatformToolset>v141</PlatformToolset>
|
||||
<UseOfMfc>false</UseOfMfc>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='RelWithDebInfo|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<PlatformToolset>v140_xp</PlatformToolset>
|
||||
<UseOfMfc>false</UseOfMfc>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<PlatformToolset>v140_xp</PlatformToolset>
|
||||
<UseOfMfc>false</UseOfMfc>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||
<ImportGroup Label="ExtensionSettings">
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
<Import Project="$(VCTargetsPath)Microsoft.Cpp.UpgradeFromVC60.props" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='RelWithDebInfo|Win32'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
<Import Project="$(VCTargetsPath)Microsoft.Cpp.UpgradeFromVC60.props" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
<Import Project="$(VCTargetsPath)Microsoft.Cpp.UpgradeFromVC60.props" />
|
||||
</ImportGroup>
|
||||
<PropertyGroup Label="UserMacros" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<OutDir>..\#Build\$(ProjectName)\$(Configuration)-$(PlatformTarget)\</OutDir>
|
||||
<IntDir>..\#Intermediate\$(ProjectName)\$(Configuration)-$(PlatformTarget)\</IntDir>
|
||||
<LinkIncremental>false</LinkIncremental>
|
||||
<IncludePath>C:\Program Files (x86)\Windows Kits\10\Include\10.0.14393.0\shared;C:\Program Files (x86)\Windows Kits\10\Include\10.0.14393.0\um;$(IncludePath)</IncludePath>
|
||||
<LibraryPath>C:\Program Files (x86)\Windows Kits\10\Lib\10.0.14393.0\um\x86;$(LibraryPath)</LibraryPath>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<OutDir>..\#Build\$(ProjectName)\$(Configuration)-$(PlatformTarget)\</OutDir>
|
||||
<IntDir>..\#Intermediate\$(ProjectName)\$(Configuration)-$(PlatformTarget)\</IntDir>
|
||||
<LinkIncremental>false</LinkIncremental>
|
||||
<IncludePath>C:\Program Files (x86)\Windows Kits\10\Include\10.0.14393.0\shared;C:\Program Files (x86)\Windows Kits\10\Include\10.0.14393.0\um;$(IncludePath)</IncludePath>
|
||||
<LibraryPath>C:\Program Files (x86)\Windows Kits\10\Lib\10.0.14393.0\um\x86;$(LibraryPath)</LibraryPath>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='RelWithDebInfo|Win32'">
|
||||
<OutDir>..\#Build\$(ProjectName)\$(Configuration)-$(PlatformTarget)\</OutDir>
|
||||
<IntDir>..\#Intermediate\$(ProjectName)\$(Configuration)-$(PlatformTarget)\</IntDir>
|
||||
<LinkIncremental>false</LinkIncremental>
|
||||
<IncludePath>C:\Program Files (x86)\Windows Kits\10\Include\10.0.14393.0\shared;C:\Program Files (x86)\Windows Kits\10\Include\10.0.14393.0\um;$(IncludePath)</IncludePath>
|
||||
<LibraryPath>C:\Program Files (x86)\Windows Kits\10\Lib\10.0.14393.0\um\x86;$(LibraryPath)</LibraryPath>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<ClCompile>
|
||||
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
|
||||
<FunctionLevelLinking>false</FunctionLevelLinking>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<MinimalRebuild>true</MinimalRebuild>
|
||||
<PreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;WIN32;DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<BasicRuntimeChecks>Default</BasicRuntimeChecks>
|
||||
<ControlFlowGuard>false</ControlFlowGuard>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<CallingConvention>StdCall</CallingConvention>
|
||||
<ExceptionHandling>Async</ExceptionHandling>
|
||||
<RemoveUnreferencedCodeData>false</RemoveUnreferencedCodeData>
|
||||
</ClCompile>
|
||||
<Midl>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<TypeLibraryName>.\Debug\bblaunch.tlb</TypeLibraryName>
|
||||
<MkTypLibCompatible>true</MkTypLibCompatible>
|
||||
<TargetEnvironment>Win32</TargetEnvironment>
|
||||
</Midl>
|
||||
<ResourceCompile>
|
||||
<Culture>0x0409</Culture>
|
||||
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
</ResourceCompile>
|
||||
<Bscmake>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<OutputFile>.\Debug\bblaunch.bsc</OutputFile>
|
||||
</Bscmake>
|
||||
<Link>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<AdditionalOptions> /FIXED:NO</AdditionalOptions>
|
||||
<AdditionalDependencies>dxguid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<ClCompile>
|
||||
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
|
||||
<FunctionLevelLinking>false</FunctionLevelLinking>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<PreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;WIN32;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<MinimalRebuild>true</MinimalRebuild>
|
||||
<ControlFlowGuard>false</ControlFlowGuard>
|
||||
<CallingConvention>StdCall</CallingConvention>
|
||||
<ExceptionHandling>Async</ExceptionHandling>
|
||||
<RemoveUnreferencedCodeData>false</RemoveUnreferencedCodeData>
|
||||
<Optimization>Full</Optimization>
|
||||
<InlineFunctionExpansion>AnySuitable</InlineFunctionExpansion>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
|
||||
<OmitFramePointers>true</OmitFramePointers>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<StructMemberAlignment>4Bytes</StructMemberAlignment>
|
||||
<BufferSecurityCheck>false</BufferSecurityCheck>
|
||||
<EnableParallelCodeGeneration>true</EnableParallelCodeGeneration>
|
||||
<EnableEnhancedInstructionSet>StreamingSIMDExtensions2</EnableEnhancedInstructionSet>
|
||||
<FloatingPointModel>Fast</FloatingPointModel>
|
||||
<RuntimeTypeInfo>false</RuntimeTypeInfo>
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
<CompileAsManaged>false</CompileAsManaged>
|
||||
<SDLCheck>
|
||||
</SDLCheck>
|
||||
<MultiProcessorCompilation>false</MultiProcessorCompilation>
|
||||
<EnableFiberSafeOptimizations>true</EnableFiberSafeOptimizations>
|
||||
</ClCompile>
|
||||
<Midl>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<TypeLibraryName>.\Release\bblaunch.tlb</TypeLibraryName>
|
||||
<MkTypLibCompatible>true</MkTypLibCompatible>
|
||||
<TargetEnvironment>Win32</TargetEnvironment>
|
||||
</Midl>
|
||||
<ResourceCompile>
|
||||
<Culture>0x0409</Culture>
|
||||
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
</ResourceCompile>
|
||||
<Bscmake>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<OutputFile>.\Release\bblaunch.bsc</OutputFile>
|
||||
</Bscmake>
|
||||
<Link>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<AdditionalDependencies>dxguid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='RelWithDebInfo|Win32'">
|
||||
<ClCompile>
|
||||
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
|
||||
<FunctionLevelLinking>false</FunctionLevelLinking>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<PreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;WIN32;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<MinimalRebuild>true</MinimalRebuild>
|
||||
<ControlFlowGuard>false</ControlFlowGuard>
|
||||
<CallingConvention>StdCall</CallingConvention>
|
||||
<ExceptionHandling>Async</ExceptionHandling>
|
||||
<RemoveUnreferencedCodeData>false</RemoveUnreferencedCodeData>
|
||||
</ClCompile>
|
||||
<Midl>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<TypeLibraryName>.\Release\bblaunch.tlb</TypeLibraryName>
|
||||
<MkTypLibCompatible>true</MkTypLibCompatible>
|
||||
<TargetEnvironment>Win32</TargetEnvironment>
|
||||
</Midl>
|
||||
<ResourceCompile>
|
||||
<Culture>0x0409</Culture>
|
||||
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
</ResourceCompile>
|
||||
<Bscmake>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<OutputFile>.\Release\bblaunch.bsc</OutputFile>
|
||||
</Bscmake>
|
||||
<Link>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<AdditionalDependencies>dxguid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="bblaunch.cpp" />
|
||||
<ClCompile Include="checkdx.cpp" />
|
||||
<ClCompile Include="checkie.cpp" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Image Include="bblaunch.ico" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ResourceCompile Include="bblaunch.rc" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="checkdx.h" />
|
||||
<ClInclude Include="checkie.h" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\blitz3d\blitz3d.vcxproj">
|
||||
<Project>{be0ba538-6215-4836-9227-1d3627e40d61}</Project>
|
||||
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\blitz\blitz.vcxproj">
|
||||
<Project>{c23af61e-9509-411f-933e-17db18884b21}</Project>
|
||||
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\compiler\compiler.vcxproj">
|
||||
<Project>{d884a075-e3b8-44e1-838d-74f28b33391b}</Project>
|
||||
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\config\config.vcxproj">
|
||||
<Project>{3e355353-96d8-4aaf-bf95-8e6ca0d4b1ba}</Project>
|
||||
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\debugger\debugger.vcxproj">
|
||||
<Project>{4132c330-95d9-4f68-a51a-3b90381587c5}</Project>
|
||||
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\gxruntime\gxruntime.vcxproj">
|
||||
<Project>{ff2d8bf7-1930-4cab-bc48-05cd33b7dc18}</Project>
|
||||
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\stdutil\stdutil.vcxproj">
|
||||
<Project>{6bcfc5ca-ea71-4ae9-8b96-28b8701f939e}</Project>
|
||||
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
</ImportGroup>
|
||||
</Project>
|
||||
@@ -1,343 +0,0 @@
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// File: GetDXVer.cpp
|
||||
//
|
||||
// Desc: Demonstrates how applications can detect what version of DirectX
|
||||
// is installed.
|
||||
//
|
||||
// (C) Copyright 1995-1997 Microsoft Corp. All rights reserved.
|
||||
//-----------------------------------------------------------------------------
|
||||
#include <windows.h>
|
||||
#include <windowsx.h>
|
||||
#include <ddraw.h>
|
||||
#define DIRECTINPUT_VERSION 0x0700
|
||||
#include <dinput.h>
|
||||
//#include <dmusici.h>
|
||||
|
||||
typedef HRESULT(WINAPI * DIRECTDRAWCREATE)( GUID*, LPDIRECTDRAW*, IUnknown* );
|
||||
typedef HRESULT(WINAPI * DIRECTDRAWCREATEEX)( GUID*, VOID**, REFIID, IUnknown* );
|
||||
typedef HRESULT(WINAPI * DIRECTINPUTCREATE)( HINSTANCE, DWORD, LPDIRECTINPUT*,
|
||||
IUnknown* );
|
||||
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Name: GetDXVersion()
|
||||
// Desc: This function returns two arguments:
|
||||
// dwDXVersion:
|
||||
// 0x0000 = No DirectX installed
|
||||
// 0x0100 = DirectX version 1 installed
|
||||
// 0x0200 = DirectX 2 installed
|
||||
// 0x0300 = DirectX 3 installed
|
||||
// 0x0500 = At least DirectX 5 installed.
|
||||
// 0x0600 = At least DirectX 6 installed.
|
||||
// 0x0601 = At least DirectX 6.1 installed.
|
||||
// 0x0700 = At least DirectX 7 installed.
|
||||
// dwDXPlatform:
|
||||
// 0 = Unknown (This is a failure case)
|
||||
// VER_PLATFORM_WIN32_WINDOWS = Windows 9X platform
|
||||
// VER_PLATFORM_WIN32_NT = Windows NT platform
|
||||
//
|
||||
// Please note that this code is intended as a general guideline. Your
|
||||
// app will probably be able to simply query for functionality (via
|
||||
// QueryInterface) for one or two components.
|
||||
//
|
||||
// Please also note:
|
||||
// "if (dxVer != 0x500) return FALSE;" is BAD.
|
||||
// "if (dxVer < 0x500) return FALSE;" is MUCH BETTER.
|
||||
// to ensure your app will run on future releases of DirectX.
|
||||
//-----------------------------------------------------------------------------
|
||||
VOID GetDXVersion( DWORD* pdwDXVersion, DWORD* pdwDXPlatform )
|
||||
{
|
||||
*pdwDXVersion = 0x0700;
|
||||
*pdwDXPlatform = VER_PLATFORM_WIN32_NT;
|
||||
// HRESULT hr;
|
||||
// HINSTANCE DDHinst = 0;
|
||||
// HINSTANCE DIHinst = 0;
|
||||
// LPDIRECTDRAW pDDraw = 0;
|
||||
// LPDIRECTDRAW2 pDDraw2 = 0;
|
||||
// DIRECTDRAWCREATE DirectDrawCreate = 0;
|
||||
// DIRECTDRAWCREATEEX DirectDrawCreateEx = 0;
|
||||
// DIRECTINPUTCREATE DirectInputCreate = 0;
|
||||
// OSVERSIONINFO osVer;
|
||||
// LPDIRECTDRAWSURFACE pSurf = 0;
|
||||
// LPDIRECTDRAWSURFACE3 pSurf3 = 0;
|
||||
// LPDIRECTDRAWSURFACE4 pSurf4 = 0;
|
||||
|
||||
// // First get the windows platform
|
||||
// osVer.dwOSVersionInfoSize = sizeof(osVer);
|
||||
// if( !GetVersionEx( &osVer ) )
|
||||
// {
|
||||
// (*pdwDXPlatform) = 0;
|
||||
// (*pdwDXVersion) = 0;
|
||||
// return;
|
||||
// }
|
||||
|
||||
// if( osVer.dwPlatformId == VER_PLATFORM_WIN32_NT )
|
||||
// {
|
||||
// (*pdwDXPlatform) = VER_PLATFORM_WIN32_NT;
|
||||
|
||||
// // NT is easy... NT 4.0 is DX2, 4.0 SP3 is DX3, 5.0 is DX5
|
||||
// // and no DX on earlier versions.
|
||||
// if( osVer.dwMajorVersion < 4 )
|
||||
// {
|
||||
// (*pdwDXVersion) = 0; // No DX on NT3.51 or earlier
|
||||
// return;
|
||||
// }
|
||||
|
||||
// if( osVer.dwMajorVersion == 4 )
|
||||
// {
|
||||
// // NT4 up to SP2 is DX2, and SP3 onwards is DX3, so we are at least DX2
|
||||
// (*pdwDXVersion) = 0x200;
|
||||
|
||||
// // We're not supposed to be able to tell which SP we're on, so check for dinput
|
||||
// DIHinst = LoadLibrary( "DINPUT.DLL" );
|
||||
// if( DIHinst == 0 )
|
||||
// {
|
||||
// // No DInput... must be DX2 on NT 4 pre-SP3
|
||||
// OutputDebugString( "Couldn't LoadLibrary DInput\r\n" );
|
||||
// return;
|
||||
// }
|
||||
|
||||
// DirectInputCreate = (DIRECTINPUTCREATE)GetProcAddress( DIHinst,
|
||||
// "DirectInputCreateA" );
|
||||
// FreeLibrary( DIHinst );
|
||||
|
||||
// if( DirectInputCreate == 0 )
|
||||
// {
|
||||
// // No DInput... must be pre-SP3 DX2
|
||||
// OutputDebugString( "Couldn't GetProcAddress DInputCreate\r\n" );
|
||||
// return;
|
||||
// }
|
||||
|
||||
// // It must be NT4, DX2
|
||||
// (*pdwDXVersion) = 0x300; // DX3 on NT4 SP3 or higher
|
||||
// return;
|
||||
// }
|
||||
// // Else it's NT5 or higher, and it's DX5a or higher: Drop through to
|
||||
// // Win9x tests for a test of DDraw (DX6 or higher)
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// // Not NT... must be Win9x
|
||||
// (*pdwDXPlatform) = VER_PLATFORM_WIN32_WINDOWS;
|
||||
// }
|
||||
|
||||
// // Now we know we are in Windows 9x (or maybe 3.1), so anything's possible.
|
||||
// // First see if DDRAW.DLL even exists.
|
||||
// DDHinst = LoadLibrary( "DDRAW.DLL" );
|
||||
// if( DDHinst == 0 )
|
||||
// {
|
||||
// (*pdwDXVersion) = 0;
|
||||
// (*pdwDXPlatform) = 0;
|
||||
// FreeLibrary( DDHinst );
|
||||
// return;
|
||||
// }
|
||||
|
||||
// // See if we can create the DirectDraw object.
|
||||
// DirectDrawCreate = (DIRECTDRAWCREATE)GetProcAddress( DDHinst, "DirectDrawCreate" );
|
||||
// if( DirectDrawCreate == 0 )
|
||||
// {
|
||||
// (*pdwDXVersion) = 0;
|
||||
// (*pdwDXPlatform) = 0;
|
||||
// FreeLibrary( DDHinst );
|
||||
// OutputDebugString( "Couldn't LoadLibrary DDraw\r\n" );
|
||||
// return;
|
||||
// }
|
||||
|
||||
// hr = DirectDrawCreate( NULL, &pDDraw, NULL );
|
||||
// if( FAILED(hr) )
|
||||
// {
|
||||
// (*pdwDXVersion) = 0;
|
||||
// (*pdwDXPlatform) = 0;
|
||||
// FreeLibrary( DDHinst );
|
||||
// OutputDebugString( "Couldn't create DDraw\r\n" );
|
||||
// return;
|
||||
// }
|
||||
|
||||
// // So DirectDraw exists. We are at least DX1.
|
||||
// (*pdwDXVersion) = 0x100;
|
||||
|
||||
// // Let's see if IID_IDirectDraw2 exists.
|
||||
// hr = pDDraw->QueryInterface( IID_IDirectDraw2, (VOID**)&pDDraw2 );
|
||||
// if( FAILED(hr) )
|
||||
// {
|
||||
// // No IDirectDraw2 exists... must be DX1
|
||||
// pDDraw->Release();
|
||||
// FreeLibrary( DDHinst );
|
||||
// OutputDebugString( "Couldn't QI DDraw2\r\n" );
|
||||
// return;
|
||||
// }
|
||||
|
||||
// // IDirectDraw2 exists. We must be at least DX2
|
||||
// pDDraw2->Release();
|
||||
// (*pdwDXVersion) = 0x200;
|
||||
|
||||
|
||||
// ///////////////////////////////////////////////////////////////////////////
|
||||
// // DirectX 3.0 Checks
|
||||
// ///////////////////////////////////////////////////////////////////////////
|
||||
|
||||
// // DirectInput was added for DX3
|
||||
// DIHinst = LoadLibrary( "DINPUT.DLL" );
|
||||
// if( DIHinst == 0 )
|
||||
// {
|
||||
// // No DInput... must not be DX3
|
||||
// OutputDebugString( "Couldn't LoadLibrary DInput\r\n" );
|
||||
// pDDraw->Release();
|
||||
// FreeLibrary( DDHinst );
|
||||
// return;
|
||||
// }
|
||||
|
||||
// DirectInputCreate = (DIRECTINPUTCREATE)GetProcAddress( DIHinst,
|
||||
// "DirectInputCreateA" );
|
||||
// if( DirectInputCreate == 0 )
|
||||
// {
|
||||
// // No DInput... must be DX2
|
||||
// FreeLibrary( DIHinst );
|
||||
// FreeLibrary( DDHinst );
|
||||
// pDDraw->Release();
|
||||
// OutputDebugString( "Couldn't GetProcAddress DInputCreate\r\n" );
|
||||
// return;
|
||||
// }
|
||||
|
||||
// // DirectInputCreate exists. We are at least DX3
|
||||
// (*pdwDXVersion) = 0x300;
|
||||
// FreeLibrary( DIHinst );
|
||||
|
||||
// // Can do checks for 3a vs 3b here
|
||||
|
||||
|
||||
// ///////////////////////////////////////////////////////////////////////////
|
||||
// // DirectX 5.0 Checks
|
||||
// ///////////////////////////////////////////////////////////////////////////
|
||||
|
||||
// // We can tell if DX5 is present by checking for the existence of
|
||||
// // IDirectDrawSurface3. First, we need a surface to QI off of.
|
||||
// DDSURFACEDESC ddsd;
|
||||
// ZeroMemory( &ddsd, sizeof(ddsd) );
|
||||
// ddsd.dwSize = sizeof(ddsd);
|
||||
// ddsd.dwFlags = DDSD_CAPS;
|
||||
// ddsd.ddsCaps.dwCaps = DDSCAPS_PRIMARYSURFACE;
|
||||
|
||||
// hr = pDDraw->SetCooperativeLevel( NULL, DDSCL_NORMAL );
|
||||
// if( FAILED(hr) )
|
||||
// {
|
||||
// // Failure. This means DDraw isn't properly installed.
|
||||
// pDDraw->Release();
|
||||
// FreeLibrary( DDHinst );
|
||||
// (*pdwDXVersion) = 0;
|
||||
// OutputDebugString( "Couldn't Set coop level\r\n" );
|
||||
// return;
|
||||
// }
|
||||
|
||||
// hr = pDDraw->CreateSurface( &ddsd, &pSurf, NULL );
|
||||
// if( FAILED(hr) )
|
||||
// {
|
||||
// // Failure. This means DDraw isn't properly installed.
|
||||
// pDDraw->Release();
|
||||
// FreeLibrary( DDHinst );
|
||||
// *pdwDXVersion = 0;
|
||||
// OutputDebugString( "Couldn't CreateSurface\r\n" );
|
||||
// return;
|
||||
// }
|
||||
|
||||
// // Query for the IDirectDrawSurface3 interface
|
||||
// if( FAILED( pSurf->QueryInterface( IID_IDirectDrawSurface3,
|
||||
// (VOID**)&pSurf3 ) ) )
|
||||
// {
|
||||
// pDDraw->Release();
|
||||
// FreeLibrary( DDHinst );
|
||||
// return;
|
||||
// }
|
||||
|
||||
// // QI for IDirectDrawSurface3 succeeded. We must be at least DX5
|
||||
// (*pdwDXVersion) = 0x500;
|
||||
|
||||
|
||||
// ///////////////////////////////////////////////////////////////////////////
|
||||
// // DirectX 6.0 Checks
|
||||
// ///////////////////////////////////////////////////////////////////////////
|
||||
|
||||
// // The IDirectDrawSurface4 interface was introduced with DX 6.0
|
||||
// if( FAILED( pSurf->QueryInterface( IID_IDirectDrawSurface4,
|
||||
// (VOID**)&pSurf4 ) ) )
|
||||
// {
|
||||
// pDDraw->Release();
|
||||
// FreeLibrary( DDHinst );
|
||||
// return;
|
||||
// }
|
||||
|
||||
// // IDirectDrawSurface4 was create successfully. We must be at least DX6
|
||||
// (*pdwDXVersion) = 0x600;
|
||||
// pSurf->Release();
|
||||
// pDDraw->Release();
|
||||
|
||||
|
||||
// ///////////////////////////////////////////////////////////////////////////
|
||||
// // DirectX 6.1 Checks
|
||||
// ///////////////////////////////////////////////////////////////////////////
|
||||
|
||||
//// FIX: DirectMusic is deprecated.
|
||||
// //// Check for DMusic, which was introduced with DX6.1
|
||||
// //LPDIRECTMUSIC pDMusic = NULL;
|
||||
// //CoInitialize( NULL );
|
||||
// //hr = CoCreateInstance( CLSID_DirectMusic, NULL, CLSCTX_INPROC_SERVER,
|
||||
// // IID_IDirectMusic, (VOID**)&pDMusic );
|
||||
// //if( FAILED(hr) )
|
||||
// //{
|
||||
// // OutputDebugString( "Couldn't create CLSID_DirectMusic\r\n" );
|
||||
// // FreeLibrary( DDHinst );
|
||||
// // return;
|
||||
// //}
|
||||
|
||||
// //// DirectMusic was created successfully. We must be at least DX6.1
|
||||
// //(*pdwDXVersion) = 0x601;
|
||||
// //pDMusic->Release();
|
||||
// //CoUninitialize();
|
||||
//
|
||||
|
||||
// ///////////////////////////////////////////////////////////////////////////
|
||||
// // DirectX 7.0 Checks
|
||||
// ///////////////////////////////////////////////////////////////////////////
|
||||
|
||||
// // Check for DirectX 7 by creating a DDraw7 object
|
||||
// LPDIRECTDRAW7 pDD7;
|
||||
// DirectDrawCreateEx = (DIRECTDRAWCREATEEX)GetProcAddress( DDHinst,
|
||||
// "DirectDrawCreateEx" );
|
||||
// if( NULL == DirectDrawCreateEx )
|
||||
// {
|
||||
// FreeLibrary( DDHinst );
|
||||
// return;
|
||||
// }
|
||||
|
||||
// if( FAILED( DirectDrawCreateEx( NULL, (VOID**)&pDD7, IID_IDirectDraw7,
|
||||
// NULL ) ) )
|
||||
// {
|
||||
// FreeLibrary( DDHinst );
|
||||
// return;
|
||||
// }
|
||||
|
||||
// // DDraw7 was created successfully. We must be at least DX7.0
|
||||
// (*pdwDXVersion) = 0x700;
|
||||
// pDD7->Release();
|
||||
|
||||
//
|
||||
// ///////////////////////////////////////////////////////////////////////////
|
||||
// // End of checks
|
||||
// ///////////////////////////////////////////////////////////////////////////
|
||||
|
||||
// // Close open libraries and return
|
||||
// FreeLibrary( DDHinst );
|
||||
//
|
||||
return;
|
||||
}
|
||||
|
||||
int getDXVersion(){
|
||||
DWORD version,platform;
|
||||
|
||||
GetDXVersion( &version,&platform );
|
||||
|
||||
return (version>>8)&0xff;
|
||||
}
|
||||
|
||||
@@ -1,24 +0,0 @@
|
||||
|
||||
#include "checkie.h"
|
||||
#include <windows.h>
|
||||
|
||||
int getIEVersion(){
|
||||
int version=0;
|
||||
|
||||
HKEY key=HKEY_LOCAL_MACHINE;
|
||||
if( RegOpenKey( key,"Software\\Microsoft\\Internet Explorer",&key )==ERROR_SUCCESS ){
|
||||
char buff[MAX_PATH];DWORD type,sz=MAX_PATH;
|
||||
if( RegQueryValueEx( key,"Version",0,&type,(PBYTE)buff,&sz )==ERROR_SUCCESS ){
|
||||
version=4;
|
||||
/*
|
||||
char temp[4];
|
||||
if( isdigit(buff[0]) && buff[1]=='.' && isdigit(buff[2]) && isdigit(buff[3]) && buff[4]=='.' ){
|
||||
temp[0]=buff[0];temp[1]=buff[2];temp[2]=buff[3];temp[3]=0;
|
||||
if( atoi(temp)>=471 ) version=4;
|
||||
}
|
||||
*/
|
||||
}
|
||||
RegCloseKey( key );
|
||||
}
|
||||
return version;
|
||||
}
|
||||
|
Before Width: | Height: | Size: 3.1 KiB After Width: | Height: | Size: 3.1 KiB |
+123
@@ -0,0 +1,123 @@
|
||||
|
||||
#include "libs.h"
|
||||
#include "prefs.h"
|
||||
#include "resource.h"
|
||||
#include "stdafx.h"
|
||||
|
||||
#include <mmsystem.h>
|
||||
|
||||
char _credits[] =
|
||||
"\r\n"
|
||||
"Programming and design: Mark Sibly\r\n\r\n"
|
||||
"Documentation: Mark Sibly, Simon Harrison, Paul Gerfen, Shane Monroe and the Blitz Doc Team\r\n\r\n"
|
||||
"Testing and support: James Boyd, Simon Armstrong and the Blitz Dev Team\r\n\r\n"
|
||||
"Image loader courtesy of FreeImage by Floris van den berg\r\n\r\n"
|
||||
"Please visit www.blitzbasic.com for all your Blitz related needs!";
|
||||
|
||||
/*
|
||||
char _credits[]=
|
||||
"\r\n"
|
||||
"Programming and Design: Mark Sibly\r\n\r\n"
|
||||
"Documentation: Simon Harrison; Simon Armstrong; Mark Sibly\r\n\r\n"
|
||||
"Many thanks to: Claire Foley; Janet Sibly; Rick, Kay and Robbie Keam; "
|
||||
"James Boyd; the Blitz Dev Team\r\n\r\n"
|
||||
"Image loader courtesy of FreeImage by Floris van den Berg\r\n\r\n"
|
||||
"Please visit www.blitzbasic.com for all your Blitz related needs!";
|
||||
*/
|
||||
|
||||
class Dialog : public CDialog {
|
||||
bool _quit;
|
||||
|
||||
public:
|
||||
Dialog() : _quit(false) {}
|
||||
|
||||
afx_msg void OnOK()
|
||||
{
|
||||
_quit = true;
|
||||
}
|
||||
|
||||
void wait()
|
||||
{
|
||||
_quit = false;
|
||||
MSG msg;
|
||||
while (!_quit && GetMessage(&msg, 0, 0, 0)) {
|
||||
if (!AfxGetApp()->PreTranslateMessage(&msg)) {
|
||||
TranslateMessage(&msg);
|
||||
DispatchMessage(&msg);
|
||||
}
|
||||
}
|
||||
EndDialog(0);
|
||||
}
|
||||
|
||||
void wait(int n)
|
||||
{
|
||||
int _expire = (int)timeGetTime() + n;
|
||||
for (;;) {
|
||||
int tm = _expire - (int)timeGetTime();
|
||||
if (tm < 0)
|
||||
tm = 0;
|
||||
MsgWaitForMultipleObjects(0, 0, false, tm, QS_ALLEVENTS);
|
||||
|
||||
MSG msg;
|
||||
if (PeekMessage(&msg, 0, 0, 0, PM_REMOVE)) {
|
||||
if (!AfxGetApp()->PreTranslateMessage(&msg)) {
|
||||
TranslateMessage(&msg);
|
||||
DispatchMessage(&msg);
|
||||
}
|
||||
}
|
||||
if (!tm)
|
||||
return;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
void aboutBlitz(bool delay)
|
||||
{
|
||||
AfxGetMainWnd()->EnableWindow(0);
|
||||
|
||||
Dialog about;
|
||||
|
||||
about.Create(IDD_ABOUT);
|
||||
|
||||
string credits;
|
||||
|
||||
credits += _credits;
|
||||
|
||||
about.GetDlgItem(IDC_CREDITS)->SetWindowText(credits.c_str());
|
||||
|
||||
int ide_ver = VERSION & 0xffff;
|
||||
int lnk_ver = linker_ver & 0xffff;
|
||||
int run_ver = runtime_ver & 0xffff;
|
||||
string ide_v = itoa(ide_ver / 1000) + "." + itoa(ide_ver % 1000);
|
||||
string lnk_v = itoa(lnk_ver / 1000) + "." + itoa(lnk_ver % 1000);
|
||||
string run_v = itoa(run_ver / 1000) + "." + itoa(run_ver % 1000);
|
||||
|
||||
string t = "";
|
||||
|
||||
t += "BlitzNext";
|
||||
|
||||
about.GetDlgItem(IDC_PRODUCT)->SetWindowText(t.c_str());
|
||||
|
||||
t = "IDE V" + ide_v + " Linker V" + lnk_v + " Runtime V" + run_v;
|
||||
|
||||
about.GetDlgItem(IDC_VERSION)->SetWindowText(t.c_str());
|
||||
|
||||
#ifdef DEMO
|
||||
|
||||
if (delay) {
|
||||
about.GetDlgItem(IDOK)->ShowWindow(SW_HIDE);
|
||||
about.GetDlgItem(IDC_PROGRESS1)->ShowWindow(SW_SHOW);
|
||||
for (int k = 0; k < 100; ++k) {
|
||||
((CProgressCtrl*)about.GetDlgItem(IDC_PROGRESS1))->SetPos(k + 1);
|
||||
about.wait(50);
|
||||
}
|
||||
about.GetDlgItem(IDOK)->ShowWindow(SW_SHOW);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
about.GetDlgItem(IDC_PROGRESS1)->ShowWindow(SW_HIDE);
|
||||
about.wait();
|
||||
about.EndDialog(0);
|
||||
AfxGetMainWnd()->EnableWindow(1);
|
||||
}
|
||||
|
Before Width: | Height: | Size: 24 KiB After Width: | Height: | Size: 24 KiB |
@@ -1,18 +1,18 @@
|
||||
|
||||
#include "stdafx.h"
|
||||
#include "resource.h"
|
||||
#include "blitzide.h"
|
||||
#include "mainframe.h"
|
||||
#include "prefs.h"
|
||||
#include "about.h"
|
||||
#include "libs.h"
|
||||
#include "mainframe.h"
|
||||
#include "prefs.h"
|
||||
#include "resource.h"
|
||||
#include "stdafx.h"
|
||||
|
||||
BlitzIDE blitzIDE;
|
||||
|
||||
BOOL BlitzIDE::InitInstance(){
|
||||
|
||||
BOOL BlitzIDE::InitInstance()
|
||||
{
|
||||
#ifdef _DEBUG
|
||||
AfxEnableMemoryTracking( true );
|
||||
AfxEnableMemoryTracking(true);
|
||||
#endif
|
||||
|
||||
AfxInitRichEdit();
|
||||
@@ -21,25 +21,26 @@ BOOL BlitzIDE::InitInstance(){
|
||||
|
||||
initLibs();
|
||||
|
||||
mainFrame=new MainFrame();
|
||||
mainFrame = new MainFrame();
|
||||
m_pMainWnd = mainFrame;
|
||||
|
||||
#ifdef DEMO
|
||||
aboutBlitz( true );
|
||||
aboutBlitz(true);
|
||||
#endif
|
||||
|
||||
mainFrame->LoadFrame( IDR_MAINFRAME );
|
||||
mainFrame->MoveWindow( CRect( prefs.win_rect ) );
|
||||
mainFrame->ShowWindow( m_nCmdShow );
|
||||
mainFrame->LoadFrame(IDR_MAINFRAME);
|
||||
mainFrame->MoveWindow(CRect(prefs.win_rect));
|
||||
mainFrame->ShowWindow(m_nCmdShow);
|
||||
mainFrame->UpdateWindow();
|
||||
|
||||
if( prefs.win_maximized ) mainFrame->ShowWindow( SW_SHOWMAXIMIZED );
|
||||
if (prefs.win_maximized)
|
||||
mainFrame->ShowWindow(SW_SHOWMAXIMIZED);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
int BlitzIDE::ExitInstance(){
|
||||
|
||||
int BlitzIDE::ExitInstance()
|
||||
{
|
||||
prefs.close();
|
||||
|
||||
return 0;
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,78 @@
|
||||
|
||||
#include "funclist.h"
|
||||
#include "stdafx.h"
|
||||
|
||||
IMPLEMENT_DYNAMIC(FuncList, CListCtrl)
|
||||
BEGIN_MESSAGE_MAP(FuncList, CListCtrl)
|
||||
ON_WM_CREATE()
|
||||
ON_NOTIFY_REFLECT(NM_CLICK, nm_click)
|
||||
END_MESSAGE_MAP()
|
||||
|
||||
FuncList::FuncList() : listener(0) {}
|
||||
|
||||
void FuncList::setListener(FuncListListener* l)
|
||||
{
|
||||
listener = l;
|
||||
}
|
||||
|
||||
int FuncList::OnCreate(LPCREATESTRUCT cs)
|
||||
{
|
||||
CListCtrl::OnCreate(cs);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
void FuncList::nm_click(NMHDR* nmhdr, LRESULT* result)
|
||||
{
|
||||
NMLISTVIEW* lv = (NMLISTVIEW*)nmhdr;
|
||||
|
||||
int k = 0;
|
||||
Funcs::iterator it;
|
||||
for (it = funcs.begin(); it != funcs.end() && k < lv->iItem; ++k, ++it) {
|
||||
}
|
||||
if (it != funcs.end()) {
|
||||
listener->funcSelected(*it);
|
||||
}
|
||||
*result = 0;
|
||||
}
|
||||
|
||||
void FuncList::clear()
|
||||
{
|
||||
funcs.clear();
|
||||
DeleteAllItems();
|
||||
}
|
||||
|
||||
void FuncList::insert(int line, const string& func)
|
||||
{
|
||||
int n = 0;
|
||||
Funcs::iterator it;
|
||||
for (it = funcs.begin(); it != funcs.end() && line > *it; ++n, ++it) {
|
||||
}
|
||||
if (it != funcs.end() && line == *it) {
|
||||
SetItemText(n, 0, func.c_str());
|
||||
return;
|
||||
}
|
||||
it = funcs.insert(it, line);
|
||||
InsertItem(n, func.c_str());
|
||||
}
|
||||
|
||||
void FuncList::remove(int begin, int end)
|
||||
{
|
||||
int n = 0;
|
||||
Funcs::iterator it;
|
||||
for (it = funcs.begin(); it != funcs.end() && *it < begin; ++n, ++it) {
|
||||
}
|
||||
while (it != funcs.end() && *it < end) {
|
||||
funcs.erase(it++);
|
||||
DeleteItem(n);
|
||||
}
|
||||
}
|
||||
|
||||
void FuncList::relocate(int begin, int offset)
|
||||
{
|
||||
Funcs::iterator it;
|
||||
for (it = funcs.begin(); it != funcs.end(); ++it) {
|
||||
if (*it >= begin)
|
||||
*it += offset;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,40 @@
|
||||
|
||||
#include "htmlhelp.h"
|
||||
#include "libs.h"
|
||||
#include "mainframe.h"
|
||||
#include "stdafx.h"
|
||||
|
||||
IMPLEMENT_DYNAMIC(HtmlHelp, CHtmlView)
|
||||
BEGIN_MESSAGE_MAP(HtmlHelp, CHtmlView)
|
||||
ON_WM_ERASEBKGND()
|
||||
END_MESSAGE_MAP()
|
||||
|
||||
string HtmlHelp::getTitle()
|
||||
{
|
||||
return title;
|
||||
}
|
||||
|
||||
void HtmlHelp::OnTitleChange(LPCTSTR t)
|
||||
{
|
||||
listener->helpTitleChange(this, title = t);
|
||||
}
|
||||
|
||||
void HtmlHelp::OnBeforeNavigate2(LPCTSTR url, DWORD flags, LPCTSTR target, CByteArray& posted, LPCTSTR headers,
|
||||
BOOL* cancel)
|
||||
{
|
||||
string t(url);
|
||||
int attr = GetFileAttributes(url);
|
||||
if (attr == -1)
|
||||
attr = 0;
|
||||
if ((attr & FILE_ATTRIBUTE_DIRECTORY) || (t.rfind(".bb") + 3 == t.size()) || (isMediaFile(t))) {
|
||||
listener->helpOpen(this, t);
|
||||
*cancel = true;
|
||||
return;
|
||||
}
|
||||
*cancel = false;
|
||||
}
|
||||
|
||||
BOOL HtmlHelp::OnEraseBkgnd(CDC* dc)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
+137
@@ -0,0 +1,137 @@
|
||||
|
||||
#include "libs.h"
|
||||
#include "blitzide.h"
|
||||
#include "editor.h"
|
||||
#include "stdafx.h"
|
||||
|
||||
static map<string, string> keyhelps;
|
||||
|
||||
int linker_ver, runtime_ver;
|
||||
|
||||
static string execProc(const string& proc)
|
||||
{
|
||||
HANDLE rd, wr;
|
||||
|
||||
SECURITY_ATTRIBUTES sa = {sizeof(sa), 0, true};
|
||||
|
||||
if (CreatePipe(&rd, &wr, &sa, 0)) {
|
||||
STARTUPINFO si = {sizeof(si)};
|
||||
si.dwFlags = STARTF_USESTDHANDLES;
|
||||
si.hStdOutput = si.hStdError = wr;
|
||||
PROCESS_INFORMATION pi = {0};
|
||||
if (CreateProcess(0, (char*)proc.c_str(), 0, 0, true, DETACHED_PROCESS, 0, 0, &si, &pi)) {
|
||||
CloseHandle(pi.hProcess);
|
||||
CloseHandle(pi.hThread);
|
||||
CloseHandle(wr);
|
||||
|
||||
string t;
|
||||
char* buf = new char[1024];
|
||||
for (;;) {
|
||||
unsigned long sz;
|
||||
int n = ReadFile(rd, buf, 1024, &sz, 0);
|
||||
if (!n && GetLastError() == ERROR_BROKEN_PIPE)
|
||||
break;
|
||||
if (!n) {
|
||||
t = "";
|
||||
break;
|
||||
}
|
||||
if (!sz)
|
||||
break;
|
||||
t += string(buf, sz);
|
||||
}
|
||||
delete[] buf;
|
||||
CloseHandle(rd);
|
||||
return t;
|
||||
}
|
||||
CloseHandle(rd);
|
||||
CloseHandle(wr);
|
||||
}
|
||||
AfxMessageBox((proc + " failed").c_str());
|
||||
ExitProcess(0);
|
||||
return "";
|
||||
}
|
||||
|
||||
int version(string vers, string t)
|
||||
{
|
||||
t += " version:";
|
||||
int n = vers.find(t);
|
||||
n += t.size();
|
||||
int maj = atoi(vers.substr(n));
|
||||
n = vers.find('.', n) + 1;
|
||||
int min = atoi(vers.substr(n));
|
||||
return maj * 100 + min;
|
||||
}
|
||||
|
||||
void initLibs()
|
||||
{
|
||||
string valid = execProc(prefs.homeDir + "/bin/blitzcc -q");
|
||||
if (valid.size()) {
|
||||
AfxMessageBox(("Compiler environment error: " + valid).c_str());
|
||||
ExitProcess(0);
|
||||
}
|
||||
|
||||
string vers = tolower(execProc(prefs.homeDir + "/bin/blitzcc -v"));
|
||||
linker_ver = version(vers, "linker");
|
||||
runtime_ver = version(vers, "runtime");
|
||||
|
||||
//generate keywords!
|
||||
string kws = execProc(prefs.homeDir + "/bin/blitzcc +k");
|
||||
|
||||
if (!kws.size()) {
|
||||
AfxMessageBox("Error generating keywords");
|
||||
ExitProcess(0);
|
||||
}
|
||||
|
||||
int pos = 0, n;
|
||||
while ((n = kws.find('\n', pos)) != string::npos) {
|
||||
string t = kws.substr(pos, n - pos - 1);
|
||||
for (int q = 0; (q = t.find('\r', q)) != string::npos;)
|
||||
t = t.replace(q, 1, "");
|
||||
|
||||
string help = t;
|
||||
int i = t.find(' ');
|
||||
if (i != string::npos) {
|
||||
t = t.substr(0, i);
|
||||
if (!t.size()) {
|
||||
AfxMessageBox("Error in keywords");
|
||||
ExitProcess(0);
|
||||
}
|
||||
if (!isalnum(t[t.size() - 1]))
|
||||
t = t.substr(0, t.size() - 1);
|
||||
}
|
||||
|
||||
Editor::addKeyword(t);
|
||||
keyhelps[t] = help;
|
||||
pos = n + 1;
|
||||
}
|
||||
}
|
||||
|
||||
string quickHelp(const string& kw)
|
||||
{
|
||||
map<string, string>::const_iterator it = keyhelps.find(kw);
|
||||
return it == keyhelps.end() ? "" : it->second;
|
||||
}
|
||||
|
||||
bool isMediaFile(const string& f)
|
||||
{
|
||||
#ifndef PRO
|
||||
return false;
|
||||
#endif
|
||||
|
||||
static char* exts[] = {"bmp", "jpg", "png", "tga", "iff", "pcx", "wav", "mid", "mp3",
|
||||
"mod", "s3m", "xm", "it", "rmi", "sgt", "x", "3ds", 0};
|
||||
|
||||
int i = f.rfind('.');
|
||||
if (i == string::npos || i + 1 == f.size())
|
||||
return false;
|
||||
string ext = f.substr(i + 1);
|
||||
char** p = exts;
|
||||
while (const char* e = *p++) {
|
||||
string t(e);
|
||||
if (i + t.size() + 1 != f.size())
|
||||
continue;
|
||||
if (ext == t)
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
+1096
File diff suppressed because it is too large
Load Diff
+227
@@ -0,0 +1,227 @@
|
||||
|
||||
#include "prefs.h"
|
||||
#include <iomanip>
|
||||
#include <winreg.h>
|
||||
#include "resource.h"
|
||||
#include "stdafx.h"
|
||||
|
||||
#define SWAPRB(x) ((((x) >> 16) & 0xff) | ((x)&0xff00) | (((x)&0xff) << 16))
|
||||
|
||||
Prefs prefs;
|
||||
|
||||
void Prefs::open()
|
||||
{
|
||||
char* p = getenv("blitzpath");
|
||||
if (!p) {
|
||||
AfxMessageBox("blitzpath environment variable not found!", MB_TOPMOST | MB_SETFOREGROUND | MB_ICONINFORMATION);
|
||||
ExitProcess(0);
|
||||
}
|
||||
|
||||
homeDir = p;
|
||||
|
||||
AddFontResource((homeDir + "/cfg/blitz.fon").c_str());
|
||||
|
||||
setDefault();
|
||||
|
||||
bool prg_windowed;
|
||||
|
||||
ifstream in((homeDir + "/cfg/blitzide.prefs").c_str());
|
||||
if (!in.good())
|
||||
return;
|
||||
|
||||
while (!in.eof()) {
|
||||
string t;
|
||||
in >> t;
|
||||
if (!t.size())
|
||||
continue;
|
||||
while (in.peek() == '\t')
|
||||
in.ignore();
|
||||
if (t == "prg_debug")
|
||||
in >> prg_debug;
|
||||
else if (t == "prg_lastbuild")
|
||||
getline(in, prg_lastbuild);
|
||||
else if (t == "prg_windowed")
|
||||
in >> prg_windowed;
|
||||
else if (t == "win_maximized")
|
||||
in >> win_maximized;
|
||||
else if (t == "win_notoolbar")
|
||||
in >> win_notoolbar;
|
||||
else if (t == "win_rect") {
|
||||
in >> win_rect.left;
|
||||
in >> win_rect.top;
|
||||
in >> win_rect.right;
|
||||
in >> win_rect.bottom;
|
||||
} else if (t.substr(0, 5) == "font_") {
|
||||
string s;
|
||||
int h;
|
||||
in >> s;
|
||||
in >> h;
|
||||
t = t.substr(5);
|
||||
if (t == "editor") {
|
||||
font_editor = s;
|
||||
font_editor_height = h;
|
||||
} else if (t == "tabs") {
|
||||
font_tabs = s;
|
||||
font_tabs_height = h;
|
||||
} else if (t == "debug") {
|
||||
font_debug = s;
|
||||
font_debug_height = h;
|
||||
}
|
||||
} else if (t.substr(0, 4) == "rgb_") {
|
||||
t = t.substr(4);
|
||||
string s;
|
||||
in >> s;
|
||||
int rgb = 0;
|
||||
for (int k = 0; k < s.size(); ++k) {
|
||||
int n = s[k];
|
||||
rgb = (rgb << 4) | (n <= '9' ? n - '0' : (n & 31) + 9);
|
||||
}
|
||||
rgb = SWAPRB(rgb);
|
||||
|
||||
if (t == "bkgrnd")
|
||||
rgb_bkgrnd = rgb;
|
||||
else if (t == "string")
|
||||
rgb_string = rgb;
|
||||
else if (t == "ident")
|
||||
rgb_ident = rgb;
|
||||
else if (t == "keyword")
|
||||
rgb_keyword = rgb;
|
||||
else if (t == "comment")
|
||||
rgb_comment = rgb;
|
||||
else if (t == "digit")
|
||||
rgb_digit = rgb;
|
||||
else if (t == "default")
|
||||
rgb_default = rgb;
|
||||
} else if (t == "edit_tabs") {
|
||||
in >> edit_tabs;
|
||||
} else if (t == "edit_blkcursor") {
|
||||
in >> edit_blkcursor;
|
||||
} else if (t == "edit_backup") {
|
||||
in >> edit_backup;
|
||||
} else if (t == "img_toolbar") {
|
||||
getline(in, img_toolbar);
|
||||
} else if (t == "cmd_line") {
|
||||
getline(in, cmd_line);
|
||||
} else if (t == "file_recent") {
|
||||
string l;
|
||||
getline(in, l);
|
||||
if (recentFiles.size() < 10)
|
||||
recentFiles.push_back(l);
|
||||
} else {
|
||||
string s = "Unrecognized option '" + t + "' in blitzide.prefs";
|
||||
AfxMessageBox("Error in preferences file");
|
||||
setDefault();
|
||||
return;
|
||||
}
|
||||
}
|
||||
createFonts();
|
||||
}
|
||||
|
||||
void Prefs::close()
|
||||
{
|
||||
ofstream out((homeDir + "/cfg/blitzide.prefs").c_str());
|
||||
if (!out.good())
|
||||
return;
|
||||
|
||||
out << "prg_debug\t" << prg_debug << endl;
|
||||
out << "prg_lastbuild\t" << prg_lastbuild << endl;
|
||||
out << "win_maximized\t" << win_maximized << endl;
|
||||
out << "win_notoolbar\t" << win_notoolbar << endl;
|
||||
out << "win_rect\t" << win_rect.left << ' ' << win_rect.top << ' ' << win_rect.right << ' ' << win_rect.bottom
|
||||
<< endl;
|
||||
out << "font_editor\t" << font_editor << ' ' << font_editor_height << endl;
|
||||
out << "font_tabs\t" << font_tabs << ' ' << font_tabs_height << endl;
|
||||
out << "font_debug\t" << font_debug << ' ' << font_debug_height << endl;
|
||||
out << hex;
|
||||
out << "rgb_bkgrnd\t" << SWAPRB(rgb_bkgrnd) << endl;
|
||||
out << "rgb_string\t" << SWAPRB(rgb_string) << endl;
|
||||
out << "rgb_ident\t" << SWAPRB(rgb_ident) << endl;
|
||||
out << "rgb_keyword\t" << SWAPRB(rgb_keyword) << endl;
|
||||
out << "rgb_comment\t" << SWAPRB(rgb_comment) << endl;
|
||||
out << "rgb_digit\t" << SWAPRB(rgb_digit) << endl;
|
||||
out << "rgb_default\t" << SWAPRB(rgb_default) << endl;
|
||||
out << "edit_tabs\t" << edit_tabs << endl;
|
||||
out << "edit_blkcursor\t" << edit_blkcursor << endl;
|
||||
out << "edit_backup\t" << edit_backup << endl;
|
||||
out << "img_toolbar\t" << img_toolbar << endl;
|
||||
out << "cmd_line\t" << cmd_line << endl;
|
||||
for (int k = 0; k < recentFiles.size(); ++k) {
|
||||
out << "file_recent\t" << recentFiles[k] << endl;
|
||||
}
|
||||
out << dec;
|
||||
|
||||
RemoveFontResource((homeDir + "/cfg/blitz.fon").c_str());
|
||||
}
|
||||
|
||||
void Prefs::setDefault()
|
||||
{
|
||||
prg_debug = true;
|
||||
|
||||
win_rect.left = win_rect.top = 0;
|
||||
win_rect.right = 640;
|
||||
win_rect.bottom = 480;
|
||||
win_maximized = false;
|
||||
win_notoolbar = false;
|
||||
#ifdef PLUS
|
||||
font_editor = "courier";
|
||||
font_editor_height = 10;
|
||||
#else
|
||||
font_editor = "Consolas";
|
||||
font_editor_height = 10;
|
||||
#endif
|
||||
font_tabs = "verdana";
|
||||
font_tabs_height = 8;
|
||||
font_debug = "verdana";
|
||||
font_debug_height = 8;
|
||||
|
||||
#ifdef PRO
|
||||
rgb_bkgrnd = RGB(0x22, 0x55, 0x88);
|
||||
rgb_string = RGB(0x00, 0xff, 0x66);
|
||||
rgb_ident = RGB(0xff, 0xff, 0xff);
|
||||
rgb_keyword = RGB(0xaa, 0xff, 0xff);
|
||||
rgb_comment = RGB(0xff, 0xee, 0x00);
|
||||
rgb_digit = RGB(0x33, 0xff, 0xdd);
|
||||
rgb_default = RGB(0xee, 0xee, 0xee);
|
||||
#else
|
||||
#ifdef PLUS
|
||||
rgb_bkgrnd = SWAPRB(0x225577);
|
||||
rgb_string = SWAPRB(0x00ffff);
|
||||
rgb_ident = SWAPRB(0xffffff);
|
||||
rgb_keyword = SWAPRB(0xffff00);
|
||||
rgb_comment = SWAPRB(0x00ff00);
|
||||
rgb_digit = SWAPRB(0x00ffff);
|
||||
rgb_default = SWAPRB(0xffffff);
|
||||
#else
|
||||
rgb_bkgrnd = RGB(32, 96, 96);
|
||||
rgb_string = RGB(0, 255, 0);
|
||||
rgb_ident = RGB(255, 255, 255);
|
||||
rgb_keyword = RGB(255, 231, 95);
|
||||
rgb_comment = RGB(0, 255, 255);
|
||||
rgb_digit = RGB(200, 240, 255);
|
||||
rgb_default = RGB(255, 240, 200);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
edit_tabs = 4;
|
||||
edit_blkcursor = false;
|
||||
edit_backup = 2;
|
||||
|
||||
img_toolbar = "toolbar.bmp";
|
||||
|
||||
recentFiles.clear();
|
||||
|
||||
createFonts();
|
||||
}
|
||||
|
||||
void Prefs::createFonts()
|
||||
{
|
||||
editFont.Detach();
|
||||
tabsFont.Detach();
|
||||
debugFont.Detach();
|
||||
conFont.Detach();
|
||||
|
||||
editFont.CreatePointFont(font_editor_height * 10, font_editor.c_str());
|
||||
tabsFont.CreatePointFont(font_tabs_height * 10, font_tabs.c_str());
|
||||
debugFont.CreatePointFont(font_debug_height * 10, font_debug.c_str());
|
||||
conFont.CreatePointFont(80, "courier");
|
||||
}
|
||||
@@ -2,4 +2,3 @@
|
||||
#include "stdafx.h"
|
||||
|
||||
#include "../stdutil/stdutil.cpp"
|
||||
|
||||
+211
@@ -0,0 +1,211 @@
|
||||
|
||||
#include "tabber.h"
|
||||
#include "stdafx.h"
|
||||
|
||||
IMPLEMENT_DYNAMIC(Tabber, CTabCtrl)
|
||||
BEGIN_MESSAGE_MAP(Tabber, CTabCtrl)
|
||||
ON_WM_SIZE()
|
||||
ON_WM_ERASEBKGND()
|
||||
ON_NOTIFY_REFLECT(TCN_SELCHANGE, tcn_selChange)
|
||||
END_MESSAGE_MAP()
|
||||
|
||||
static CRect tabsRect(CTabCtrl& t)
|
||||
{
|
||||
CRect r(0, 0, 0, 0);
|
||||
int n = t.GetItemCount();
|
||||
for (int k = 0; k < n; ++k) {
|
||||
CRect c;
|
||||
t.GetItemRect(k, &c);
|
||||
if (c.left < r.left)
|
||||
r.left = c.left;
|
||||
if (c.right > r.right)
|
||||
r.right = c.right;
|
||||
if (c.top < r.top)
|
||||
r.top = c.top;
|
||||
if (c.bottom > r.bottom)
|
||||
r.bottom = c.bottom;
|
||||
}
|
||||
return r;
|
||||
}
|
||||
|
||||
CRect Tabber::getInnerRect()
|
||||
{
|
||||
CRect r;
|
||||
GetClientRect(&r);
|
||||
int x = 2, y = 2, w = r.Width() - 4, h = r.Height() - 4;
|
||||
|
||||
r = tabsRect(*this);
|
||||
h -= r.Height();
|
||||
y += r.Height();
|
||||
|
||||
r.left = x;
|
||||
r.top = y;
|
||||
r.right = x + w;
|
||||
r.bottom = y + h;
|
||||
return r;
|
||||
}
|
||||
|
||||
Tabber::Tabber() : listener(0), curr(-1) {}
|
||||
|
||||
Tabber::~Tabber()
|
||||
{
|
||||
for (; tabs.size(); tabs.pop_back())
|
||||
delete tabs.back();
|
||||
}
|
||||
|
||||
void Tabber::OnSize(UINT type, int w, int h)
|
||||
{
|
||||
CTabCtrl::OnSize(type, w, h);
|
||||
refresh();
|
||||
}
|
||||
|
||||
BOOL Tabber::OnEraseBkgnd(CDC* dc)
|
||||
{
|
||||
CRect c;
|
||||
GetClientRect(&c);
|
||||
|
||||
HBRUSH hb = (HBRUSH)GetClassLong(m_hWnd, GCL_HBRBACKGROUND);
|
||||
CBrush br;
|
||||
br.Attach(hb);
|
||||
|
||||
if (curr < 0)
|
||||
dc->FillRect(&c, &br);
|
||||
else {
|
||||
CRect i = getInnerRect();
|
||||
CRect t(c.left, c.top, i.right, i.top);
|
||||
dc->FillRect(&t, &br);
|
||||
CRect r(i.right, c.top, c.right, i.bottom);
|
||||
dc->FillRect(&r, &br);
|
||||
CRect b(i.left, i.bottom, c.right, c.bottom);
|
||||
dc->FillRect(&b, &br);
|
||||
CRect l(c.left, i.top, i.left, c.bottom);
|
||||
dc->FillRect(&l, &br);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
void Tabber::setListener(TabberListener* l)
|
||||
{
|
||||
listener = l;
|
||||
}
|
||||
|
||||
void Tabber::refresh()
|
||||
{
|
||||
if (curr < 0)
|
||||
return;
|
||||
|
||||
CRect r = getInnerRect();
|
||||
CWnd* wnd = getTabWnd(curr);
|
||||
wnd->MoveWindow(r.left, r.top, r.Width(), r.Height());
|
||||
wnd->ShowWindow(SW_SHOW);
|
||||
wnd->SetFocus();
|
||||
}
|
||||
|
||||
Tabber::Tab* Tabber::getTab(int index) const
|
||||
{
|
||||
if (index < 0 || index >= tabs.size())
|
||||
return 0;
|
||||
Tabs::const_iterator it = tabs.begin();
|
||||
while (index--)
|
||||
++it;
|
||||
return *it;
|
||||
}
|
||||
|
||||
void Tabber::tcn_selChange(NMHDR* p, LRESULT* result)
|
||||
{
|
||||
setCurrent(GetCurSel());
|
||||
}
|
||||
|
||||
void Tabber::insert(int index, CWnd* w, const string& t)
|
||||
{
|
||||
if (index < 0 || index > tabs.size())
|
||||
return;
|
||||
|
||||
Tabs::iterator it = tabs.begin();
|
||||
for (int k = 0; k < index; ++k)
|
||||
++it;
|
||||
Tab* tab = new Tab(w, t);
|
||||
tabs.insert(it, tab);
|
||||
|
||||
InsertItem(index, t.c_str());
|
||||
if (curr < 0)
|
||||
setCurrent(index);
|
||||
}
|
||||
|
||||
void Tabber::remove(int index)
|
||||
{
|
||||
if (index < 0 || index >= tabs.size())
|
||||
return;
|
||||
|
||||
CWnd* w = getTabWnd(index);
|
||||
|
||||
Tabs::iterator it = tabs.begin();
|
||||
for (int k = 0; k < index; ++k)
|
||||
++it;
|
||||
delete *it;
|
||||
tabs.erase(it);
|
||||
DeleteItem(index);
|
||||
|
||||
if (curr >= tabs.size())
|
||||
curr = tabs.size() - 1;
|
||||
|
||||
refresh();
|
||||
if (curr >= 0)
|
||||
SetCurSel(curr);
|
||||
if (w)
|
||||
w->ShowWindow(SW_HIDE);
|
||||
if (listener)
|
||||
listener->currentSet(this, curr);
|
||||
}
|
||||
|
||||
void Tabber::setCurrent(int index)
|
||||
{
|
||||
if (index < 0 || index >= tabs.size())
|
||||
return;
|
||||
|
||||
if (index != curr) {
|
||||
CWnd* w = getTabWnd(curr);
|
||||
curr = index;
|
||||
|
||||
refresh();
|
||||
SetCurSel(curr);
|
||||
if (w)
|
||||
w->ShowWindow(SW_HIDE);
|
||||
}
|
||||
|
||||
if (listener)
|
||||
listener->currentSet(this, curr);
|
||||
}
|
||||
|
||||
void Tabber::setTabText(int index, const string& t)
|
||||
{
|
||||
if (index < 0 || index >= tabs.size())
|
||||
return;
|
||||
|
||||
string s = t + '\0';
|
||||
TCITEM tc = {TCIF_TEXT};
|
||||
tc.pszText = (char*)s.data();
|
||||
SetItem(index, &tc);
|
||||
}
|
||||
|
||||
int Tabber::size() const
|
||||
{
|
||||
return tabs.size();
|
||||
}
|
||||
|
||||
int Tabber::getCurrent() const
|
||||
{
|
||||
return curr;
|
||||
}
|
||||
|
||||
CWnd* Tabber::getTabWnd(int index) const
|
||||
{
|
||||
Tab* t = getTab(index);
|
||||
return t ? t->wnd : 0;
|
||||
}
|
||||
|
||||
string Tabber::getTabText(int index) const
|
||||
{
|
||||
Tab* t = getTab(index);
|
||||
return t ? t->text : "";
|
||||
}
|
||||
@@ -0,0 +1,87 @@
|
||||
|
||||
#include <string>
|
||||
#include <windows.h>
|
||||
|
||||
#include "checkdx.h"
|
||||
#include "checkie.h"
|
||||
|
||||
using namespace std;
|
||||
|
||||
static const char* dx_err =
|
||||
"You must have DirectX version 7 installed to run Blitz Basic.\n\n"
|
||||
"DirectX 7 is provided on the Blitz Basic CD in the DirectX7 folder.\n\n"
|
||||
"The latest version of DirectX is available from www.microsoft.com";
|
||||
|
||||
static const char* ie_err =
|
||||
"You must have Internet Explorer version 4 installed to run Blitz Basic.\n\n"
|
||||
"Internet Explorer 5 is provided on the Blitz Basic CD in the IExplorer5 folder.\n\n"
|
||||
"The latest version of Internet Explorer is available from www.microsoft.com";
|
||||
|
||||
static const char* bb_err = "Unable to run Blitz Basic";
|
||||
|
||||
static const char* md_err =
|
||||
"Your desktop must be in high-colour mode to use Blitz Basic.\n\n"
|
||||
"You can change your display settings from the control panel.";
|
||||
|
||||
static string getAppDir()
|
||||
{
|
||||
char buff[MAX_PATH];
|
||||
if (GetModuleFileName(0, buff, MAX_PATH)) {
|
||||
string t = buff;
|
||||
int n = t.find_last_of('\\');
|
||||
if (n != string::npos)
|
||||
t = t.substr(0, n);
|
||||
return t;
|
||||
}
|
||||
return "";
|
||||
}
|
||||
|
||||
static void fail(const char* p)
|
||||
{
|
||||
::MessageBox(0, p, "Blitz Basic Error", MB_SETFOREGROUND | MB_TOPMOST | MB_ICONERROR);
|
||||
ExitProcess(-1);
|
||||
}
|
||||
|
||||
static int desktopDepth()
|
||||
{
|
||||
HDC hdc = GetDC(GetDesktopWindow());
|
||||
return GetDeviceCaps(hdc, BITSPIXEL);
|
||||
}
|
||||
|
||||
int _stdcall WinMain(HINSTANCE inst, HINSTANCE prev, char* cmd, int show)
|
||||
{
|
||||
if (desktopDepth() < 16)
|
||||
fail(md_err);
|
||||
|
||||
#ifndef PLUS
|
||||
if (getDXVersion() < 7)
|
||||
fail(dx_err);
|
||||
#endif
|
||||
|
||||
if (getIEVersion() < 4)
|
||||
fail(ie_err);
|
||||
|
||||
//Ugly hack to get application dir...
|
||||
string blitzIdePath = getAppDir();
|
||||
_putenv(("blitzpath=" + blitzIdePath).c_str());
|
||||
SetCurrentDirectory(blitzIdePath.c_str());
|
||||
blitzIdePath = blitzIdePath + "\\bin\\ide.exe " + cmd;
|
||||
|
||||
STARTUPINFO si;
|
||||
PROCESS_INFORMATION pi;
|
||||
ZeroMemory(&si, sizeof(si));
|
||||
si.cb = sizeof(si);
|
||||
if (!CreateProcess(0, (char*)blitzIdePath.c_str(), 0, 0, 0, 0, 0, 0, &si, &pi)) {
|
||||
::MessageBox(0, bb_err, "Blitz Basic Error", MB_SETFOREGROUND | MB_TOPMOST | MB_ICONERROR);
|
||||
ExitProcess(-1);
|
||||
}
|
||||
|
||||
//wait for BB to start
|
||||
WaitForInputIdle(pi.hProcess, INFINITE);
|
||||
|
||||
// Close process and thread handles.
|
||||
CloseHandle(pi.hProcess);
|
||||
CloseHandle(pi.hThread);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
Before Width: | Height: | Size: 2.2 KiB After Width: | Height: | Size: 2.2 KiB |
@@ -0,0 +1,336 @@
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// File: GetDXVer.cpp
|
||||
//
|
||||
// Desc: Demonstrates how applications can detect what version of DirectX
|
||||
// is installed.
|
||||
//
|
||||
// (C) Copyright 1995-1997 Microsoft Corp. All rights reserved.
|
||||
//-----------------------------------------------------------------------------
|
||||
#include <ddraw.h>
|
||||
#include <windows.h>
|
||||
#include <windowsx.h>
|
||||
#define DIRECTINPUT_VERSION 0x0700
|
||||
#include <dinput.h>
|
||||
//#include <dmusici.h>
|
||||
|
||||
typedef HRESULT(WINAPI* DIRECTDRAWCREATE)(GUID*, LPDIRECTDRAW*, IUnknown*);
|
||||
typedef HRESULT(WINAPI* DIRECTDRAWCREATEEX)(GUID*, VOID**, REFIID, IUnknown*);
|
||||
typedef HRESULT(WINAPI* DIRECTINPUTCREATE)(HINSTANCE, DWORD, LPDIRECTINPUT*, IUnknown*);
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Name: GetDXVersion()
|
||||
// Desc: This function returns two arguments:
|
||||
// dwDXVersion:
|
||||
// 0x0000 = No DirectX installed
|
||||
// 0x0100 = DirectX version 1 installed
|
||||
// 0x0200 = DirectX 2 installed
|
||||
// 0x0300 = DirectX 3 installed
|
||||
// 0x0500 = At least DirectX 5 installed.
|
||||
// 0x0600 = At least DirectX 6 installed.
|
||||
// 0x0601 = At least DirectX 6.1 installed.
|
||||
// 0x0700 = At least DirectX 7 installed.
|
||||
// dwDXPlatform:
|
||||
// 0 = Unknown (This is a failure case)
|
||||
// VER_PLATFORM_WIN32_WINDOWS = Windows 9X platform
|
||||
// VER_PLATFORM_WIN32_NT = Windows NT platform
|
||||
//
|
||||
// Please note that this code is intended as a general guideline. Your
|
||||
// app will probably be able to simply query for functionality (via
|
||||
// QueryInterface) for one or two components.
|
||||
//
|
||||
// Please also note:
|
||||
// "if (dxVer != 0x500) return FALSE;" is BAD.
|
||||
// "if (dxVer < 0x500) return FALSE;" is MUCH BETTER.
|
||||
// to ensure your app will run on future releases of DirectX.
|
||||
//-----------------------------------------------------------------------------
|
||||
VOID GetDXVersion(DWORD* pdwDXVersion, DWORD* pdwDXPlatform)
|
||||
{
|
||||
*pdwDXVersion = 0x0700;
|
||||
*pdwDXPlatform = VER_PLATFORM_WIN32_NT;
|
||||
// HRESULT hr;
|
||||
// HINSTANCE DDHinst = 0;
|
||||
// HINSTANCE DIHinst = 0;
|
||||
// LPDIRECTDRAW pDDraw = 0;
|
||||
// LPDIRECTDRAW2 pDDraw2 = 0;
|
||||
// DIRECTDRAWCREATE DirectDrawCreate = 0;
|
||||
// DIRECTDRAWCREATEEX DirectDrawCreateEx = 0;
|
||||
// DIRECTINPUTCREATE DirectInputCreate = 0;
|
||||
// OSVERSIONINFO osVer;
|
||||
// LPDIRECTDRAWSURFACE pSurf = 0;
|
||||
// LPDIRECTDRAWSURFACE3 pSurf3 = 0;
|
||||
// LPDIRECTDRAWSURFACE4 pSurf4 = 0;
|
||||
|
||||
// // First get the windows platform
|
||||
// osVer.dwOSVersionInfoSize = sizeof(osVer);
|
||||
// if( !GetVersionEx( &osVer ) )
|
||||
// {
|
||||
// (*pdwDXPlatform) = 0;
|
||||
// (*pdwDXVersion) = 0;
|
||||
// return;
|
||||
// }
|
||||
|
||||
// if( osVer.dwPlatformId == VER_PLATFORM_WIN32_NT )
|
||||
// {
|
||||
// (*pdwDXPlatform) = VER_PLATFORM_WIN32_NT;
|
||||
|
||||
// // NT is easy... NT 4.0 is DX2, 4.0 SP3 is DX3, 5.0 is DX5
|
||||
// // and no DX on earlier versions.
|
||||
// if( osVer.dwMajorVersion < 4 )
|
||||
// {
|
||||
// (*pdwDXVersion) = 0; // No DX on NT3.51 or earlier
|
||||
// return;
|
||||
// }
|
||||
|
||||
// if( osVer.dwMajorVersion == 4 )
|
||||
// {
|
||||
// // NT4 up to SP2 is DX2, and SP3 onwards is DX3, so we are at least DX2
|
||||
// (*pdwDXVersion) = 0x200;
|
||||
|
||||
// // We're not supposed to be able to tell which SP we're on, so check for dinput
|
||||
// DIHinst = LoadLibrary( "DINPUT.DLL" );
|
||||
// if( DIHinst == 0 )
|
||||
// {
|
||||
// // No DInput... must be DX2 on NT 4 pre-SP3
|
||||
// OutputDebugString( "Couldn't LoadLibrary DInput\r\n" );
|
||||
// return;
|
||||
// }
|
||||
|
||||
// DirectInputCreate = (DIRECTINPUTCREATE)GetProcAddress( DIHinst,
|
||||
// "DirectInputCreateA" );
|
||||
// FreeLibrary( DIHinst );
|
||||
|
||||
// if( DirectInputCreate == 0 )
|
||||
// {
|
||||
// // No DInput... must be pre-SP3 DX2
|
||||
// OutputDebugString( "Couldn't GetProcAddress DInputCreate\r\n" );
|
||||
// return;
|
||||
// }
|
||||
|
||||
// // It must be NT4, DX2
|
||||
// (*pdwDXVersion) = 0x300; // DX3 on NT4 SP3 or higher
|
||||
// return;
|
||||
// }
|
||||
// // Else it's NT5 or higher, and it's DX5a or higher: Drop through to
|
||||
// // Win9x tests for a test of DDraw (DX6 or higher)
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// // Not NT... must be Win9x
|
||||
// (*pdwDXPlatform) = VER_PLATFORM_WIN32_WINDOWS;
|
||||
// }
|
||||
|
||||
// // Now we know we are in Windows 9x (or maybe 3.1), so anything's possible.
|
||||
// // First see if DDRAW.DLL even exists.
|
||||
// DDHinst = LoadLibrary( "DDRAW.DLL" );
|
||||
// if( DDHinst == 0 )
|
||||
// {
|
||||
// (*pdwDXVersion) = 0;
|
||||
// (*pdwDXPlatform) = 0;
|
||||
// FreeLibrary( DDHinst );
|
||||
// return;
|
||||
// }
|
||||
|
||||
// // See if we can create the DirectDraw object.
|
||||
// DirectDrawCreate = (DIRECTDRAWCREATE)GetProcAddress( DDHinst, "DirectDrawCreate" );
|
||||
// if( DirectDrawCreate == 0 )
|
||||
// {
|
||||
// (*pdwDXVersion) = 0;
|
||||
// (*pdwDXPlatform) = 0;
|
||||
// FreeLibrary( DDHinst );
|
||||
// OutputDebugString( "Couldn't LoadLibrary DDraw\r\n" );
|
||||
// return;
|
||||
// }
|
||||
|
||||
// hr = DirectDrawCreate( NULL, &pDDraw, NULL );
|
||||
// if( FAILED(hr) )
|
||||
// {
|
||||
// (*pdwDXVersion) = 0;
|
||||
// (*pdwDXPlatform) = 0;
|
||||
// FreeLibrary( DDHinst );
|
||||
// OutputDebugString( "Couldn't create DDraw\r\n" );
|
||||
// return;
|
||||
// }
|
||||
|
||||
// // So DirectDraw exists. We are at least DX1.
|
||||
// (*pdwDXVersion) = 0x100;
|
||||
|
||||
// // Let's see if IID_IDirectDraw2 exists.
|
||||
// hr = pDDraw->QueryInterface( IID_IDirectDraw2, (VOID**)&pDDraw2 );
|
||||
// if( FAILED(hr) )
|
||||
// {
|
||||
// // No IDirectDraw2 exists... must be DX1
|
||||
// pDDraw->Release();
|
||||
// FreeLibrary( DDHinst );
|
||||
// OutputDebugString( "Couldn't QI DDraw2\r\n" );
|
||||
// return;
|
||||
// }
|
||||
|
||||
// // IDirectDraw2 exists. We must be at least DX2
|
||||
// pDDraw2->Release();
|
||||
// (*pdwDXVersion) = 0x200;
|
||||
|
||||
// ///////////////////////////////////////////////////////////////////////////
|
||||
// // DirectX 3.0 Checks
|
||||
// ///////////////////////////////////////////////////////////////////////////
|
||||
|
||||
// // DirectInput was added for DX3
|
||||
// DIHinst = LoadLibrary( "DINPUT.DLL" );
|
||||
// if( DIHinst == 0 )
|
||||
// {
|
||||
// // No DInput... must not be DX3
|
||||
// OutputDebugString( "Couldn't LoadLibrary DInput\r\n" );
|
||||
// pDDraw->Release();
|
||||
// FreeLibrary( DDHinst );
|
||||
// return;
|
||||
// }
|
||||
|
||||
// DirectInputCreate = (DIRECTINPUTCREATE)GetProcAddress( DIHinst,
|
||||
// "DirectInputCreateA" );
|
||||
// if( DirectInputCreate == 0 )
|
||||
// {
|
||||
// // No DInput... must be DX2
|
||||
// FreeLibrary( DIHinst );
|
||||
// FreeLibrary( DDHinst );
|
||||
// pDDraw->Release();
|
||||
// OutputDebugString( "Couldn't GetProcAddress DInputCreate\r\n" );
|
||||
// return;
|
||||
// }
|
||||
|
||||
// // DirectInputCreate exists. We are at least DX3
|
||||
// (*pdwDXVersion) = 0x300;
|
||||
// FreeLibrary( DIHinst );
|
||||
|
||||
// // Can do checks for 3a vs 3b here
|
||||
|
||||
// ///////////////////////////////////////////////////////////////////////////
|
||||
// // DirectX 5.0 Checks
|
||||
// ///////////////////////////////////////////////////////////////////////////
|
||||
|
||||
// // We can tell if DX5 is present by checking for the existence of
|
||||
// // IDirectDrawSurface3. First, we need a surface to QI off of.
|
||||
// DDSURFACEDESC ddsd;
|
||||
// ZeroMemory( &ddsd, sizeof(ddsd) );
|
||||
// ddsd.dwSize = sizeof(ddsd);
|
||||
// ddsd.dwFlags = DDSD_CAPS;
|
||||
// ddsd.ddsCaps.dwCaps = DDSCAPS_PRIMARYSURFACE;
|
||||
|
||||
// hr = pDDraw->SetCooperativeLevel( NULL, DDSCL_NORMAL );
|
||||
// if( FAILED(hr) )
|
||||
// {
|
||||
// // Failure. This means DDraw isn't properly installed.
|
||||
// pDDraw->Release();
|
||||
// FreeLibrary( DDHinst );
|
||||
// (*pdwDXVersion) = 0;
|
||||
// OutputDebugString( "Couldn't Set coop level\r\n" );
|
||||
// return;
|
||||
// }
|
||||
|
||||
// hr = pDDraw->CreateSurface( &ddsd, &pSurf, NULL );
|
||||
// if( FAILED(hr) )
|
||||
// {
|
||||
// // Failure. This means DDraw isn't properly installed.
|
||||
// pDDraw->Release();
|
||||
// FreeLibrary( DDHinst );
|
||||
// *pdwDXVersion = 0;
|
||||
// OutputDebugString( "Couldn't CreateSurface\r\n" );
|
||||
// return;
|
||||
// }
|
||||
|
||||
// // Query for the IDirectDrawSurface3 interface
|
||||
// if( FAILED( pSurf->QueryInterface( IID_IDirectDrawSurface3,
|
||||
// (VOID**)&pSurf3 ) ) )
|
||||
// {
|
||||
// pDDraw->Release();
|
||||
// FreeLibrary( DDHinst );
|
||||
// return;
|
||||
// }
|
||||
|
||||
// // QI for IDirectDrawSurface3 succeeded. We must be at least DX5
|
||||
// (*pdwDXVersion) = 0x500;
|
||||
|
||||
// ///////////////////////////////////////////////////////////////////////////
|
||||
// // DirectX 6.0 Checks
|
||||
// ///////////////////////////////////////////////////////////////////////////
|
||||
|
||||
// // The IDirectDrawSurface4 interface was introduced with DX 6.0
|
||||
// if( FAILED( pSurf->QueryInterface( IID_IDirectDrawSurface4,
|
||||
// (VOID**)&pSurf4 ) ) )
|
||||
// {
|
||||
// pDDraw->Release();
|
||||
// FreeLibrary( DDHinst );
|
||||
// return;
|
||||
// }
|
||||
|
||||
// // IDirectDrawSurface4 was create successfully. We must be at least DX6
|
||||
// (*pdwDXVersion) = 0x600;
|
||||
// pSurf->Release();
|
||||
// pDDraw->Release();
|
||||
|
||||
// ///////////////////////////////////////////////////////////////////////////
|
||||
// // DirectX 6.1 Checks
|
||||
// ///////////////////////////////////////////////////////////////////////////
|
||||
|
||||
//// FIX: DirectMusic is deprecated.
|
||||
// //// Check for DMusic, which was introduced with DX6.1
|
||||
// //LPDIRECTMUSIC pDMusic = NULL;
|
||||
// //CoInitialize( NULL );
|
||||
// //hr = CoCreateInstance( CLSID_DirectMusic, NULL, CLSCTX_INPROC_SERVER,
|
||||
// // IID_IDirectMusic, (VOID**)&pDMusic );
|
||||
// //if( FAILED(hr) )
|
||||
// //{
|
||||
// // OutputDebugString( "Couldn't create CLSID_DirectMusic\r\n" );
|
||||
// // FreeLibrary( DDHinst );
|
||||
// // return;
|
||||
// //}
|
||||
|
||||
// //// DirectMusic was created successfully. We must be at least DX6.1
|
||||
// //(*pdwDXVersion) = 0x601;
|
||||
// //pDMusic->Release();
|
||||
// //CoUninitialize();
|
||||
//
|
||||
|
||||
// ///////////////////////////////////////////////////////////////////////////
|
||||
// // DirectX 7.0 Checks
|
||||
// ///////////////////////////////////////////////////////////////////////////
|
||||
|
||||
// // Check for DirectX 7 by creating a DDraw7 object
|
||||
// LPDIRECTDRAW7 pDD7;
|
||||
// DirectDrawCreateEx = (DIRECTDRAWCREATEEX)GetProcAddress( DDHinst,
|
||||
// "DirectDrawCreateEx" );
|
||||
// if( NULL == DirectDrawCreateEx )
|
||||
// {
|
||||
// FreeLibrary( DDHinst );
|
||||
// return;
|
||||
// }
|
||||
|
||||
// if( FAILED( DirectDrawCreateEx( NULL, (VOID**)&pDD7, IID_IDirectDraw7,
|
||||
// NULL ) ) )
|
||||
// {
|
||||
// FreeLibrary( DDHinst );
|
||||
// return;
|
||||
// }
|
||||
|
||||
// // DDraw7 was created successfully. We must be at least DX7.0
|
||||
// (*pdwDXVersion) = 0x700;
|
||||
// pDD7->Release();
|
||||
|
||||
//
|
||||
// ///////////////////////////////////////////////////////////////////////////
|
||||
// // End of checks
|
||||
// ///////////////////////////////////////////////////////////////////////////
|
||||
|
||||
// // Close open libraries and return
|
||||
// FreeLibrary( DDHinst );
|
||||
//
|
||||
return;
|
||||
}
|
||||
|
||||
int getDXVersion()
|
||||
{
|
||||
DWORD version, platform;
|
||||
|
||||
GetDXVersion(&version, &platform);
|
||||
|
||||
return (version >> 8) & 0xff;
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
|
||||
#include "checkie.h"
|
||||
#include <windows.h>
|
||||
|
||||
int getIEVersion()
|
||||
{
|
||||
int version = 0;
|
||||
|
||||
HKEY key = HKEY_LOCAL_MACHINE;
|
||||
if (RegOpenKey(key, "Software\\Microsoft\\Internet Explorer", &key) == ERROR_SUCCESS) {
|
||||
char buff[MAX_PATH];
|
||||
DWORD type, sz = MAX_PATH;
|
||||
if (RegQueryValueEx(key, "Version", 0, &type, (PBYTE)buff, &sz) == ERROR_SUCCESS) {
|
||||
version = 4;
|
||||
/*
|
||||
char temp[4];
|
||||
if( isdigit(buff[0]) && buff[1]=='.' && isdigit(buff[2]) && isdigit(buff[3]) && buff[4]=='.' ){
|
||||
temp[0]=buff[0];temp[1]=buff[2];temp[2]=buff[3];temp[3]=0;
|
||||
if( atoi(temp)>=471 ) version=4;
|
||||
}
|
||||
*/
|
||||
}
|
||||
RegCloseKey(key);
|
||||
}
|
||||
return version;
|
||||
}
|
||||
+2
-2
@@ -24,7 +24,7 @@ std::string filenamepath(const std::string& t);
|
||||
std::string filenamefile(const std::string& t);
|
||||
|
||||
//lazy version of auto_ptr
|
||||
template<class T>
|
||||
/*template<class T>
|
||||
class a_ptr {
|
||||
public:
|
||||
a_ptr(T* t = 0) : t(t) {}
|
||||
@@ -62,7 +62,7 @@ class a_ptr {
|
||||
|
||||
private:
|
||||
T* t;
|
||||
};
|
||||
};*/
|
||||
|
||||
//Speed-up for SLOW sstream
|
||||
class qstreambuf : public std::streambuf {
|
||||
|
||||
Reference in New Issue
Block a user