$pacman -Syu
$pacman -S mingw-w64-x86_64-gdb mingw-w64-x86_64-gcc mingw-w64-x86_64-boost zip svn
wget.exe -P "h:\i\CB_src\s\" "https://github.com/wxWidgets/wxWidgets/releases/download/v3.1.4/wxWidgets-3.1.4.zip" -N --compression=auto -l 16 -t 0 --retry-connrefused -e robots=off -np -x --max-redirect=60 --no-if-modified-since -o "wget_wx.log"
wget.exe -P "h:\i\CB_src\s\" "http://svn.code.sf.net/p/codeblocks/code/trunk/" -N -r --compression=auto -l 16 -t 0 --retry-connrefused -e robots=off -np -x --max-redirect=60 --no-if-modified-since -o "wget_cb.log"
svn.exe co --username you svn://svn.code.sf.net/p/codeblocks/code/trunk
chcp 65001
#$path_msys32 = "H:/I/msys32" ## <== change whereis MSYS2 save files
$path_msys64 = "H:/I/msys64" ## <== change whereis MSYS2 save files
$path_wx = "H:/I/CB_src/wxgtk" ## <== change whereis saved latest unpacked wxWidgets files
cd ($path_wx + "/build/msw")
##-- 32 bit
# $path_mingw32="$path_msys32/mingw32"
# $env:path +=";" + $path_mingw32
# $env:path +=";$path_mingw32\bin"
# $env:path +=";$path_mingw32\include"
##-- 64 bit
$path_mingw64="$path_msys64/mingw64"
$env:path +=";" + $path_mingw64
$env:path +=";$path_mingw64\bin"
$env:path +=";$path_mingw64\include"
#-- Before compile I change params in $path_wx/build/msw/config.gcc
#-- add _MSC_VER=1928 for enable direct2D but this not work
#-- need run if rebuild
mingw32-make -f makefile.gcc clean
if(Test-Path -PathType Container "$path_wx\lib\gcc_dll") {
#del "$path_wx\lib\gcc_dll"
rm -r -fo "$path_wx\lib\gcc_dll"
}
echo "`n-----------------------------------------------`n"
#-- need run once before compile
mingw32-make -f makefile.gcc setup_h
echo "`n-----------------------------------------------`n"
#-- build all wxWidgets
#-- recommends for arg -j#:
#-- -j(cores in CPU / 2) if cores >= 4
#-- not use this arg if cores >= 2
#mingw32-make -j4 -f makefile.gcc
mingw32-make -j2 -f makefile.gcc
echo "`n-----------------------------------------------`n"
#-- need if not found zip.exe in Windows
#$path_system32 = $env:ComSpec
#$path_system32 = $path_system32.SubString(0, $path_system32.Length-7)
#cd $path_system32
#$creds = Get-Credential
$arg = "/c" +
"mklink zip.exe $path_msys64\usr\bin\zip.exe" +
"& mklink msys-2.0.dll $path_msys64\usr\bin\msys-2.0.dll" +
"& mklink msys-bz2-1.dll $path_msys64\usr\bin\msys-bz2-1.dll"
Start-Process cmd -ArgumentList $arg -Verb runas
echo "`n-----------------------------------------------`n"
# =========================================================================
# This configuration file was generated by
# Bakefile 0.2.12 (http://www.bakefile.org)
# Beware that all changes made to this file will be overwritten next
# time you run Bakefile!
# =========================================================================
# -------------------------------------------------------------------------
# These are configurable options:
# -------------------------------------------------------------------------
_MSC_VER = 1928
# Compiler flags to link shared library
LINK_DLL_FLAGS ?= -shared
# Compiler flags to link loadable module
LINK_MODULE_FLAGS ?= -shared
# C compiler
CC = gcc
# C++ compiler
CXX = g++
# Standard flags for CC
CFLAGS ?=
# Standard flags for C++
CXXFLAGS ?=
# Standard preprocessor flags (common for CC and CXX)
CPPFLAGS ?=
# Standard linker flags
LDFLAGS ?=
# The C preprocessor
CPP ?= $(CC) -E
# What type of library to build? [0,1]
SHARED ?= 1
# GTK+ toolkit version [,2]
TOOLKIT_VERSION ?=
# Build wxUniversal instead of native port? [0,1]
WXUNIV ?= 0
# Compile Unicode build of wxWidgets? [0,1]
UNICODE ?= 1
# Type of compiled binaries [debug,release]
BUILD ?= release
# Should debugging info be included in the executables? The default value
# "default" means that debug info will be included if BUILD=debug
# and not included if BUILD=release. [0,1,default]
DEBUG_INFO ?= default
# Value of wxDEBUG_LEVEL. The default value is the same as 1 and means that all
# but expensive assert checks are enabled, use 0 to completely remove debugging
# code. [0,1,default]
DEBUG_FLAG ?= 1
# Multiple libraries or single huge monolithic one? [0,1]
MONOLITHIC ?= 1
# Build GUI libraries? [0,1]
USE_GUI ?= 1
# Build wxHTML library (USE_GUI must be 1)? [0,1]
USE_HTML ?= 1
# Build wxWebView library (USE_GUI must be 1)? [0,1]
USE_WEBVIEW ?= 1
# Build multimedia library (USE_GUI must be 1)? [0,1]
USE_MEDIA ?= 1
# Build wxXRC library (USE_GUI must be 1)? [0,1]
USE_XRC ?= 1
# Build wxAUI library (USE_GUI must be 1)? [0,1]
USE_AUI ?= 1
# Build wxRibbon library (USE_GUI must be 1)? [0,1]
USE_RIBBON ?= 1
# Build wxPropertyGrid library (USE_GUI must be 1)? [0,1]
USE_PROPGRID ?= 1
# Build wxRichTextCtrl library (USE_GUI must be 1)? [0,1]
USE_RICHTEXT ?= 1
# Build wxStyledTextCtrl library (USE_GUI must be 1)? [0,1]
USE_STC ?= 1
# Build OpenGL canvas library (USE_GUI must be 1)? [0,1]
USE_OPENGL ?= 1
# Build quality assurance classes library (USE_GUI must be 1)? [0,1]
USE_QA ?= 1
# Enable exceptions in compiled code. [0,1]
USE_EXCEPTIONS ?= 1
# Enable run-time type information (RTTI) in compiled code. [0,1]
USE_RTTI ?= 1
# Set DPI Awareness (win32) to none, system or per-monitor. [0,1,2]
USE_DPI_AWARE_MANIFEST ?= 2
# Enable threading in compiled code. [0,1]
USE_THREADS ?= 1
# Enable wxCairoContext for platforms other than Linux/GTK. [0,1]
USE_CAIRO ?= 0
# Is this official build by wxWidgets developers? [0,1]
OFFICIAL_BUILD ?= 0
# Use this to name your customized DLLs differently
VENDOR ?= omlk
#
WX_FLAVOUR ?=
#
WX_LIB_FLAVOUR ?=
# Name of your custom configuration. This affects directory
# where object files are stored as well as the location of
# compiled .lib files and setup.h under the lib/ toplevel directory.
CFG ?=
# Version of C runtime library to use. You can change this to
# static if SHARED=0, but it is highly recommended to not do
# it if SHARED=1 unless you know what you are doing. [dynamic,static]
RUNTIME_LIBS ?= dynamic
# Set the version of your Mingw installation here.
# "3" ...... this is for Mingw 2.0 or newer (comes with gcc3)
# "2.95" ... for Mingw 1.1 or any of the older versions [3,2.95]
GCC_VERSION ?= 3
# Windows resource compiler to use, possibly including extra options.
# For example, add "-F pe-i386" here if using 64 bit windres for 32 bit build.
WINDRES ?= windres
Great, now all you have to do is to reverse engineer all these generated Makefiles to figure out how to actually pass this definition to all required compiler calls as define.
Since, you do not want help why are you still posting on this website?
You either need to have a Windows zip command first in the path or edit the CB project to use the MSys2 zip command.
This is NOT a CB problem!
Tim S.
Since, you do not want help why are you still posting on this website?
You either need to have a Windows zip command first in the path or edit the CB project to use the MSys2 zip command.
This is NOT a CB problem!
Tim S.
So I want codeblocks to work correctly, and I show that there are bugs in codeblocks, and you claim that this is not a problem - and what do you think it is then?
Since, you do not want help why are you still posting on this website?
You either need to have a Windows zip command first in the path or edit the CB project to use the MSys2 zip command.
This is NOT a CB problem!
Tim S.
So I want codeblocks to work correctly, and I show that there are bugs in codeblocks, and you claim that this is not a problem - and what do you think it is then?
I can not help you! If you can not read and understand what you quoted then no one can help you on this website!
Tim S.
Since, you do not want help why are you still posting on this website?
You either need to have a Windows zip command first in the path or edit the CB project to use the MSys2 zip command.
This is NOT a CB problem!
Tim S.
So I want codeblocks to work correctly, and I show that there are bugs in codeblocks, and you claim that this is not a problem - and what do you think it is then?
I can not help you! If you can not read and understand what you quoted then no one can help you on this website!
Tim S.
Tell me then who can help me? Are you a codeblocks developer?
I have not idea, why you think posting patches as images is something worth doing. :)
Posting patches without explanation what problem do they fix is even bigger waste of your time. :)
For those like me that wonder which files are in the zip; here is the output of the tree command.You're right, I'm more interested in how my build works, do you have any comments?
One file that likely should not be in the zip is codeblocks.RPT
Tim S.
diff --git a/src/sdk/scripting/squirrel/sqdebug.cpp b/src/sdk/scripting/squirrel/sqdebug.cpp
index 7f96c4f..df3ef5f 100644
--- a/src/sdk/scripting/squirrel/sqdebug.cpp
+++ b/src/sdk/scripting/squirrel/sqdebug.cpp
@@ -76,7 +76,11 @@ SQString *SQVM::PrintObjVal(const SQObject &o)
case OT_INTEGER:
// C::B patch: Support for Windows 64 bit
#if defined(_WIN64)
- scsprintf(_sp(rsl(NUMBER_MAX_CHAR+1)), _SC("%I64d"), _integer(o));
+ #if defined(__USE_MINGW_ANSI_STDIO)
+ scsprintf(_sp(rsl(NUMBER_MAX_CHAR+1)), _SC("%lld"), _integer(o));
+ #else
+ scsprintf(_sp(rsl(NUMBER_MAX_CHAR+1)), _SC("%I64d"), _integer(o));
+ #endif
// C::B patch: Support for Linux 64 bit
#elif defined(_SQ64)
scsprintf(_sp(rsl(NUMBER_MAX_CHAR+1)), _SC("%ld"), _integer(o));
diff --git a/src/sdk/scripting/squirrel/sqfuncstate.cpp b/src/sdk/scripting/squirrel/sqfuncstate.cpp
index f98c757..28e55c7 100644
--- a/src/sdk/scripting/squirrel/sqfuncstate.cpp
+++ b/src/sdk/scripting/squirrel/sqfuncstate.cpp
@@ -82,7 +82,11 @@ void DumpLiteral(SQObjectPtr &o)
case OT_INTEGER:
// C::B patch: Support for Windows 64 bit
#if defined(_WIN64)
- scprintf(_SC("{%I64d}"),_integer(o));
+ #if defined(__USE_MINGW_ANSI_STDIO)
+ scprintf(_SC("{%lld}"),_integer(o));
+ #else
+ scprintf(_SC("{%I64d}"),_integer(o));
+ #endif
// C::B patch: Support for Linux 64 bit
#elif defined(_SQ64)
scprintf(_SC("{%ld}"),_integer(o));
diff --git a/src/sdk/scripting/squirrel/sqvm.cpp b/src/sdk/scripting/squirrel/sqvm.cpp
index b1e91b5..d12f959 100644
--- a/src/sdk/scripting/squirrel/sqvm.cpp
+++ b/src/sdk/scripting/squirrel/sqvm.cpp
@@ -251,7 +251,11 @@ void SQVM::ToString(const SQObjectPtr &o,SQObjectPtr &res)
case OT_INTEGER:
// C::B patch: Support for Windows 64 bit
#if defined(_WIN64)
- scsprintf(_sp(rsl(NUMBER_MAX_CHAR+1)),_SC("%I64d"),_integer(o));
+ #if defined(__USE_MINGW_ANSI_STDIO)
+ scsprintf(_sp(rsl(NUMBER_MAX_CHAR+1)),_SC("%lld"),_integer(o));
+ #else
+ scsprintf(_sp(rsl(NUMBER_MAX_CHAR+1)),_SC("%I64d"),_integer(o));
+ #endif
// C::B patch: Support for Linux 64 bit
#elif defined(_SQ64)
scsprintf(_sp(rsl(NUMBER_MAX_CHAR+1)),_SC("%ld"),_integer(o));
Patching it for what? What is the error you're trying to fix?
I'm pretty sure we're not supposed to use __USE_MINGW_ANSI_STDIO.
@stahta01: I guess omlk wanted to point you to PRxNN macros, but he/she was so vague that I'm not sure he/she succeeded :)
/* We are activating __USE_MINGW_ANSI_STDIO for various define indicators.
* printf ll modifier (unsupported by msvcrt.dll) is required by C99 and C++11 standards. */
#if (defined (_POSIX) || defined (_POSIX_SOURCE) || defined (_POSIX_C_SOURCE) \
|| defined (_ISOC99_SOURCE) \
|| (defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L && __MSVCRT_VERSION__ < 0xE00) \
|| (defined (__cplusplus) && __cplusplus >= 201103L && __MSVCRT_VERSION__ < 0xE00) \
|| defined (_XOPEN_SOURCE) || defined (_XOPEN_SOURCE_EXTENDED) \
|| defined (_GNU_SOURCE) \
|| defined (_SVID_SOURCE)) \
&& !defined(__USE_MINGW_ANSI_STDIO)
/* Enable __USE_MINGW_ANSI_STDIO if user did _not_ specify it explicitly... */
# define __USE_MINGW_ANSI_STDIO 1
#endif
/* We are defining __USE_MINGW_ANSI_STDIO as 0 or 1 */
#if !defined(__USE_MINGW_ANSI_STDIO)
#define __USE_MINGW_ANSI_STDIO 0 /* was not defined so it should be 0 */
#elif (__USE_MINGW_ANSI_STDIO + 0) != 0 || (1 - __USE_MINGW_ANSI_STDIO - 1) == 2
#define __USE_MINGW_ANSI_STDIO 1 /* was defined as nonzero or empty so it should be 1 */
#else
#define __USE_MINGW_ANSI_STDIO 0 /* was defined as (int)zero and non-empty so it should be 0 */
#endif