This repository was archived by the owner on Sep 2, 2021. It is now read-only.
File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2525
2626#include " appshell/browser/resource.h"
2727#include " appshell/common/client_switches.h"
28+ #include " appshell/version_linux.h"
2829#include " include/cef_base.h"
2930#include " include/cef_version.h"
3031
@@ -114,13 +115,18 @@ CefString AppGetCachePath() {
114115}
115116
116117CefString AppGetProductVersionString () {
117- // TODO
118- return CefString (" " );
118+ std::string s = APP_NAME " /" APP_VERSION;
119+ CefString ret;
120+ ret.FromString (s);
121+ return ret;
119122}
120123
121124CefString 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 ());
124130}
125131
126132char * 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) {
4949 buildInstallerScriptPath = "installer/mac/buildInstaller.sh" ,
5050 versionRcPath = "appshell/version.rc" ,
5151 infoPlistPath = "appshell/mac/Info.plist" ,
52+ linuxVersionFile = "appshell/version_linux.h" ,
5253 release = grunt . option ( "release" ) || "" ,
5354 text ,
5455 newVersion ;
@@ -113,5 +114,14 @@ module.exports = function (grunt) {
113114 "$1" + newVersion . version + "$3"
114115 ) ;
115116 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 ) ;
116126 } ) ;
117127} ;
You can’t perform that action at this time.
0 commit comments