File tree Expand file tree Collapse file tree 3 files changed +21
-4
lines changed Expand file tree Collapse file tree 3 files changed +21
-4
lines changed Original file line number Diff line number Diff line change 25
25
26
26
#include " appshell/browser/resource.h"
27
27
#include " appshell/common/client_switches.h"
28
+ #include " appshell/version_linux.h"
28
29
#include " include/cef_base.h"
29
30
#include " include/cef_version.h"
30
31
@@ -114,13 +115,18 @@ CefString AppGetCachePath() {
114
115
}
115
116
116
117
CefString AppGetProductVersionString () {
117
- // TODO
118
- return CefString (" " );
118
+ std::string s = APP_NAME " /" APP_VERSION;
119
+ CefString ret;
120
+ ret.FromString (s);
121
+ return ret;
119
122
}
120
123
121
124
CefString AppGetChromiumVersionString () {
122
- // TODO
123
- return CefString (" " );
125
+ std::wostringstream versionStream (L" " );
126
+ versionStream << L" Chrome/" << cef_version_info (2 ) << L" ." << cef_version_info (3 )
127
+ << L" ." << cef_version_info (4 ) << L" ." << cef_version_info (5 );
128
+
129
+ return CefString (versionStream.str ());
124
130
}
125
131
126
132
char * AppInitWorkingDirectory () {
Original file line number Diff line number Diff line change
1
+ #define APP_VERSION "1.9.0.0"
Original file line number Diff line number Diff line change @@ -49,6 +49,7 @@ module.exports = function (grunt) {
49
49
buildInstallerScriptPath = "installer/mac/buildInstaller.sh" ,
50
50
versionRcPath = "appshell/version.rc" ,
51
51
infoPlistPath = "appshell/mac/Info.plist" ,
52
+ linuxVersionFile = "appshell/version_linux.h" ,
52
53
release = grunt . option ( "release" ) || "" ,
53
54
text ,
54
55
newVersion ;
@@ -113,5 +114,14 @@ module.exports = function (grunt) {
113
114
"$1" + newVersion . version + "$3"
114
115
) ;
115
116
grunt . file . write ( infoPlistPath , text ) ;
117
+
118
+ // 6. Open appshell/version_linux.h and change `APP_VERSION`
119
+ text = grunt . file . read ( linuxVersionFile ) ;
120
+ text = safeReplace (
121
+ text ,
122
+ / A P P _ V E R S I O N " ( \d + \. \d + \. \d + \. \d + ) " / ,
123
+ 'APP_VERSION "' + newVersion . major + "." + newVersion . minor + "." + newVersion . patch + "." + ( newVersion . build . length ? newVersion . build : "0" ) + '"'
124
+ ) ;
125
+ grunt . file . write ( linuxVersionFile , text ) ;
116
126
} ) ;
117
127
} ;
You can’t perform that action at this time.
0 commit comments