Skip to content

Commit

Permalink
Added additional office apps and update mobile doc
Browse files Browse the repository at this point in the history
There is now an additional apps json file include native office apps if people have office installed and wish to try launching and potentially snapping the documents. There is a new version of the create workspace mobile app npm package so the document has been updated to remove text that no longer applies.
  • Loading branch information
johnman committed Mar 15, 2024
1 parent f84ecf4 commit d59fa4c
Show file tree
Hide file tree
Showing 14 changed files with 148 additions and 57 deletions.
58 changes: 1 addition & 57 deletions how-to/hints-and-tips/docs/create-workspace-mobile-app.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,65 +54,9 @@ npm install -g @openfin/create-workspace-mobile-app
npx @openfin/create-workspace-mobile-app my-app
cd my-app
npm run build
npm start
npm run start
```

### If you encounter an error while running npm run build

> :warning: **Warning:** On Windows you may see the following error depending on the version being used when running **npm run build**.
>
> [Error: EPERM: operation not permitted, symlink 'C:\Code\my-directory\pwa\my-app\node_modules\@openfin\web-interop\out\shared-worker.js' -> 'C:\Code\my-directory\pwa\my-app\public\worker.js']
>
> This is a copy step that copies a dependency from node_modules to the public directory of the sample application using symlinks.
>
If you encounter the error you can navigate to scripts/symlink-worker.js and:

Replace:

```javascript
const fs = require('fs/promises');
const path = require('path');

const worker = require.resolve('@openfin/web-interop/shared-worker');
const symlinkPath = path.resolve(__dirname, '../public/worker.js');
async function main() {
const shouldUnlink = await fs.stat(symlinkPath).catch(() => false);
if ((shouldUnlink && shouldUnlink.isFile) || shouldUnlink.isSymbolicLink) {
await fs.unlink(symlinkPath);
}
await fs.symlink(worker, symlinkPath);
}

main()
.then(() => {
console.log(`Linked ${worker} to ${symlinkPath}`);
})
.catch(console.error);
```

With this:

```javascript
const fs = require('fs/promises');
const path = require('path');

const worker = require.resolve('@openfin/web-interop/shared-worker');
const targetPath = path.resolve(__dirname, '../public/worker.js');
async function main() {
await fs.copyFile(worker, targetPath);
}

main()
.then(() => {
console.log(`Copied ${worker} to ${targetPath}`);
})
.catch(console.error);

```

After you have saved this change then the file should copy from node_modules to the target location when you run **npm run build** without reporting errors.

### After running build and start

This will build and start a web server on port 3000. You should be able to open the following link:
Expand Down
1 change: 1 addition & 0 deletions how-to/workspace-platform-starter/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
- Added additional context event to the app channel `platform/events` when a language is changed: type: `platform.language` which includes the selected locale.
- Added ability to specify initial language through platformProvider.language.initialLanguage in your settings. Default browser menu options and tooltips support the following locales: en-US (default), ja-JP, zh-CN, zh-Hant, ko-KR, ru-RU, de-DE. More information about this feature can be found here: <https://developers.openfin.co/of-docs/docs/localization>
- Added support for specifying notificationsCustomManifest ([self hosted notifications center](https://developers.openfin.co/of-docs/docs/register-notifications#host-on-your-cdn)) in the notificationsProvider settings so that it is used by the platform and the notificationClient passed to modules. As these settings are passed into the platform it will be available through the new platform api call of platform.getNotificationsConfig() (assuming you have used the getCurrentSync function from @openfin/workspace-platform or the function exposed by the module helper if you are building a module for workspace platform starter). Modules shouldn't need this as the notification client returned via the helper takes into account these settings.
- Added an example [apps-native-microsoft-office.json](./public/common/apps-native-microsoft-office.json) that can be added to the appProvider list of app json files to load in your manifest. This will add the native Microsoft Office Apps that you can launch. If you have the snapProvider enabled in your manifest these applications can also be snapped. This is an example for experimentation and discovery.

## v17.0.0

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,135 @@
[
{
"appId": "ms-outlook-mail",
"name": "ms-outlook-mail",
"title": "Microsoft Outlook",
"description": "Launch Microsoft Outlook.",
"manifest": {
"path": "C:\\Program Files\\Microsoft Office\\root\\Office16\\OUTLOOK.EXE"
},
"manifestType": "inline-external",
"icons": [
{
"src": "http://localhost:8080/common/images/ms/apps/outlook-mail.svg"
}
],
"contactEmail": "[email protected]",
"supportEmail": "[email protected]",
"publisher": "Microsoft",
"intents": [],
"images": [],
"tags": ["native", "microsoft", "outlook", "mail"],
"launchPreference": {
"options": {
"type": "native",
"snap": {
"strategy": {
"type": "waitForWindowOfClass",
"timeoutMs": 15000,
"matchRegex": "^(rctrl_renwnd32|OlkWV2Frame)"
}
}
}
}
},
{
"appId": "ms-word",
"name": "ms-word",
"title": "Microsoft Word",
"description": "Launch Microsoft Word.",
"manifest": {
"path": "C:\\Program Files\\Microsoft Office\\root\\Office16\\WINWORD.EXE"
},
"manifestType": "inline-external",
"icons": [
{
"src": "http://localhost:8080/common/images/ms/apps/word.svg"
}
],
"contactEmail": "[email protected]",
"supportEmail": "[email protected]",
"publisher": "Microsoft",
"intents": [],
"images": [],
"tags": ["native", "microsoft", "word"],
"launchPreference": {
"options": {
"type": "native",
"snap": {
"strategy": {
"type": "waitForWindowOfClass",
"timeoutMs": 15000,
"matchRegex": "^OpusApp"
}
}
}
}
},
{
"appId": "ms-excel",
"name": "ms-excel",
"title": "Microsoft Excel",
"description": "Launch Microsoft Excel.",
"manifest": {
"path": "C:\\Program Files\\Microsoft Office\\root\\Office16\\EXCEL.EXE",
"arguments": "/x"
},
"manifestType": "inline-external",
"icons": [
{
"src": "http://localhost:8080/common/images/ms/apps/excel.svg"
}
],
"contactEmail": "[email protected]",
"supportEmail": "[email protected]",
"publisher": "Microsoft",
"intents": [],
"images": [],
"tags": ["native", "microsoft", "excel"],
"launchPreference": {
"options": {
"type": "native",
"snap": {
"strategy": {
"type": "waitForWindowOfClass",
"timeoutMs": 15000,
"matchRegex": "^XLMAIN"
}
}
}
}
},
{
"appId": "ms-powerpoint",
"name": "ms-powerpoint",
"title": "Microsoft PowerPoint",
"description": "Launch Microsoft PowerPoint.",
"manifest": {
"path": "C:\\Program Files\\Microsoft Office\\root\\Office16\\POWERPNT.EXE"
},
"manifestType": "inline-external",
"icons": [
{
"src": "http://localhost:8080/common/images/ms/apps/powerpoint.svg"
}
],
"contactEmail": "[email protected]",
"supportEmail": "[email protected]",
"publisher": "Microsoft",
"intents": [],
"images": [],
"tags": ["native", "microsoft", "powerpoint"],
"launchPreference": {
"options": {
"type": "native",
"snap": {
"strategy": {
"type": "waitForWindowOfClass",
"timeoutMs": 15000,
"matchRegex": "^PPTFrameClass"
}
}
}
}
}
]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit d59fa4c

Please sign in to comment.