forked from mirrors/principia
Versioning related improvements
This commit is contained in:
parent
17b06081a6
commit
a91fa70ab4
5 changed files with 39 additions and 30 deletions
|
|
@ -1,24 +1,36 @@
|
|||
#include <windows.h>
|
||||
|
||||
#define VER_MAJOR 1
|
||||
#define VER_MINOR 5
|
||||
#define VER_PATCH 2
|
||||
|
||||
#define VER_STRING "1.5.2"
|
||||
#define PRODUCT_VER_STRING "1.5.2 Beta"
|
||||
|
||||
1 ICON "icon.ico"
|
||||
1 24 "principia.manifest"
|
||||
|
||||
VS_VERSION_INFO VERSIONINFO
|
||||
FILEFLAGSMASK 0x3fL
|
||||
FILEFLAGS 0x0L
|
||||
FILEOS 0x40004L
|
||||
FILETYPE 0x2L
|
||||
FILESUBTYPE 0x0L
|
||||
FILEVERSION VER_MAJOR,VER_MINOR,VER_PATCH,0
|
||||
PRODUCTVERSION VER_MAJOR,VER_MINOR,VER_PATCH,0
|
||||
FILEFLAGSMASK 0x3fL
|
||||
FILEFLAGS 0x0L
|
||||
FILEOS VOS_NT_WINDOWS32
|
||||
FILETYPE VFT_APP
|
||||
FILESUBTYPE 0x0L
|
||||
BEGIN
|
||||
BLOCK "StringFileInfo"
|
||||
BEGIN
|
||||
BLOCK "040904b0"
|
||||
BEGIN
|
||||
VALUE "CompanyName", "Bithack AB\0"
|
||||
VALUE "FileDescription", "Principia\0"
|
||||
VALUE "InternalName", "principia\0"
|
||||
VALUE "LegalCopyright", "Copyright <20> 2014 Bithack AB\0"
|
||||
VALUE "OriginalFilename", "principia.exe\0"
|
||||
VALUE "ProductName", "Principia\0"
|
||||
VALUE "CompanyName", "Bithack AB"
|
||||
VALUE "FileDescription", "Principia"
|
||||
VALUE "FileVersion", VER_STRING
|
||||
VALUE "InternalName", "principia"
|
||||
VALUE "LegalCopyright", "Copyright (c) 2012-2022 Bithack AB"
|
||||
VALUE "OriginalFilename", "principia.exe"
|
||||
VALUE "ProductName", "Principia"
|
||||
VALUE "ProductVersion", PRODUCT_VER_STRING
|
||||
END
|
||||
END
|
||||
BLOCK "VarFileInfo"
|
||||
|
|
|
|||
|
|
@ -3,10 +3,11 @@
|
|||
#include "font.hh"
|
||||
#include "settings.hh"
|
||||
#include "misc.hh"
|
||||
#include "version.hh"
|
||||
#include <tms/bindings/cpp/cpp.hh>
|
||||
#include <deque>
|
||||
|
||||
#define FONT_CACHE_VERSION 34
|
||||
|
||||
static const char *FONT_PATH = "data-shared/fonts/Roboto-Bold.ttf";
|
||||
//static const char *FONT_PATH = "data-shared/fonts/DejaVuSans.ttf";
|
||||
//static const char *FONT_PATH = "data-shared/fonts/DejaVuSans-Bold.ttf";
|
||||
|
|
@ -290,7 +291,7 @@ read_font_cache(lvlbuf *lb)
|
|||
uint8_t version = lb->r_uint8();
|
||||
float read_text_factor = lb->r_float();
|
||||
|
||||
if (version != PRINCIPIA_VERSION_CODE) {
|
||||
if (version != FONT_CACHE_VERSION) {
|
||||
tms_errorf("Mismatching version code in model cache.");
|
||||
return false;
|
||||
}
|
||||
|
|
@ -386,7 +387,7 @@ read_cache(lvlbuf *lb)
|
|||
float read_text_factor = lb->r_float();
|
||||
uint32_t num_atlases = lb->r_uint32();
|
||||
|
||||
if (version != PRINCIPIA_VERSION_CODE) {
|
||||
if (version != FONT_CACHE_VERSION) {
|
||||
tms_errorf("Mismatching version code in model cache.");
|
||||
return false;
|
||||
}
|
||||
|
|
@ -479,7 +480,7 @@ write_sprite(lvlbuf *lb, struct tms_sprite *s)
|
|||
static bool
|
||||
write_cache(lvlbuf *lb)
|
||||
{
|
||||
lb->w_s_uint8(PRINCIPIA_VERSION_CODE);
|
||||
lb->w_s_uint8(FONT_CACHE_VERSION);
|
||||
lb->w_s_float(gui_spritesheet::text_factor);
|
||||
lb->w_s_uint32(NUM_ATLASES);
|
||||
|
||||
|
|
@ -598,7 +599,7 @@ write_font_cache(lvlbuf *lb)
|
|||
|
||||
begin = SDL_GetTicks();
|
||||
|
||||
lb->w_s_uint8(PRINCIPIA_VERSION_CODE);
|
||||
lb->w_s_uint8(FONT_CACHE_VERSION);
|
||||
/* equal required */
|
||||
|
||||
lb->w_s_float(gui_spritesheet::text_factor);
|
||||
|
|
|
|||
|
|
@ -1797,17 +1797,16 @@ init_curl_defaults(void *curl)
|
|||
curl_easy_setopt(P.curl, CURLOPT_SSL_VERIFYHOST, 0); /* XXX */
|
||||
curl_easy_setopt(P.curl, CURLOPT_SSL_VERIFYPEER, 0); /* XXX */
|
||||
|
||||
curl_easy_setopt(P.curl, CURLOPT_USERAGENT, PRINCIPIA_USERAGENT);
|
||||
curl_easy_setopt(P.curl, CURLOPT_USERAGENT,
|
||||
"Principia/" STR(PRINCIPIA_VERSION_CODE) " (" OS_STRING ") (" PRINCIPIA_VERSION_STRING ")");
|
||||
|
||||
curl_easy_setopt(P.curl, CURLOPT_HEADERFUNCTION, _parse_headers);
|
||||
|
||||
curl_easy_setopt(P.curl, CURLOPT_COOKIEFILE, cookie_file);
|
||||
curl_easy_setopt(P.curl, CURLOPT_COOKIEJAR, cookie_file);
|
||||
|
||||
#ifndef TMS_BACKEND_LINUX_SS
|
||||
curl_easy_setopt(P.curl, CURLOPT_XFERINFOFUNCTION, progress_cb);
|
||||
curl_easy_setopt(P.curl, CURLOPT_NOPROGRESS, 0);
|
||||
#endif
|
||||
|
||||
#ifdef DEBUG
|
||||
curl_easy_setopt(P.curl, CURLOPT_VERBOSE, 1);
|
||||
|
|
|
|||
|
|
@ -1,13 +1,14 @@
|
|||
#include "model.hh"
|
||||
#include "misc.hh"
|
||||
#include "pkgman.hh"
|
||||
#include "version.hh"
|
||||
#include "settings.hh"
|
||||
|
||||
#define NUM_MISC_MODELS 3
|
||||
struct tms_model *model_misc[NUM_MISC_MODELS];
|
||||
int cur_model = 0;
|
||||
|
||||
#define MODEL_CACHE_VERSION 34
|
||||
|
||||
static int i1o1_shift_i = 1;
|
||||
static int i2o1_shift_i = 1;
|
||||
static int cpad_shift_i = 1;
|
||||
|
|
@ -394,7 +395,7 @@ read_cache(lvlbuf *lb)
|
|||
uint32_t num_meshes = lb->r_uint32();
|
||||
uint32_t num_models = lb->r_uint32();
|
||||
|
||||
if (version != PRINCIPIA_VERSION_CODE) {
|
||||
if (version != MODEL_CACHE_VERSION) {
|
||||
tms_errorf("Mismatching version code in model cache.");
|
||||
return false;
|
||||
}
|
||||
|
|
@ -457,7 +458,7 @@ read_cache(lvlbuf *lb)
|
|||
static bool
|
||||
write_cache(lvlbuf *lb)
|
||||
{
|
||||
lb->w_s_uint8(PRINCIPIA_VERSION_CODE);
|
||||
lb->w_s_uint8(MODEL_CACHE_VERSION);
|
||||
lb->w_s_uint32(NUM_MODELS);
|
||||
lb->w_s_uint32(NUM_MISC_MODELS);
|
||||
|
||||
|
|
|
|||
|
|
@ -1,14 +1,10 @@
|
|||
#pragma once
|
||||
|
||||
#define PRINCIPIA_VERSION_CODE 34
|
||||
#define PRINCIPIA_VERSION_CODE_STRING STR(PRINCIPIA_VERSION_CODE)
|
||||
#define _COOL_VERSION_STRING "1.5.2 Beta"
|
||||
#ifdef DEBUG
|
||||
#define PRINCIPIA_VERSION_STRING _COOL_VERSION_STRING " [Debug]"
|
||||
#define VER_EXTRA " [Debug]"
|
||||
#else
|
||||
#define PRINCIPIA_VERSION_STRING _COOL_VERSION_STRING
|
||||
#define VER_EXTRA
|
||||
#endif
|
||||
|
||||
#define PRINCIPIA_STRING "Principia"
|
||||
|
||||
#define PRINCIPIA_USERAGENT PRINCIPIA_STRING "/" STR(PRINCIPIA_VERSION_CODE) " (" OS_STRING ") (" PRINCIPIA_VERSION_STRING ")"
|
||||
#define PRINCIPIA_VERSION_CODE 34
|
||||
#define PRINCIPIA_VERSION_STRING "1.5.2 Beta" VER_EXTRA
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue