Skip to content

Commit

Permalink
Removed wx-config from the workspace build order
Browse files Browse the repository at this point in the history
Windows process: always set dwRead to 0 before calling the process, in addition, attempt to reserve enough memory before appending
  • Loading branch information
eranif committed Jul 17, 2021
1 parent fa6cfbe commit a2c7704
Show file tree
Hide file tree
Showing 71 changed files with 807 additions and 813 deletions.
10 changes: 5 additions & 5 deletions AutoSave/AutoSave.project
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,6 @@
<File Name="AutoSaveUI.cpp"/>
</VirtualDirectory>
</VirtualDirectory>
<Dependencies Name="Win_x64_Debug"/>
<Dependencies Name="Win_x64_Release">
<Project Name="plugin_sdk"/>
</Dependencies>
<Dependencies Name="Win_x86_Release"/>
<Settings Type="Dynamic Library">
<GlobalSettings>
<Compiler Options="" C_Options="" Assembler="">
Expand Down Expand Up @@ -231,4 +226,9 @@
</Completion>
</Configuration>
</Settings>
<Dependencies Name="Win_x64_Debug"/>
<Dependencies Name="Win_x64_Release">
<Project Name="plugin_sdk"/>
</Dependencies>
<Dependencies Name="Win_x86_Release"/>
</CodeLite_Project>
8 changes: 4 additions & 4 deletions CMakePlugin/CMakePlugin.project
Original file line number Diff line number Diff line change
Expand Up @@ -93,10 +93,6 @@
</VirtualDirectory>
<File Name="CMakePlugin.wxcp"/>
</VirtualDirectory>
<Dependencies Name="Win_wxWidgets_29"/>
<Dependencies Name="Win_x64_Debug"/>
<Dependencies Name="Win_x64_Release"/>
<Dependencies Name="Win_x86_Release"/>
<Settings Type="Dynamic Library">
<GlobalSettings>
<Compiler Options="" C_Options="" Assembler="">
Expand Down Expand Up @@ -338,4 +334,8 @@
</Completion>
</Configuration>
</Settings>
<Dependencies Name="Win_wxWidgets_29"/>
<Dependencies Name="Win_x64_Debug"/>
<Dependencies Name="Win_x64_Release"/>
<Dependencies Name="Win_x86_Release"/>
</CodeLite_Project>
10 changes: 5 additions & 5 deletions CallGraph/CallGraph.project
Original file line number Diff line number Diff line change
Expand Up @@ -59,11 +59,6 @@
<File Name="uicallgraphpanel.cpp"/>
<File Name="toolbaricons.h"/>
</VirtualDirectory>
<Dependencies Name="DebugUnicode"/>
<Dependencies Name="ReleaseUnicode"/>
<Dependencies Name="Win_x64_Debug"/>
<Dependencies Name="Win_x64_Release"/>
<Dependencies Name="Win_x86_Release"/>
<Settings Type="Dynamic Library">
<GlobalSettings>
<Compiler Options="" C_Options="" Assembler="">
Expand Down Expand Up @@ -366,4 +361,9 @@
</Completion>
</Configuration>
</Settings>
<Dependencies Name="DebugUnicode"/>
<Dependencies Name="ReleaseUnicode"/>
<Dependencies Name="Win_x64_Debug"/>
<Dependencies Name="Win_x64_Release"/>
<Dependencies Name="Win_x86_Release"/>
</CodeLite_Project>
15 changes: 8 additions & 7 deletions CodeCompletionsTests/CCTest/CCTest.project
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@






