-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Worked on windows installer and added code to throw R errors as JS ex…
…ceptions so that the error messages show up in JS error console.
- Loading branch information
Showing
9 changed files
with
175 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
|
||
resource.o: | ||
windres resource.rc resource.o | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,105 @@ | ||
; Script generated by the Inno Setup Script Wizard. | ||
; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES! | ||
|
||
#define MyAppName "RBrowserPlugin" | ||
#define MyAppVersion "0.9" | ||
#define MyAppPublisher "Gabriel Becker" | ||
#define MyAppURL "http://www.omegahat.org/RBrowserPlugin" | ||
|
||
[Setup] | ||
; NOTE: The value of AppId uniquely identifies this application. | ||
; Do not use the same AppId value in installers for other applications. | ||
; (To generate a new GUID, click Tools | Generate GUID inside the IDE.) | ||
AppId={{47529F3D-851C-45F7-9FEF-C49164125A2F} | ||
AppName={#MyAppName} | ||
AppVersion={#MyAppVersion} | ||
;AppVerName={#MyAppName} {#MyAppVersion} | ||
AppPublisher={#MyAppPublisher} | ||
AppPublisherURL={#MyAppURL} | ||
AppSupportURL={#MyAppURL} | ||
AppUpdatesURL={#MyAppURL} | ||
DefaultDirName={pf}\{#MyAppName} | ||
DefaultGroupName={#MyAppName} | ||
LicenseFile=C:\Users\gmbecker\Documents\GitHub\RFirefox\inst\NPAPI\liscense.txt | ||
OutputDir=C:\Users\gmbecker\Documents\GitHub\RFirefox\inst\NPAPI\WinInstaller | ||
OutputBaseFilename=RBrowserPluginSetup | ||
Compression=lzma | ||
SolidCompression=yes | ||
;ArchitecturesInstallIn64BitMode=x64 | ||
|
||
[Languages] | ||
Name: "english"; MessagesFile: "compiler:Default.isl" | ||
Name: "brazilianportuguese"; MessagesFile: "compiler:Languages\BrazilianPortuguese.isl" | ||
Name: "catalan"; MessagesFile: "compiler:Languages\Catalan.isl" | ||
Name: "czech"; MessagesFile: "compiler:Languages\Czech.isl" | ||
Name: "danish"; MessagesFile: "compiler:Languages\Danish.isl" | ||
Name: "dutch"; MessagesFile: "compiler:Languages\Dutch.isl" | ||
Name: "finnish"; MessagesFile: "compiler:Languages\Finnish.isl" | ||
Name: "french"; MessagesFile: "compiler:Languages\French.isl" | ||
Name: "german"; MessagesFile: "compiler:Languages\German.isl" | ||
Name: "greek"; MessagesFile: "compiler:Languages\Greek.isl" | ||
Name: "hebrew"; MessagesFile: "compiler:Languages\Hebrew.isl" | ||
Name: "hungarian"; MessagesFile: "compiler:Languages\Hungarian.isl" | ||
Name: "italian"; MessagesFile: "compiler:Languages\Italian.isl" | ||
Name: "japanese"; MessagesFile: "compiler:Languages\Japanese.isl" | ||
Name: "norwegian"; MessagesFile: "compiler:Languages\Norwegian.isl" | ||
Name: "polish"; MessagesFile: "compiler:Languages\Polish.isl" | ||
Name: "portuguese"; MessagesFile: "compiler:Languages\Portuguese.isl" | ||
Name: "russian"; MessagesFile: "compiler:Languages\Russian.isl" | ||
Name: "serbiancyrillic"; MessagesFile: "compiler:Languages\SerbianCyrillic.isl" | ||
Name: "serbianlatin"; MessagesFile: "compiler:Languages\SerbianLatin.isl" | ||
Name: "slovenian"; MessagesFile: "compiler:Languages\Slovenian.isl" | ||
Name: "spanish"; MessagesFile: "compiler:Languages\Spanish.isl" | ||
Name: "ukrainian"; MessagesFile: "compiler:Languages\Ukrainian.isl" | ||
|
||
[Files] | ||
Source: "C:\Users\gmbecker\Documents\GitHub\RFirefox\inst\NPAPI\npRBrowserPlugin.dll"; DestDir: "{app}"; Flags: ignoreversion | ||
; NOTE: Don't use "Flags: ignoreversion" on any shared system files | ||
|
||
[Icons] | ||
Name: "{group}\{cm:ProgramOnTheWeb,{#MyAppName}}"; Filename: "{#MyAppURL}" | ||
Name: "{group}\{cm:UninstallProgram,{#MyAppName}}"; Filename: "{uninstallexe}" | ||
|
||
[Registry] | ||
;Root: HKLM; Subkey: "SYSTEM\CurrentControlSet\Control\Session Manager\Environment"; ValueName: "R_HOME"; ValueData: {reg:HKLM\Software\R-Core\R, InstallPath}; ValueType: string; Flags: createvalueifdoesntexist uninsdeletevalue; | ||
Root: HKLM; Subkey: "SYSTEM\CurrentControlSet\Control\Session Manager\Environment"; ValueName: "R_HOME"; ValueData: {code:RLoc}; ValueType: string; Flags: createvalueifdoesntexist uninsdeletevalue; | ||
Root: HKLM; Subkey: "Software\MozillaPlugins\@R/RBrowserPlugin"; ValueType: string; Flags: uninsdeletekey; | ||
Root: HKLM; Subkey: "Software\MozillaPlugins\@R/RBrowserPlugin"; ValueName: "Path"; ValueData: "{app}\npRBrowserPlugin.dll"; ValueType: string; | ||
Root: HKLM; Subkey: "Software\MozillaPlugins\@R/RBrowserPlugin"; ValueName: "Description"; ValueData: "R Browser Plugin"; ValueType: string; | ||
Root: HKLM; Subkey: "Software\MozillaPlugins\@R/RBrowserPlugin\MimeTypes"; ValueType: string; Flags: uninsdeletekey; | ||
Root: HKLM; Subkey: "Software\MozillaPlugins\@R/RBrowserPlugin\MimeTypes\application/r"; ValueType: string; Flags: uninsdeletekey; | ||
Root: HKLM; Subkey: "Software\MozillaPlugins\@R/RBrowserPlugin\MimeTypes\application/test-r"; ValueType: string; Flags: uninsdeletekey; | ||
|
||
[Code] | ||
var | ||
RHomePage: TInputDirWizardPage; | ||
procedure InitializeWizard; | ||
begin | ||
RHomePage := CreateInputDirPage(wpSelectDir, | ||
'Select R_HOME Location', 'Where is the R installation which should be used by the plugin?', | ||
'Select the folder in which the R installation to be used by the plugin is located, then click Next.', | ||
False, ''); | ||
RHomePage.Add(''); | ||
RHomePage.Values[0] := ExpandConstant('{code:RLocFromReg}'); | ||
end; | ||
function RLoc(Param: String): String; | ||
begin | ||
Result := RHomePage.Values[0]; | ||
end; | ||
function RLocFromReg(Param: String): String; | ||
begin | ||
if IsWin64 then | ||
begin | ||
RegQueryStringValue(HKEY_LOCAL_MACHINE, 'SOFTWARE\Wow6432Node\R-core\R', | ||
'InstallPath', Result); | ||
end | ||
else | ||
begin | ||
RegQueryStringValue(HKEY_LOCAL_MACHINE, 'SOFTWARE\R-core\R', | ||
'InstallPath', Result); | ||
end; | ||
end; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
<html> | ||
<script type="text/javascript" src = "../javascript/Rhelpers.js"></script> | ||
<head> | ||
<script type="text/R"> | ||
getplat = function() sessionInfo()$platform | ||
</script> | ||
<script type="text/javascript"> | ||
function getplatform() | ||
{ | ||
var res = R.getplat(); | ||
alert(res); | ||
var div = document.getElementById("mydiv"); | ||
div.innerHTML = res; | ||
} | ||
</script> | ||
|
||
</head> | ||
<body> | ||
<embed type="application/test-r" width="0" height="0"></embed> | ||
<input type="button" onclick="getplatform();"/> | ||
<div id="mydiv" ></div> | ||
|
||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters