Add xerelease6-x86
This commit is contained in:
parent
29db17af28
commit
48682c9c49
|
@ -0,0 +1,31 @@
|
||||||
|
# Project: xerelease6-x86
|
||||||
|
# Makefile created by Dev-C++ 5.11
|
||||||
|
|
||||||
|
CPP = g++.exe
|
||||||
|
CC = gcc.exe
|
||||||
|
WINDRES = windres.exe
|
||||||
|
OBJ = main.o xeapi.o
|
||||||
|
LINKOBJ = main.o xeapi.o
|
||||||
|
LIBS = -L"C:/Dev-Cpp/MinGW64/x86_64-w64-mingw32/lib32" -L"C:/Dev-Cpp/gtk+/lib" -static-libgcc -lgtk-3 -lgdk-3 -lgdi32 -limm32 -lshell32 -lole32 -Wl,-luuid -lpangocairo-1.0 -lpangoft2-1.0 -lfreetype -lfontconfig -lpangowin32-1.0 -lgdi32 -lpango-1.0 -lm -latk-1.0 -lcairo-gobject -lcairo -lgdk_pixbuf-2.0 -lgio-2.0 -lgobject-2.0 -lglib-2.0 -lintl -m32
|
||||||
|
INCS = -I"C:/Dev-Cpp/MinGW64/include" -I"C:/Dev-Cpp/MinGW64/x86_64-w64-mingw32/include" -I"C:/Dev-Cpp/MinGW64/lib/gcc/x86_64-w64-mingw32/5.1.0/include" -I"C:/Dev-Cpp/gtk+/include/gtk-3.0" -I"C:/Dev-Cpp/gtk+/include/cairo" -I"C:/Dev-Cpp/gtk+/include/pango-1.0" -I"C:/Dev-Cpp/gtk+/include/atk-1.0" -I"C:/Dev-Cpp/gtk+/include/cairo" -I"C:/Dev-Cpp/gtk+/include/pixman-1" -I"C:/Dev-Cpp/gtk+/include" -I"C:/Dev-Cpp/gtk+/include/freetype2" -I"C:/Dev-Cpp/gtk+/include" -I"C:/Dev-Cpp/gtk+/include/libpng15" -I"C:/Dev-Cpp/gtk+/include/gdk-pixbuf-2.0" -I"C:/Dev-Cpp/gtk+/include/libpng15" -I"C:/Dev-Cpp/gtk+/include/glib-2.0" -I"C:/Dev-Cpp/gtk+/lib/glib-2.0/include" -I"C:/Dev-Cpp/gtk+/include/gtk-3.0/gtk"
|
||||||
|
CXXINCS = -I"C:/Dev-Cpp/MinGW64/include" -I"C:/Dev-Cpp/MinGW64/x86_64-w64-mingw32/include" -I"C:/Dev-Cpp/MinGW64/lib/gcc/x86_64-w64-mingw32/5.1.0/include" -I"C:/Dev-Cpp/MinGW64/lib/gcc/x86_64-w64-mingw32/5.1.0/include/c++"
|
||||||
|
BIN = xerelease6-x86.exe
|
||||||
|
CXXFLAGS = $(CXXINCS) -m32
|
||||||
|
CFLAGS = $(INCS) -m32
|
||||||
|
RM = rm.exe -f
|
||||||
|
|
||||||
|
.PHONY: all all-before all-after clean clean-custom
|
||||||
|
|
||||||
|
all: all-before $(BIN) all-after
|
||||||
|
|
||||||
|
clean: clean-custom
|
||||||
|
${RM} $(OBJ) $(BIN)
|
||||||
|
|
||||||
|
$(BIN): $(OBJ)
|
||||||
|
$(CPP) $(LINKOBJ) -o $(BIN) $(LIBS)
|
||||||
|
|
||||||
|
main.o: main.cpp
|
||||||
|
$(CPP) -c main.cpp -o main.o $(CXXFLAGS)
|
||||||
|
|
||||||
|
xeapi.o: xeapi.cpp
|
||||||
|
$(CPP) -c xeapi.cpp -o xeapi.o $(CXXFLAGS)
|
|
@ -0,0 +1,89 @@
|
||||||
|
#include<stdio.h>
|
||||||
|
#include<time.h>
|
||||||
|
#include<string.h>
|
||||||
|
#include<stdlib.h>
|
||||||
|
#include"xeapi.h"
|
||||||
|
typedef void(*LP)(struct tm *local);//define a pointer function
|
||||||
|
int total_day(int year,int month,int day){//Calculate day of 1 year
|
||||||
|
int sum=0;
|
||||||
|
switch(month){
|
||||||
|
case 1:
|
||||||
|
sum=day;break;
|
||||||
|
case 2:
|
||||||
|
sum=day+31;break;
|
||||||
|
case 3:
|
||||||
|
sum=day+59;break;
|
||||||
|
case 4:
|
||||||
|
sum=day+90;break;
|
||||||
|
case 5:
|
||||||
|
sum=day+120;break;
|
||||||
|
case 6:
|
||||||
|
sum=day+151;break;
|
||||||
|
case 7:
|
||||||
|
sum=day+181;break;
|
||||||
|
case 8:
|
||||||
|
sum=day+212;break;
|
||||||
|
case 9:
|
||||||
|
sum=day+243;break;
|
||||||
|
case 10:
|
||||||
|
sum=day+273;break;
|
||||||
|
case 11:
|
||||||
|
sum=day+304;break;
|
||||||
|
case 12:
|
||||||
|
sum=day+334;break;
|
||||||
|
default:
|
||||||
|
printf("Date Wrong!");
|
||||||
|
}
|
||||||
|
if(year%4==0&&year%100!=0) sum=sum+1;
|
||||||
|
return sum;
|
||||||
|
}
|
||||||
|
int total_year_day(int year1,int year2){//Calculate day of years
|
||||||
|
int sum=0;
|
||||||
|
sum=(year2-year1)*365;
|
||||||
|
for(int i=year1;i<year2;i++){
|
||||||
|
if(i%4==0&&i%100!=0){
|
||||||
|
sum=sum+1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return sum;
|
||||||
|
}
|
||||||
|
void dale(struct tm *local){
|
||||||
|
printf("xeinit release maker by dale\n");
|
||||||
|
}
|
||||||
|
void release(struct tm *local){
|
||||||
|
int rel=0;//release version
|
||||||
|
int year1=2019,month1=1,day1=11,year2=local->tm_year+1900,month2=local->tm_mon+1,day2=local->tm_mday;
|
||||||
|
rel=total_year_day(year1,year2)-total_day(year1,month1,day1)+total_day(year2,month2,day2);//get release version
|
||||||
|
printf("Xeinit LTS version:5.2.%d\n",rel);
|
||||||
|
freopen("xe-5.x","a",stdout);//put all output in xe-release file
|
||||||
|
printf("%d-%d-%d ",local->tm_year+1900,local->tm_mon+1,local->tm_mday);//output:release branch time in xe-release
|
||||||
|
printf("5.2.%d Api:%d\n",rel,xeapi1(local));
|
||||||
|
fclose(stdout);
|
||||||
|
return ;
|
||||||
|
}
|
||||||
|
void develop(struct tm *local){
|
||||||
|
char devel[57];int devel1;//development version
|
||||||
|
printf("xeinit 6 version:");
|
||||||
|
int year1=2017,month1=6,day1=17,year2=local->tm_year+1900,month2=local->tm_mon+1,day2=local->tm_mday;
|
||||||
|
devel1=total_year_day(year1,year2)-total_day(year1,month1,day1)+total_day(year2,month2,day2);//get release version
|
||||||
|
scanf("%s",&devel);//get development version
|
||||||
|
freopen("xe-6.x","a",stdout);
|
||||||
|
printf("%d-%d-%d ",local->tm_year+1900,local->tm_mon+1,local->tm_mday);//output:development branch time in xe-release
|
||||||
|
printf("%s.%d Api:%d\n",devel,devel1,xeapi1(local));
|
||||||
|
fclose(stdout);
|
||||||
|
return ;
|
||||||
|
}
|
||||||
|
int main(int argc, char **argv) {
|
||||||
|
struct tm *local;
|
||||||
|
__time64_t t;
|
||||||
|
t=_time64(NULL);
|
||||||
|
local=_localtime64(&t);//Get local time
|
||||||
|
LP a[]={dale,release,develop};
|
||||||
|
int x;
|
||||||
|
printf("Xe api version:%d\n",xeapi1(local));
|
||||||
|
printf("Input branch:1.release 2.development\n");
|
||||||
|
scanf("%d",&x);
|
||||||
|
a[x](local);
|
||||||
|
system("pause");
|
||||||
|
return 0;
|
||||||
|
}
|
|
@ -0,0 +1,9 @@
|
||||||
|
#include<time.h>
|
||||||
|
int xeapi1(struct tm *local){
|
||||||
|
int year1=2019,month1=6,apiver=0;
|
||||||
|
int year2=local->tm_year+1900,month2=local->tm_mon+1;
|
||||||
|
//printf("%d %d",year1,year2);
|
||||||
|
apiver=(year2-year1)*12-month1+month2+22;
|
||||||
|
if(local->tm_mday<7) apiver--;
|
||||||
|
return apiver;
|
||||||
|
}
|
|
@ -0,0 +1 @@
|
||||||
|
extern int xeapi1(struct tm *local);
|
|
@ -0,0 +1,82 @@
|
||||||
|
[Project]
|
||||||
|
FileName=xerelease6-x86.dev
|
||||||
|
Name=xerelease6-x86
|
||||||
|
Type=1
|
||||||
|
Ver=2
|
||||||
|
ObjFiles=
|
||||||
|
Includes=
|
||||||
|
Libs=
|
||||||
|
PrivateResource=
|
||||||
|
ResourceIncludes=
|
||||||
|
MakeIncludes=
|
||||||
|
Compiler=
|
||||||
|
CppCompiler=
|
||||||
|
Linker=
|
||||||
|
IsCpp=1
|
||||||
|
Icon=
|
||||||
|
ExeOutput=
|
||||||
|
ObjectOutput=
|
||||||
|
LogOutput=
|
||||||
|
LogOutputEnabled=0
|
||||||
|
OverrideOutput=0
|
||||||
|
OverrideOutputName=
|
||||||
|
HostApplication=
|
||||||
|
UseCustomMakefile=0
|
||||||
|
CustomMakefile=
|
||||||
|
CommandLine=
|
||||||
|
Folders=
|
||||||
|
IncludeVersionInfo=0
|
||||||
|
SupportXPThemes=0
|
||||||
|
CompilerSet=10
|
||||||
|
CompilerSettings=0000000100000000000000000
|
||||||
|
UnitCount=3
|
||||||
|
|
||||||
|
[VersionInfo]
|
||||||
|
Major=1
|
||||||
|
Minor=0
|
||||||
|
Release=0
|
||||||
|
Build=0
|
||||||
|
LanguageID=1033
|
||||||
|
CharsetID=1252
|
||||||
|
CompanyName=
|
||||||
|
FileVersion=
|
||||||
|
FileDescription=Developed using the Dev-C++ IDE
|
||||||
|
InternalName=
|
||||||
|
LegalCopyright=
|
||||||
|
LegalTrademarks=
|
||||||
|
OriginalFilename=
|
||||||
|
ProductName=
|
||||||
|
ProductVersion=
|
||||||
|
AutoIncBuildNr=0
|
||||||
|
SyncProduct=1
|
||||||
|
|
||||||
|
[Unit1]
|
||||||
|
FileName=main.cpp
|
||||||
|
CompileCpp=1
|
||||||
|
Folder=
|
||||||
|
Compile=1
|
||||||
|
Link=1
|
||||||
|
Priority=1000
|
||||||
|
OverrideBuildCmd=0
|
||||||
|
BuildCmd=
|
||||||
|
|
||||||
|
[Unit2]
|
||||||
|
FileName=xeapi.cpp
|
||||||
|
CompileCpp=1
|
||||||
|
Folder=
|
||||||
|
Compile=1
|
||||||
|
Link=1
|
||||||
|
Priority=1000
|
||||||
|
OverrideBuildCmd=0
|
||||||
|
BuildCmd=
|
||||||
|
|
||||||
|
[Unit3]
|
||||||
|
FileName=xeapi.h
|
||||||
|
CompileCpp=1
|
||||||
|
Folder=
|
||||||
|
Compile=1
|
||||||
|
Link=1
|
||||||
|
Priority=1000
|
||||||
|
OverrideBuildCmd=0
|
||||||
|
BuildCmd=
|
||||||
|
|
|
@ -0,0 +1,13 @@
|
||||||
|
[Editors]
|
||||||
|
Order=0,1
|
||||||
|
Focused=0
|
||||||
|
[Editor_0]
|
||||||
|
CursorCol=46
|
||||||
|
CursorRow=83
|
||||||
|
TopLine=74
|
||||||
|
LeftChar=1
|
||||||
|
[Editor_1]
|
||||||
|
CursorCol=1
|
||||||
|
CursorRow=1
|
||||||
|
TopLine=1
|
||||||
|
LeftChar=1
|
Loading…
Reference in New Issue