<File Name="tests/test_wxarraystr.h"/>
Expand Down Expand Up @@ -103,13 +104,6 @@
<File Name="tester.h"/>
<File Name="tester.cpp"/>
</VirtualDirectory>
<Dependencies Name="CMake_Debug"/>
<Dependencies Name="Debug">
<Project Name="libCodeLite"/>
</Dependencies>
<Dependencies Name="Debug_Unix"/>
<Dependencies Name="Release"/>
<Dependencies Name="Release_Unix"/>
<Settings Type="Executable">
<GlobalSettings>
<Compiler Options="" C_Options="" Assembler="">
Expand Down Expand Up @@ -361,4 +355,11 @@ PATH=../../$(WorkspacePath)/build-$(WorkspaceConfiguration)/lib;$(WXWIN)/lib/gcc
</Completion>
</Configuration>
</Settings>
<Dependencies Name="CMake_Debug"/>
<Dependencies Name="Debug">
<Project Name="libCodeLite"/>
</Dependencies>
<Dependencies Name="Debug_Unix"/>
<Dependencies Name="Release"/>
<Dependencies Name="Release_Unix"/>
</CodeLite_Project>
4 changes: 2 additions & 2 deletions CodeCompletionsTests/SampleWorkspace/SampleWorksapce.project
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,6 @@
<VirtualDirectory Name="src">
<File Name="header.h"/>
</VirtualDirectory>
<Dependencies Name="Debug"/>
<Dependencies Name="Release"/>
<Settings Type="Executable">
<GlobalSettings>
<Compiler Options="" C_Options="" Assembler="">
Expand Down Expand Up @@ -129,4 +127,6 @@ $BOOST_HOME</SearchPaths>
</Completion>
</Configuration>
</Settings>
<Dependencies Name="Debug"/>
<Dependencies Name="Release"/>
</CodeLite_Project>
8 changes: 4 additions & 4 deletions CodeFormatter/CodeFormatter.project
Original file line number Diff line number Diff line change
Expand Up @@ -94,10 +94,6 @@
<File Name="PHPFormatterBuffer.cpp"/>
<File Name="PHPFormatterBuffer.h"/>
</VirtualDirectory>
<Dependencies Name="Win_wxWidgets_29"/>
<Dependencies Name="Win_x64_Debug"/>
<Dependencies Name="Win_x64_Release"/>
<Dependencies Name="Win_x86_Release"/>
<Settings Type="Dynamic Library">
<GlobalSettings>
<Compiler Options="" C_Options="" Assembler="">
Expand Down Expand Up @@ -330,4 +326,8 @@
</Completion>
</Configuration>
</Settings>
<Dependencies Name="Win_wxWidgets_29"/>
<Dependencies Name="Win_x64_Debug"/>
<Dependencies Name="Win_x64_Release"/>
<Dependencies Name="Win_x86_Release"/>
</CodeLite_Project>
22 changes: 11 additions & 11 deletions CodeLite/CodeLite.project
Original file line number Diff line number Diff line change
Expand Up @@ -509,17 +509,6 @@
<File Name="clFileSystemWatcher.h"/>
<File Name="clFileSystemWatcher.cpp"/>
</VirtualDirectory>
<Dependencies Name="CMake_Debug"/>
<Dependencies Name="Win_wxWidgets_29"/>
<Dependencies Name="Win_x64_Debug"/>
<Dependencies Name="Win_x86_Release">
<Project Name="PCH"/>
</Dependencies>
<Dependencies Name="Win_x64_Release">
<Project Name="sqlite3"/>
<Project Name="wxsqlite3"/>
<Project Name="wxshapeframework"/>
</Dependencies>
<Settings Type="Dynamic Library">
<GlobalSettings>
<Compiler Options="" C_Options="" Assembler="">
Expand Down Expand Up @@ -813,4 +802,15 @@ PhpLexer.cpp: PhpLexer.l
</Completion>
</Configuration>
</Settings>
<Dependencies Name="CMake_Debug"/>
<Dependencies Name="Win_wxWidgets_29"/>
<Dependencies Name="Win_x64_Debug"/>
<Dependencies Name="Win_x64_Release">
<Project Name="sqlite3"/>
<Project Name="wxsqlite3"/>
<Project Name="wxshapeframework"/>
</Dependencies>
<Dependencies Name="Win_x86_Release">
<Project Name="PCH"/>
</Dependencies>
</CodeLite_Project>
20 changes: 11 additions & 9 deletions CodeLite/winprocess_impl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,16 +24,17 @@
//////////////////////////////////////////////////////////////////////////////

#ifdef __WXMSW__
#include "winprocess_impl.h"
#include "file_logger.h"
#include "fileutils.h"
#include "processreaderthread.h"
#include "procutils.h"
#include "smart_ptr.h"
#include "winprocess_impl.h"
#include <atomic>
#include <memory>
#include <wx/filefn.h>
#include <wx/msgqueue.h>
#include <wx/string.h>

