Skip to content

Commit

Permalink
Rename libravel.dll prior to downloading and installing a new version…
Browse files Browse the repository at this point in the history
…. For ravel #552.
  • Loading branch information
highperformancecoder committed May 7, 2024
1 parent ef307b6 commit ab444c5
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion RavelCAPI
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import {
minsky, GodleyIcon, Group, IntOp, Item, Lock, Ravel, VariableBase, Wire, Utility
} from '@minsky/shared';
import { app, dialog, ipcMain, Menu, MenuItem, SaveDialogOptions,} from 'electron';
import { existsSync, unlinkSync } from 'fs';
import { existsSync, renameSync, unlinkSync } from 'fs';
import JSON5 from 'json5';
import { join, dirname } from 'path';
import { tmpdir } from 'os';
Expand Down Expand Up @@ -1120,7 +1120,8 @@ export class CommandsManager {
switch (process.platform) {
case 'win32':
const savePath=dirname(process.execPath)+'/libravel.dll';
minsky.unloadRavel();
if (existsSync(savePath))
renameSync(savePath,dirname(process.execPath)+'/deleteme')
item.setSavePath(savePath);
break;
default:
Expand Down
1 change: 0 additions & 1 deletion model/minsky.h
Original file line number Diff line number Diff line change
Expand Up @@ -341,7 +341,6 @@ namespace minsky
}
static bool ravelExpired() {return ravel::Ravel::available() && ravel::Ravel::daysUntilExpired()<0;}
static int daysUntilRavelExpires() {return ravel::Ravel::daysUntilExpired();}
static void unloadRavel() {ravel::Ravel::unload();}

std::string fileVersion; ///< Minsky version file was saved under

Expand Down

0 comments on commit ab444c5

Please sign in to comment.