mirror of
https://github.com/schnaader/precomp-cpp
synced 2026-08-23 00:23:04 -04:00
Show OS and 32-/64-bit information
This commit is contained in:
parent
769bdc3a74
commit
52be43eaa4
3 changed files with 19 additions and 7 deletions
|
|
@ -38,7 +38,7 @@ bool check(lzma_ret ret) {
|
|||
return false;
|
||||
}
|
||||
|
||||
#if _WIN64 || __amd64__
|
||||
#ifdef BIT64
|
||||
const uint32_t dict = 4;
|
||||
#else
|
||||
const uint32_t dict = 2;
|
||||
|
|
|
|||
4
make.bat
4
make.bat
|
|
@ -17,6 +17,7 @@ set GPP64=g++
|
|||
set EXE1=precomp
|
||||
set EXE2=
|
||||
set DCOMFORT=
|
||||
set DBIT=
|
||||
set MPARAM=-march=pentiumpro
|
||||
set GCC=%GCC32%
|
||||
set GPP=%GPP32%
|
||||
|
|
@ -27,6 +28,7 @@ if "%1%"=="64" (
|
|||
set GCC=%GCC64%
|
||||
set GPP=%GPP64%
|
||||
set EXE2=64
|
||||
set DBIT=-DBIT64
|
||||
set MPARAM=-march=x86-64 -m64
|
||||
)
|
||||
if "%1%"=="comfort" (
|
||||
|
|
@ -114,7 +116,7 @@ move /Y *.o ..\..\ > nul
|
|||
popd
|
||||
:nocontrib
|
||||
echo Building precomp...
|
||||
%GPP% %DCOMFORT% %MPARAM% -static -static-libgcc -static-libstdc++ -DMINGW -lpthread -Wall precomp.cpp %JPG_O% %MP3_O% %GIF_O% %BZIP_O% %ZLIB_O% %LIBLZMA_CPP% %LIBLZMA_O% -O2 -fomit-frame-pointer -s -o%EXE1%%EXE2%.exe
|
||||
%GPP% %DCOMFORT% %MPARAM% -static -static-libgcc -static-libstdc++ -DMINGW %DBIT% -lpthread -Wall precomp.cpp %JPG_O% %MP3_O% %GIF_O% %BZIP_O% %ZLIB_O% %LIBLZMA_CPP% %LIBLZMA_O% -O2 -fomit-frame-pointer -s -o%EXE1%%EXE2%.exe
|
||||
if not %ERRORLEVEL% == 0 echo ERROR!!!
|
||||
if %ERRORLEVEL% == 0 echo.
|
||||
if %ERRORLEVEL% == 0 echo Build successful.
|
||||
|
|
|
|||
20
precomp.cpp
20
precomp.cpp
|
|
@ -24,6 +24,16 @@
|
|||
#define V_STATE "DEVELOPMENT"
|
||||
//#define V_MSG "USE FOR TESTING ONLY"
|
||||
#define V_MSG "USE AT YOUR OWN RISK!"
|
||||
#ifdef UNIX
|
||||
#define V_OS "Unix"
|
||||
#else
|
||||
#define V_OS "Windows"
|
||||
#endif
|
||||
#ifdef BIT64
|
||||
#define V_BIT "64-bit"
|
||||
#else
|
||||
#define V_BIT "32-bit"
|
||||
#endif
|
||||
|
||||
// batch error levels
|
||||
#define RETURN_NOTHING_DECOMPRESSED 2
|
||||
|
|
@ -479,9 +489,9 @@ int init(int argc, char* argv[]) {
|
|||
|
||||
printf("\n");
|
||||
if (V_MINOR2 == 0) {
|
||||
printf("Precomp v%i.%i - %s version",V_MAJOR,V_MINOR,V_STATE);
|
||||
printf("Precomp v%i.%i %s %s - %s version",V_MAJOR,V_MINOR,V_OS,V_BIT,V_STATE);
|
||||
} else {
|
||||
printf("Precomp v%i.%i.%i - %s version",V_MAJOR,V_MINOR,V_MINOR2,V_STATE);
|
||||
printf("Precomp v%i.%i.%i %s %s - %s version",V_MAJOR,V_MINOR,V_MINOR2,V_OS,V_BIT,V_STATE);
|
||||
}
|
||||
printf(" - %s\n",V_MSG);
|
||||
printf("Free for non-commercial use - Copyright 2006-2016 by Christian Schneider\n\n");
|
||||
|
|
@ -1098,9 +1108,9 @@ int init_comfort(int argc, char* argv[]) {
|
|||
|
||||
printf("\n");
|
||||
if (V_MINOR2 == 0) {
|
||||
printf("Precomp Comfort v%i.%i - %s version",V_MAJOR,V_MINOR,V_STATE);
|
||||
printf("Precomp Comfort v%i.%i %s %s - %s version",V_MAJOR,V_MINOR,V_OS,V_BIT,V_STATE);
|
||||
} else {
|
||||
printf("Precomp Comfort v%i.%i.%i - %s version",V_MAJOR,V_MINOR,V_MINOR2,V_STATE);
|
||||
printf("Precomp Comfort v%i.%i.%i %s %s - %s version",V_MAJOR,V_MINOR,V_MINOR2,V_OS,V_BIT,V_STATE);
|
||||
}
|
||||
printf(" - %s\n",V_MSG);
|
||||
printf("Free for non-commercial use - Copyright 2006-2016 by Christian Schneider\n\n");
|
||||
|
|
@ -1180,7 +1190,7 @@ int init_comfort(int argc, char* argv[]) {
|
|||
exit(1);
|
||||
} else {
|
||||
FILE* fnewini = fopen(precomf_ini,"w");
|
||||
fprintf(fnewini,";; Precomp Comfort v%i.%i.%i - %s version - INI file\n",V_MAJOR,V_MINOR,V_MINOR2,V_STATE);
|
||||
fprintf(fnewini,";; Precomp Comfort v%i.%i.%i %s %s - %s version - INI file\n",V_MAJOR,V_MINOR,V_MINOR2,V_OS,V_BIT,V_STATE);
|
||||
fprintf(fnewini,";; Use a semicolon (;) for comments\n\n");
|
||||
fprintf(fnewini,";; Compression method to use\n");
|
||||
fprintf(fnewini,";; 0 = none, 1 = bZip2, 2 = lzma, 3 = xz(lzma2), 4 = xz Multi-Threaded\n");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue