Skip to content

Commit

Permalink
mkfe + posix + x11
Browse files Browse the repository at this point in the history
  • Loading branch information
MarekKnapek committed Jul 30, 2024
1 parent e1b7dfc commit 92d943c
Show file tree
Hide file tree
Showing 192 changed files with 23,709 additions and 935 deletions.
29 changes: 29 additions & 0 deletions mk_clib/app/embed.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
#include "../src/mk_clib_app_embed.h"


#if (mk_lang_platform == mk_lang_platform_windows_61 || mk_lang_platform == mk_lang_platform_windows_60 || mk_lang_platform == mk_lang_platform_windows_51 || mk_lang_platform == mk_lang_platform_windows) && (defined mk_lang_nodefaultlib_want && mk_lang_nodefaultlib_want == 1)

mk_lang_extern_c mk_lang_types_void_t mkentry(mk_lang_types_void_pt const peb) mk_lang_noexcept
{
mk_lang_types_sint_t err;

err = mk_clib_app_embed_peb(peb);
mk_win_kernel_process_exit(((mk_lang_types_uint_t)(err)));
}

#elif mk_lang_platform == mk_lang_platform_windows_61 || mk_lang_platform == mk_lang_platform_windows_60 || mk_lang_platform == mk_lang_platform_windows

mk_lang_nodiscard mk_lang_types_sint_t mk_win_base_stdcall wWinMain(mk_win_base_instance_t const instance, mk_win_base_instance_t const prev, mk_win_base_wchar_lpct const cmd_line, mk_lang_types_sint_t const show) mk_lang_noexcept
{
return mk_clib_app_embed_arg(mk_lang_true, instance, prev, cmd_line, show);
}

#elif mk_lang_platform == mk_lang_platform_linux || mk_lang_platform == mk_lang_platform_portable

#error xxxxxxxxxx

#else

#error todo xxxxxxxxxx

#endif
29 changes: 29 additions & 0 deletions mk_clib/app/mkfe.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
#include "../src/mk_clib_app_fe.h"


#if (mk_lang_platform == mk_lang_platform_windows_61 || mk_lang_platform == mk_lang_platform_windows_60 || mk_lang_platform == mk_lang_platform_windows) && (defined mk_lang_nodefaultlib_want && mk_lang_nodefaultlib_want == 1)

mk_lang_extern_c mk_lang_types_void_t mkentry(mk_lang_types_void_pt const peb) mk_lang_noexcept
{
mk_lang_types_sint_t err;

err = mk_clib_app_fe_peb(peb);
mk_win_kernel_process_exit(((mk_lang_types_uint_t)(err)));
}

#elif mk_lang_platform == mk_lang_platform_windows_61 || mk_lang_platform == mk_lang_platform_windows_60 || mk_lang_platform == mk_lang_platform_windows

mk_lang_nodiscard mk_lang_types_sint_t mk_win_base_stdcall wWinMain(mk_win_base_instance_t const instance, mk_win_base_instance_t const prev, mk_win_base_wchar_lpct const cmd_line, mk_lang_types_sint_t const show) mk_lang_noexcept
{
return mk_clib_app_fe_arg(mk_lang_true, instance, prev, cmd_line, show);
}

#elif mk_lang_platform == mk_lang_platform_linux || mk_lang_platform == mk_lang_platform_portable

#error xxxxxxxxxx

#else

#error todo xxxxxxxxxx

#endif
1 change: 1 addition & 0 deletions mk_clib/projects/tcc/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,5 @@
/mkci.exe
/mkct.exe
/mkdefrag.exe
/mkfe.exe
/mkvc.exe
8 changes: 8 additions & 0 deletions mk_clib/projects/tcc/build_mkfe.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
tcc -impdef kernel32.dll && ^
tcc -impdef advapi32.dll && ^
tcc -impdef comctl32.dll && ^
tcc -O2 -DNDEBUG -D_WIN32_WINNT=0x0601 ^
..\..\app\mkfe.c ^
kernel32.def ^
advapi32.def ^
comctl32.def ^
121 changes: 121 additions & 0 deletions mk_clib/projects/tcc/comctl32.def
Original file line number Diff line number Diff line change
@@ -0,0 +1,121 @@
LIBRARY comctl32.dll

