-
Notifications
You must be signed in to change notification settings - Fork 200
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* feat(install): support msvc * chore(*): replace all __WIN32__ with MSVC * chore(docs): update docs for Melon installation and MSVC support * chore(docs): remove video link from docs * chore(install): add bat script and update conf and source files * chore(docs): update installation docs
- Loading branch information
1 parent
a37bb36
commit 180870a
Showing
116 changed files
with
1,920 additions
and
776 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
@echo off | ||
|
||
set "HOME=%HOMEDRIVE%%HOMEPATH%" | ||
|
||
echo Installation Path: [%HOME%/libmelon] | ||
echo Generating files and directories ... | ||
|
||
setlocal enabledelayedexpansion | ||
|
||
set "old=MLN_ROOT" | ||
set "new=!%HOME%!\libmelon" | ||
set "new=%new:\=\\%" | ||
|
||
set "file=src/mln_path.c" | ||
|
||
powershell -Command "(Get-Content '%file%') -replace '%old%', '\"%new%\"' | Set-Content '%file%'" | ||
|
||
|
||
set "old=MLN_NULL" | ||
set "new=!%HOME%!\libmelon\null" | ||
set "new=%new:\=\\%" | ||
|
||
set "file=src/mln_path.c" | ||
|
||
powershell -Command "(Get-Content '%file%') -replace '%old%', '\"%new%\"' | Set-Content '%file%'" | ||
|
||
|
||
set "old=MLN_LANG_LIB" | ||
set "new=!%HOME%!\libmelon\lang\lib" | ||
set "new=%new:\=\\%" | ||
|
||
set "file=src/mln_path.c" | ||
|
||
powershell -Command "(Get-Content '%file%') -replace '%old%', '\"%new%\"' | Set-Content '%file%'" | ||
|
||
|
||
set "old=MLN_LANG_DYLIB" | ||
set "new=!%HOME%!\libmelon\lang\dylib" | ||
set "new=%new:\=\\%" | ||
|
||
set "file=src/mln_path.c" | ||
|
||
powershell -Command "(Get-Content '%file%') -replace '%old%', '\"%new%\"' | Set-Content '%file%'" | ||
|
||
|
||
set "old={{ROOT}}" | ||
set "new=!%HOME%!\libmelon" | ||
set "new=%new:\=\\%" | ||
|
||
set "file=conf/melon.conf.msvc.template" | ||
|
||
powershell -Command "(Get-Content '%file%') -replace '%old%', '%new%' | Set-Content 'conf/melon.conf'" | ||
|
||
endlocal | ||
|
||
|
||
mkdir lib objs\src "%HOME%\libmelon\logs" "%HOME%\libmelon\lang\lib" "%HOME%\libmelon\lang\dylib" "%HOME%\libmelon\include" "%HOME%\libmelon\conf" "%HOME%\libmelon\lib" "%HOME%\libmelon\tmp" | ||
echo "" > "%HOME%\libmelon\null" | ||
|
||
for %%f in (src\*.c) do ( | ||
cl /c /DMSVC /I include "%%f" /Fo:objs\%%f.o /O2 | ||
) | ||
|
||
lib /OUT:lib\libmelon_static.lib objs\src\*.o | ||
|
||
setlocal | ||
|
||
xcopy include "%HOME%/libmelon/include" /E /I /Y | ||
xcopy lib "%HOME%/libmelon/lib" /E /I /Y | ||
xcopy conf "%HOME%/libmelon/conf" /E /I /Y | ||
|
||
endlocal | ||
|
||
echo Done |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
log_level "none"; | ||
//user "root"; | ||
daemon off; | ||
core_file_size "unlimited"; | ||
//max_nofile 1024; | ||
worker_proc 1; | ||
framework off; | ||
log_path "{{ROOT}}\\logs\\melon.log"; | ||
/* | ||
* Configurations in the 'proc_exec' are the | ||
* processes which are customized by user. | ||
* | ||
* Here is an example to show you how to | ||
* spawn a program. | ||
* keepalive "/tmp/a.out" ["arg1" "arg2" ...] | ||
* The command in this example is 'keepalive' that | ||
* indicate master process to supervise this | ||
* process. If process is killed, master process | ||
* would restart this program. | ||
* If you don't want master to restart it, you can | ||
* default "/tmp/a.out" ["arg1" "arg2" ...] | ||
* | ||
* But you should know that there is another | ||
* arugment after the last argument you write here. | ||
* That is the file descriptor which is used to | ||
* communicate with master process. | ||
*/ | ||
proc_exec { | ||
// keepalive "/tmp/a"; | ||
} | ||
thread_exec { | ||
// restart "hello" "hello" "world"; | ||
// default "haha"; | ||
} | ||
//trace_mode "trace/trace.m"; /* path or off */ |
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,7 +5,7 @@ Melon中实现的是**最小堆**。 | |
与红黑树组件类似,斐波那契堆组件有三种用法: | ||
|
||
- 基本用法 | ||
- 内联用法 | ||
- 内联用法 (`msvc`中不支持) | ||
- 容器用法 | ||
|
||
|
||
|
This file contains 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
This file contains 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
Oops, something went wrong.