#ifdef _WIN32_WINNT
#undef _WIN32_WINNT
Expand Down Expand Up @@ -560,28 +561,29 @@ void WinProcessImpl::StartReaderThread()

bool WinProcessImpl::DoReadFromPipe(HANDLE pipe, wxString& buff)
{
DWORD dwRead;
DWORD dwRead = 0;
DWORD dwMode;
DWORD dwTimeout;

// Make the pipe to non-blocking mode
dwMode = PIPE_READMODE_BYTE | PIPE_NOWAIT;
dwTimeout = 1000;
dwTimeout = 100;
SetNamedPipeHandleState(pipe, &dwMode, NULL, &dwTimeout);

bool read_something = false;
while(true) {
BOOL bRes = ReadFile(pipe, m_buffer, sizeof(m_buffer) - 1, &dwRead, NULL);
if(bRes) {
BOOL bRes = ReadFile(pipe, m_buffer, BUFFER_SIZE - 1, &dwRead, NULL);
if(bRes && (dwRead > 0)) {
wxString tmpBuff;
tmpBuff.reserve(dwRead * 2); // make enough room for the conversion
// Success read
m_buffer[dwRead / sizeof(char)] = 0;
tmpBuff = wxString(m_buffer, wxConvUTF8);
tmpBuff = wxString(m_buffer, wxConvUTF8, dwRead);
if(tmpBuff.IsEmpty() && dwRead > 0) {
// conversion failed
tmpBuff = wxString::From8BitData(m_buffer);
tmpBuff = wxString::From8BitData(m_buffer, dwRead);
}
buff << tmpBuff;
buff.reserve(buff.size() + tmpBuff.size() + 1);
buff.Append(tmpBuff);
read_something = true;
continue;
}
Expand Down
4 changes: 3 additions & 1 deletion CodeLite/winprocess_impl.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,11 @@
class ProcessReaderThread;
class WinWriterThread;

#define BUFFER_SIZE 16 * 1024

class WXDLLIMPEXP_CL WinProcessImpl : public IProcess
{
char m_buffer[65537];
char m_buffer[BUFFER_SIZE];
WinWriterThread* m_writerThread = nullptr;
std::unordered_set<long> m_initialChildren;

Expand Down
10 changes: 5 additions & 5 deletions CodeLiteDiff/CodeLiteDiff.project
Original file line number Diff line number Diff line change
Expand Up @@ -66,11 +66,6 @@
<File Name="CodeLiteDiff_UI.cpp"/>
</VirtualDirectory>
</VirtualDirectory>
<Dependencies Name="DebugUnicode"/>
<Dependencies Name="ReleaseUnicode"/>
<Dependencies Name="Win_x64_Debug"/>
<Dependencies Name="Win_x64_Release"/>
<Dependencies Name="Win_x86_Release"/>
<Settings Type="Dynamic Library">
<GlobalSettings>
<Compiler Options="" C_Options="" Assembler="">
Expand Down Expand Up @@ -375,4 +370,9 @@
</Completion>
</Configuration>
</Settings>
<Dependencies Name="DebugUnicode"/>
<Dependencies Name="ReleaseUnicode"/>
<Dependencies Name="Win_x64_Debug"/>
<Dependencies Name="Win_x64_Release"/>
<Dependencies Name="Win_x86_Release"/>
</CodeLite_Project>
12 changes: 0 additions & 12 deletions CodeLiteIDE.workspace
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,6 @@
<Project Name="makedir" Path="TestDir/makedir.project" Active="No"/>
<Project Name="codelite_indexer" Path="sdk/codelite_indexer/codelite_indexer.project" Active="No"/>
<Project Name="codelitegcc" Path="codelitegcc/codelitegcc.project" Active="No"/>
<Project Name="wx-config" Path="sdk/wxconfig/wx-config.project" Active="No"/>
<Project Name="codelite_cppcheck" Path="sdk/codelite_cppcheck/codelite_cppcheck.project" Active="No"/>
<Project Name="codelite_echo" Path="codelite_echo/codelite_echo.project" Active="No"/>
</VirtualDirectory>
Expand Down Expand Up @@ -168,7 +167,6 @@ WXCFG=gcc_dll\mswu</Environment>
<Project Name="makedir" ConfigName="Win_x86_Release"/>
<Project Name="codelite_indexer" ConfigName="Win_x86_Release"/>
<Project Name="codelitegcc" ConfigName="Win_x86_Release"/>
<Project Name="wx-config" ConfigName="Win_x86_Release"/>
<Project Name="codelite_cppcheck" ConfigName="Win_x86_Release"/>
<Project Name="codelite_echo" ConfigName="Win_x86_Release"/>
<Project Name="Rust" ConfigName="Win_x86_Release"/>
Expand Down Expand Up @@ -244,7 +242,6 @@ WXCFG=gcc_dll\mswu</Environment>
<Project Name="makedir" ConfigName="DebugUnicode"/>
<Project Name="codelite_indexer" ConfigName="Debug_Unix"/>
<Project Name="codelitegcc" ConfigName="Debug"/>
<Project Name="wx-config" ConfigName="Debug"/>
<Project Name="codelite_cppcheck" ConfigName="Debug"/>
<Project Name="codelite_echo" ConfigName="Debug"/>
<Project Name="Rust" ConfigName="DebugUnicode"/>
Expand Down Expand Up @@ -319,7 +316,6 @@ WXCFG=gcc_dll\mswu</Environment>
<Project Name="makedir" ConfigName="DebugUnicode"/>
<Project Name="codelite_indexer" ConfigName="Debug_Unix"/>
<Project Name="codelitegcc" ConfigName="Debug"/>
<Project Name="wx-config" ConfigName="Debug"/>
<Project Name="codelite_cppcheck" ConfigName="Debug"/>
<Project Name="codelite_echo" ConfigName="Debug"/>
<Project Name="Rust" ConfigName="DebugUnicode"/>
Expand Down Expand Up @@ -395,7 +391,6 @@ WXCFG=gcc_dll\mswu</Environment>
<Project Name="makedir" ConfigName="DebugUnicode"/>
<Project Name="codelite_indexer" ConfigName="Debug_Unix"/>
<Project Name="codelitegcc" ConfigName="Debug"/>
<Project Name="wx-config" ConfigName="Debug"/>
<Project Name="codelite_cppcheck" ConfigName="Debug"/>
<Project Name="codelite_echo" ConfigName="Debug"/>
<Project Name="Rust" ConfigName="DebugUnicode"/>
Expand Down Expand Up @@ -471,7 +466,6 @@ WXCFG=gcc_dll\mswu</Environment>
<Project Name="makedir" ConfigName="DebugUnicode"/>
<Project Name="codelite_indexer" ConfigName="Debug_Unix"/>
<Project Name="codelitegcc" ConfigName="Debug"/>
<Project Name="wx-config" ConfigName="Debug"/>
<Project Name="codelite_cppcheck" ConfigName="Debug"/>
<Project Name="codelite_echo" ConfigName="Debug"/>
<Project Name="Rust" ConfigName="DebugUnicode"/>
Expand Down Expand Up @@ -547,7 +541,6 @@ WXCFG=gcc_x64_dll/mswu</Environment>
<Project Name="makedir" ConfigName="Win_x64_Release"/>
<Project Name="codelite_indexer" ConfigName="Win_x64_Release"/>
<Project Name="codelitegcc" ConfigName="Win_x64_Release"/>
<Project Name="wx-config" ConfigName="Win_x64_Release"/>
<Project Name="codelite_cppcheck" ConfigName="Win_x64_Release"/>
<Project Name="codelite_echo" ConfigName="Win_x64_Release"/>
<Project Name="Rust" ConfigName="Win_x64_Release"/>
Expand Down Expand Up @@ -624,7 +617,6 @@ WXCFG=gcc_x64_dll/mswu
<Project Name="makedir" ConfigName="DebugUnicode"/>
<Project Name="codelite_indexer" ConfigName="Debug_Unix"/>
<Project Name="codelitegcc" ConfigName="Debug"/>
<Project Name="wx-config" ConfigName="Debug"/>
<Project Name="codelite_cppcheck" ConfigName="Debug"/>
<Project Name="codelite_echo" ConfigName="Debug"/>
<Project Name="Rust" ConfigName="Win_x64_Debug"/>
Expand Down Expand Up @@ -699,7 +691,6 @@ WXCFG=gcc_x64_dll/mswu
<Project Name="makedir" ConfigName="DebugUnicode"/>
<Project Name="codelite_indexer" ConfigName="Debug_Unix"/>
<Project Name="codelitegcc" ConfigName="Debug"/>
<Project Name="wx-config" ConfigName="Debug"/>
<Project Name="codelite_cppcheck" ConfigName="Debug"/>
<Project Name="codelite_echo" ConfigName="Debug"/>
<Project Name="Rust" ConfigName="DebugUnicode"/>
Expand Down Expand Up @@ -774,7 +765,6 @@ WXCFG=gcc_x64_dll/mswu
<Project Name="makedir" ConfigName="DebugUnicode"/>
<Project Name="codelite_indexer" ConfigName="Debug_Unix"/>
<Project Name="codelitegcc" ConfigName="Debug"/>
<Project Name="wx-config" ConfigName="Debug"/>
<Project Name="codelite_cppcheck" ConfigName="Debug"/>
<Project Name="codelite_echo" ConfigName="Debug"/>
<Project Name="Rust" ConfigName="DebugUnicode"/>
Expand Down Expand Up @@ -849,7 +839,6 @@ WXCFG=gcc_x64_dll/mswu
<Project Name="makedir" ConfigName="DebugUnicode"/>
<Project Name="codelite_indexer" ConfigName="Debug_Unix"/>
<Project Name="codelitegcc" ConfigName="Debug"/>
<Project Name="wx-config" ConfigName="Debug"/>
<Project Name="codelite_cppcheck" ConfigName="Debug"/>
<Project Name="codelite_echo" ConfigName="Debug"/>
<Project Name="Rust" ConfigName="DebugUnicode"/>
Expand Down Expand Up @@ -924,7 +913,6 @@ WXCFG=gcc_x64_dll/mswu
<Project Name="makedir" ConfigName="DebugUnicode"/>
<Project Name="codelite_indexer" ConfigName="Debug_Unix"/>
<Project Name="codelitegcc" ConfigName="Debug"/>
<Project Name="wx-config" ConfigName="Debug"/>
<Project Name="codelite_cppcheck" ConfigName="Debug"/>
<Project Name="codelite_echo" ConfigName="Debug"/>
<Project Name="Rust" ConfigName="DebugUnicode"/>
Expand Down
8 changes: 4 additions & 4 deletions ContinuousBuild/ContinuousBuild.project
Original file line number Diff line number Diff line change
Expand Up @@ -68,10 +68,6 @@
<File Name="continousbuildbasepane_continuousbuild_bitmaps.cpp"/>
</VirtualDirectory>
</VirtualDirectory>
<Dependencies Name="Win_wxWidgets_29"/>
<Dependencies Name="Win_x64_Debug"/>
<Dependencies Name="Win_x64_Release"/>
<Dependencies Name="Win_x86_Release"/>
<Settings Type="Dynamic Library">
<GlobalSettings>
<Compiler Options="" C_Options="" Assembler="">
Expand Down Expand Up @@ -317,4 +313,8 @@
</Completion>
</Configuration>
</Settings>
<Dependencies Name="Win_wxWidgets_29"/>
<Dependencies Name="Win_x64_Debug"/>
<Dependencies Name="Win_x64_Release"/>
<Dependencies Name="Win_x86_Release"/>
</CodeLite_Project>
8 changes: 4 additions & 4 deletions Copyright/Copyright.project
Original file line number Diff line number Diff line change
Expand Up @@ -52,10 +52,6 @@
<Dependencies Name="ReleaseUnicode"/>
<Dependencies Name="WinDebug_29"/>
<Dependencies Name="WinRelease_29"/>
<Dependencies Name="Win_wxWidgets_29"/>
<Dependencies Name="Win_x64_Debug"/>
<Dependencies Name="Win_x64_Release"/>
<Dependencies Name="Win_x86_Release"/>
<Settings Type="Dynamic Library">
<GlobalSettings>
<Compiler Options="" C_Options="" Assembler="">
Expand Down Expand Up @@ -301,4 +297,8 @@
</Completion>
</Configuration>
</Settings>
<Dependencies Name="Win_wxWidgets_29"/>
<Dependencies Name="Win_x64_Debug"/>
<Dependencies Name="Win_x64_Release"/>
<Dependencies Name="Win_x86_Release"/>
</CodeLite_Project>
Loading

0 comments on commit a2c7704

Please sign in to comment.