Last active
June 12, 2025 12:48
-
-
Save proffix4/035327ddcd15d24945c702bf6ec0d00d to your computer and use it in GitHub Desktop.
build wxWidgets app version 3.3
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@echo off | |
:: Добавляем путь к папке mingw64 в переменную окружения PATH | |
set PATH=C:\Program Files\RedPanda-Cpp\mingw64\bin;%PATH% | |
:: Добавляем путь к папке Windows Kits в переменную окружения PATH | |
set PATH=C:\Program Files (x86)\Windows Kits\10\bin\10.0.26100.0\x64\;%PATH% | |
:: Устанавливаем переменную для пути к wxWidgets | |
set WX_DIR=C:\Development\wxDevCpp\wxWidgets | |
:: Указываем нужные библиотеки для сборки Release | |
set LIBS=-lwxmsw33u_core -lwxbase33u -lwxpng -lwxjpeg -lwxtiff -lwxzlib -lwxregexu ^ | |
-lgdiplus -lmsimg32 ^ | |
-lkernel32 -luser32 -lgdi32 -lwinspool -lcomdlg32 -ladvapi32 -lshell32 -lole32 -loleaut32 ^ | |
-luuid -lcomctl32 -lwsock32 -lodbc32 -lshlwapi -lversion -loleacc -luxtheme | |
:: Удаляем старый .exe файл если есть | |
if exist myapp.exe del myapp.exe | |
:: Компиляция с флагами | |
echo Compiling and assembling the program (static,release) ... | |
g++ -o myapp.exe *.cpp ^ | |
-I%WX_DIR%\include ^ | |
-I%WX_DIR%\lib\gcc_lib\mswu ^ | |
-L%WX_DIR%\lib\gcc_lib ^ | |
-mthreads ^ | |
%LIBS% ^ | |
-static ^ | |
-O2 ^ | |
-DNDEBUG ^ | |
-finput-charset=utf-8 ^ | |
-mwindows ^ | |
-lstdc++ ^ | |
-lsqlite3 | |
:: Добавляем манифест в программу | |
mt.exe -manifest wxapp_test.manifest -outputresource:myapp.exe;1 | |
:: Проверяем, успешно ли был собран .exe файл и запускаем его если все нормально | |
if exist myapp.exe ( | |
echo Compilation completed successfully. Launching program ... | |
start /b myapp.exe | |
) else ( | |
echo Compilation error ! | |
) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@echo off | |
:: Добавляем путь к папке mingw64 в переменную окружения PATH | |
set PATH=C:\Program Files\RedPanda-Cpp\mingw64\bin;%PATH% | |
:: Добавляем путь к папке Windows Kits в переменную окружения PATH | |
set PATH=C:\Program Files (x86)\Windows Kits\10\bin\10.0.26100.0\x64\;%PATH% | |
:: Устанавливаем переменную для пути к wxWidgets | |
set WX_DIR=C:\Development\wxDevCpp\wxWidgets | |
:: Указываем нужные библиотеки для Debug | |
set LIBS=-lwxmsw33ud_core -lwxbase33ud -lwxpngd -lwxjpegd -lwxtiffd -lwxzlibd -lwxregexud ^ | |
-lgdiplus -lmsimg32 ^ | |
-lkernel32 -luser32 -lgdi32 -lwinspool -lcomdlg32 -ladvapi32 -lshell32 -lole32 -loleaut32 ^ | |
-luuid -lcomctl32 -lwsock32 -lodbc32 -lshlwapi -lversion -loleacc -luxtheme | |
:: Удаляем старый .exe файл если есть | |
if exist myappd.exe del myappd.exe | |
:: Компиляция с флагами для Debug | |
echo Compiling and assembling the program (static,debug) ... | |
g++ -o myappd.exe *.cpp ^ | |
-I%WX_DIR%\include ^ | |
-I%WX_DIR%\lib\gcc_lib\mswud ^ | |
-L%WX_DIR%\lib\gcc_lib ^ | |
-mthreads ^ | |
%LIBS% ^ | |
-g ^ | |
-O0 ^ | |
-static ^ | |
-finput-charset=utf-8 ^ | |
-mwindows ^ | |
-lstdc++ ^ | |
-lsqlite3 | |
:: Добавляем манифест в программу | |
mt.exe -manifest wxapp_test.manifest -outputresource:myappd.exe;1 | |
:: Проверяем, успешно ли был собран .exe файл и запускаем его если все нормально | |
if exist myappd.exe ( | |
echo Compilation completed successfully. Launching program ... | |
start /b myappd.exe | |
) else ( | |
echo Compilation error ! | |
) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <wx/wx.h> | |
class MyApp : public wxApp { | |
public: | |
virtual bool OnInit() { | |
wxFrame* frame = new wxFrame(nullptr, wxID_ANY, "Hello wxWidgets!"); | |
frame->Show(true); | |
wxPuts(wxT("A wxWidgets console application\nTSN!")); | |
return true; | |
} | |
}; | |
wxIMPLEMENT_APP(MyApp); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> | |
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0"> | |
<dependency> | |
<dependentAssembly> | |
<assemblyIdentity | |
type="win32" | |
name="Microsoft.Windows.Common-Controls" | |
version="6.0.0.0" | |
processorArchitecture="*" | |
publicKeyToken="6595b64144ccf1df" | |
language="*" | |
/> | |
</dependentAssembly> | |
</dependency> | |
<trustInfo xmlns="urn:schemas-microsoft-com:asm.v3"> | |
<security> | |
<requestedPrivileges> | |
<requestedExecutionLevel level="asInvoker" uiAccess="false"/> | |
</requestedPrivileges> | |
</security> | |
</trustInfo> | |
<application xmlns="urn:schemas-microsoft-com:asm.v3"> | |
<windowsSettings> | |
<dpiAwareness xmlns="http://schemas.microsoft.com/SMI/2016/WindowsSettings">PerMonitorV2</dpiAwareness> | |
<dpiAware xmlns="http://schemas.microsoft.com/SMI/2005/WindowsSettings">true</dpiAware> | |
</windowsSettings> | |
</application> | |
</assembly> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment