This repository was archived by the owner on May 18, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 5 files changed +11
-7
lines changed
main-src/libs/app-management/install-app-async Expand file tree Collapse file tree 5 files changed +11
-7
lines changed Original file line number Diff line number Diff line change @@ -12,6 +12,7 @@ const { getPreferences } = require('../../preferences');
1212const sendToAllWindows = require ( '../../send-to-all-windows' ) ;
1313const getEngineInfo = require ( './get-engine-info' ) ;
1414const getEngineAppPath = require ( './get-engine-app-path' ) ;
15+ const packageJson = require ( '../../../../package.json' ) ;
1516
1617const prepareWebkitWrapperAsync = require ( '../prepare-webkit-wrapper-async' ) ;
1718
@@ -60,7 +61,7 @@ const installAppAsync = (
6061
6162 // use v2 script on Mac
6263 scriptFileName = 'install-app-forked-lite-v2.js' ;
63- v = '2.13.0' ;
64+ v = packageJson . scriptVersion ;
6465
6566 return null ;
6667 } )
Original file line number Diff line number Diff line change @@ -28,6 +28,7 @@ const execAsync = require('../../exec-async');
2828const downloadAsync = require ( '../../download-async' ) ;
2929const getEngineInfo = require ( './get-engine-info' ) ;
3030const getEngineAppPath = require ( './get-engine-app-path' ) ;
31+ const packageJson = require ( '../../../../package.json' ) ;
3132
3233// id, name, username might only contain numbers
3334// causing yargsParser to parse them correctly as Number instead of String
@@ -445,10 +446,10 @@ open -n "$PWD"/${addSlash(name)}.app --args --no-sandbox --test-type --app="${ur
445446 return Promise . reject ( new Error ( 'Unsupported platform' ) ) ;
446447 } )
447448 . then ( ( ) => {
448- const packageJson = JSON . stringify ( {
449- version : '2.13.0' ,
449+ const packageJsonContent = JSON . stringify ( {
450+ version : packageJson . scriptVersion ,
450451 } ) ;
451- return fsExtra . writeFileSync ( packageJsonPath , packageJson ) ;
452+ return fsExtra . writeFileSync ( packageJsonPath , packageJsonContent ) ;
452453 } )
453454 . then ( ( ) => {
454455 const appJson = JSON . stringify ( {
Original file line number Diff line number Diff line change 22 "name" : " Chromeless" ,
33 "description" : " Turn Any Websites into Site-specific Browsers" ,
44 "version" : " 4.2.1" ,
5+ "scriptVersion" : " 2.13.0" ,
56 "engines" : {
67 "node" : " >=14.0.0 <15.0.0"
78 },
Original file line number Diff line number Diff line change @@ -207,7 +207,7 @@ const AppCard = (props) => {
207207 visible : Boolean ( engine && version ) ,
208208 } ,
209209 {
210- label : `Powered by ${ engineName } (implementation ${ version } )` ,
210+ label : `Powered by ${ engineName } (script v ${ version } )` ,
211211 enabled : false ,
212212 visible : Boolean ( engine && version ) ,
213213 } ,
@@ -332,7 +332,7 @@ const AppCard = (props) => {
332332 { renderActionsElement ( ) }
333333 </ div >
334334 { engineIcon && (
335- < Tooltip title = { `Powered by ${ engineName } ${ version ? ` (implementation ${ version } )` : '' } ` } >
335+ < Tooltip title = { `Powered by ${ engineName } ${ version ? ` (script v ${ version } )` : '' } ` } >
336336 < img src = { engineIcon } alt = { engineName } className = { classes . topLeft } />
337337 </ Tooltip >
338338 ) }
Original file line number Diff line number Diff line change 33 * file, You can obtain one at https://mozilla.org/MPL/2.0/. */
44import semver from 'semver' ;
55import { INSTALLING , INSTALLED } from '../../constants/app-statuses' ;
6+ import { scriptVersion } from '../../../package.json' ;
67
78export const isInstalledApp = ( id , state ) => {
89 const { apps } = state . appManagement ;
@@ -31,7 +32,7 @@ export const isOutdatedApp = (id, state) => {
3132 // app is Chromium/Firefox-based
3233 // check if app is installed with the latest version of forked-script-v2.js
3334 if ( window . process . platform === 'darwin' ) {
34- return semver . lt ( v , '2.13.0' ) ;
35+ return semver . lt ( v , scriptVersion ) ;
3536 }
3637 // check if app is installed with the latest version of forked-script-v1.js
3738 return semver . lt ( v , '1.8.0' ) ;
You can’t perform that action at this time.
0 commit comments