EXPORTS
AddMRUStringW
CreateMRUListW
CreateMappedBitmap
CreatePropertySheetPage
CreatePropertySheetPageA
CreatePropertySheetPageW
CreateStatusWindow
CreateStatusWindowA
CreateStatusWindowW
CreateToolbar
CreateToolbarEx
CreateUpDownControl
DPA_Clone
DPA_Create
DPA_CreateEx
DPA_DeleteAllPtrs
DPA_DeletePtr
DPA_Destroy
DPA_DestroyCallback
DPA_EnumCallback
DPA_GetPtr
DPA_GetPtrIndex
DPA_Grow
DPA_InsertPtr
DPA_LoadStream
DPA_Merge
DPA_SaveStream
DPA_Search
DPA_SetPtr
DPA_Sort
DSA_Create
DSA_DeleteAllItems
DSA_DeleteItem
DSA_Destroy
DSA_DestroyCallback
DSA_EnumCallback
DSA_GetItem
DSA_GetItemPtr
DSA_InsertItem
DSA_SetItem
DefSubclassProc
DestroyPropertySheetPage
DllGetVersion
DrawInsert
DrawStatusText
DrawStatusTextA
DrawStatusTextW
EnumMRUListW
FlatSB_EnableScrollBar
FlatSB_GetScrollInfo
FlatSB_GetScrollPos
FlatSB_GetScrollProp
FlatSB_GetScrollRange
FlatSB_SetScrollInfo
FlatSB_SetScrollPos
FlatSB_SetScrollProp
FlatSB_SetScrollRange
FlatSB_ShowScrollBar
FreeMRUList
GetEffectiveClientRect
GetMUILanguage
ImageList_Add
ImageList_AddIcon
ImageList_AddMasked
ImageList_BeginDrag
ImageList_Copy
ImageList_Create
ImageList_Destroy
ImageList_DragEnter
ImageList_DragLeave
ImageList_DragMove
ImageList_DragShowNolock
ImageList_Draw
ImageList_DrawEx
ImageList_DrawIndirect
ImageList_Duplicate
ImageList_EndDrag
ImageList_GetBkColor
ImageList_GetDragImage
ImageList_GetFlags
ImageList_GetIcon
ImageList_GetIconSize
ImageList_GetImageCount
ImageList_GetImageInfo
ImageList_GetImageRect
ImageList_LoadImage
ImageList_LoadImageA
ImageList_LoadImageW
ImageList_Merge
ImageList_Read
ImageList_Remove
ImageList_Replace
ImageList_ReplaceIcon
ImageList_SetBkColor
ImageList_SetDragCursorImage
ImageList_SetFilter
ImageList_SetFlags
ImageList_SetIconSize
ImageList_SetImageCount
ImageList_SetOverlayImage
ImageList_Write
InitCommonControls
InitCommonControlsEx
InitMUILanguage
InitializeFlatSB
LBItemFromPt
MakeDragList
MenuHelp
PropertySheet
PropertySheetA
PropertySheetW
RegisterClassNameW
RemoveWindowSubclass
SetWindowSubclass
ShowHideMenuCtl
Str_SetPtrW
UninitializeFlatSB
_TrackMouseEvent
49 changes: 49 additions & 0 deletions mk_clib/projects/tcc/out.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
Tiny C Compiler 0.9.28rc - Copyright (C) 2001-2006 Fabrice Bellard
Usage: tcc [options...] [-o outfile] [-c] infile(s)...
tcc [options...] -run infile (or --) [arguments...]
General options:
-c compile only - generate an object file
-o outfile set output filename
-run run compiled source
-fflag set or reset (with 'no-' prefix) 'flag' (see tcc -hh)
-std=c99 Conform to the ISO 1999 C standard (default).
-std=c11 Conform to the ISO 2011 C standard.
-Wwarning set or reset (with 'no-' prefix) 'warning' (see tcc -hh)
-w disable all warnings
-v --version show version
-vv show search paths or loaded files
-h -hh show this, show more help
-bench show compilation statistics
- use stdin pipe as infile
@listfile read arguments from listfile
Preprocessor options:
-Idir add include path 'dir'
-Dsym[=val] define 'sym' with value 'val'
-Usym undefine 'sym'
-E preprocess only
Linker options:
-Ldir add library path 'dir'
-llib link with dynamic or static library 'lib'
-r generate (relocatable) object file
-shared generate a shared library/dll
-rdynamic export all global symbols to dynamic linker
-soname set name for shared library to be used at runtime
-Wl,-opt[=val] set linker option (see tcc -hh)
Debugger options:
-g generate stab runtime debug info
-gdwarf[-x] generate dwarf runtime debug info
-g.pdb create .pdb debug database
-b compile with built-in memory and bounds checker (implies -g)
-bt[N] link with backtrace (stack dump) support [show max N callers]
Misc. options:
-x[c|a|b|n] specify type of the next infile (C,ASM,BIN,NONE)
-nostdinc do not use standard system include paths
-nostdlib do not link with standard crt and libraries
-Bdir set tcc's private include/library dir
-M[M]D generate make dependency file [ignore system files]
-M[M] as above but no other output
-MF file specify dependency file name
-m32/64 defer to i386/x86_64 cross compiler
Tools:
create library : tcc -ar [crstvx] lib [files]
create def file : tcc -impdef lib.dll [-v] [-o lib.def]
8 changes: 8 additions & 0 deletions mk_clib/projects/vs2022/embed/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
/ARM/
/ARM64/
/ARM64EC/
/Debug/
/Release/
/x64/

/embed.vcxproj.user
Loading

0 comments on commit 92d943c

Please sign in to comment.