Compare commits

...

4 Commits

Author SHA1 Message Date
Alexander Popov 13ca75a3bf
1.0.2 update 2023-07-31 18:10:34 +03:00
Alexander Popov a0778de28a
update exec name 2023-07-31 18:05:20 +03:00
Alexander Popov 53782a2988
build with tcc 2023-07-31 17:36:48 +03:00
Alexander Popov 23bb1c0fd6
update script 2023-07-31 17:34:43 +03:00
9 changed files with 36 additions and 17 deletions

2
.gitignore vendored
View File

@ -1,4 +1,4 @@
make-libs-string
mc-libs-string
# export data
*.json

3
.gitmodules vendored Normal file
View File

@ -0,0 +1,3 @@
[submodule "cJSON"]
path = cJSON
url = https://github.com/DaveGamble/cJSON

View File

@ -8,6 +8,14 @@
> This project use Semantic Versioning 2.0.0 https://semver.org/
## 31/07/2023 - (1.0.2)
- ♻️ - Update software executable name
- ♻️ - Update Makefile
- ♻️ - Format code via `indent`
- - Added cJSON library as submodule
- - Added building with `tcc`
- ❌ - Removed Conan building system
## 14/09/2022 - (1.0.1)
- - Added [Conan](https://conan.io/) for Windows
- ✔️ - Fixed bad returned value of `assets_version`

View File

@ -1,11 +1,18 @@
CC = clang
CFLAGS = -O2
CC = gcc
CFLAGS = -O3
LIBS = -lcjson
EXEC = mc-libs-string
all: make-libs-string
all: $(EXEC)
make-libs-string:
$(CC) $(CFLAGS) make-libs-string.c $(LIBS) -o $@
$(EXEC):
$(CC) $(CFLAGS) -o $(EXEC) ./src/main.c $(LIBS)
tcc:
tcc -O3 -o $(EXEC) ./src/main.c $(LIBS)
tcc-static:
tcc -O3 -o $(EXEC) ./src/main.c ./cJSON/libcjson.a
clean:
rm make-libs-string
rm $(EXEC)

View File

@ -13,12 +13,12 @@ Utility for parse Minecraft JE game version file (`version.json`).
Minecraft Libraries List Generator
Usage:
make-libs-string <version.json> <system>
mc-libs-string <version.json> <system>
<system> - w|l|x (windows or linux or osx)
Other:
make-libs-string <version.json> i - to get version info
mc-libs-string <version.json> i - to get version info
```
Utility has two required arguments,
@ -32,5 +32,5 @@ Utility has two required arguments,
version:**
```sh
./make-libs-string ./1.20.1.json x
./mc-libs-string ./1.20.1.json x
```

View File

@ -13,12 +13,12 @@
Minecraft Libraries List Generator
Usage:
make-libs-string <version.json> <system>
mc-libs-string <version.json> <system>
<system> - w|l|x (windows or linux or osx)
Other:
make-libs-string <version.json> i - to get version info
mc-libs-string <version.json> i - to get version info
```
Программа имеет два обязательных аргумента,
@ -31,5 +31,5 @@ Other:
[1.20.1](https://piston-meta.mojang.com/v1/packages/715ccf3330885e75b205124f09f8712542cbe7e0/1.20.1.json)**:
```sh
./make-libs-string ./1.20.1.json x
./mc-libs-string ./1.20.1.json x
```

1
cJSON Submodule

@ -0,0 +1 @@
Subproject commit cb8693b058ba302f4829ec6d03f609ac6f848546

View File

@ -31,7 +31,7 @@
</ItemDefinitionGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ItemGroup>
<ClCompile Include="make-libs-list.c" />
<ClCompile Include="src\main.c" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Targets" />
</Project>

View File

@ -8,7 +8,7 @@
#include <string.h>
#include <cjson/cJSON.h>
#define VERSION "1.0.1" // software version
#define VERSION "1.0.2" // software version
void usage();
void info(cJSON * json);
@ -73,10 +73,10 @@ usage()
printf("%s\n%s: %s\n\n", "Minecraft Libraries List Generator",
"Version", VERSION);
printf("%s\n", "Usage:");
printf(" %s\n\n", "make-libs-string <version.json> <system>");
printf(" %s\n\n", "mc-libs-string <version.json> <system>");
printf(" %s\n\n", "<system> - w|l|x (windows or linux or osx)");
printf("%s\n", "Other:");
printf(" %s\n", "make-libs-string <version.json> i - to get version info");
printf(" %s\n", "mc-libs-string <version.json> i - to get version info");
}
void