diff --git a/.eslintrc.js b/.eslintrc.js
index 5da6a7f..e77ac92 100644
--- a/.eslintrc.js
+++ b/.eslintrc.js
@@ -12,7 +12,7 @@ module.exports = {
ecmaVersion: 2020
},
rules: {
- 'no-console': process.env.NODE_ENV === 'production' ? 'warn' : 'off',
+ 'no-console': process.env.NODE_ENV === 'production' ? ['warn', { allow: ['warn', 'error'] }] : 'off',
'no-debugger': process.env.NODE_ENV === 'production' ? 'warn' : 'off'
}
}
diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml
new file mode 100644
index 0000000..5847d65
--- /dev/null
+++ b/.github/workflows/publish.yml
@@ -0,0 +1,69 @@
+name: "publish"
+on:
+push:
+ branches:
+ - release
+
+jobs:
+ publish-tauri:
+ strategy:
+ fail-fast: false
+ matrix:
+ platform: [macos-latest, ubuntu-latest, windows-latest]
+
+ runs-on: ${{ matrix.platform }}
+ steps:
+ - uses: actions/checkout@v2
+ - name: Get yarn cache directory path
+ id: yarn-cache-dir-path
+ run: echo "::set-output name=dir::$(yarn cache dir)"
+ - uses: actions/cache@v2
+ id: yarn-cache
+ with:
+ path: |
+ ${{ steps.yarn-cache-dir-path.outputs.dir }}
+ key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
+ restore-keys: |
+ ${{ runner.os }}-yarn-
+ - uses: actions/cache@v2
+ with:
+ path: |
+ ~/.cargo/registry
+ ~/.cargo/git
+ ~/.cargo/bin
+ src-tauri/target
+ key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
+ restore-keys: |
+ ${{ runner.os }}-cargo-
+ - name: setup node
+ uses: actions/setup-node@v1
+ with:
+ node-version: 12
+ - name: install Rust stable
+ uses: actions-rs/toolchain@v1
+ with:
+ toolchain: stable
+ - name: install tauri bundler
+ if: runner.os != 'Windows'
+ run: cargo install tauri-bundler || [ $? -eq 101 ]
+ - name: install tauri bundler
+ if: runner.os == 'Windows'
+ run: cargo install tauri-bundler; exit ($LASTEXITCODE -ne 101 -and $LASTEXITCODE -ne 0)
+ shell: powershell -command "& '{0}'"
+ - name: install webkit2gtk (ubuntu only)
+ if: matrix.platform == 'ubuntu-latest'
+ run: |
+ sudo apt-get update
+ sudo apt-get install -y webkit2gtk-4.0 squashfs-tools
+ - name: install app dependencies
+ run: yarn
+ - uses: tauri-apps/tauri-action@v0
+ env:
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+ with:
+ npmScript: "tauri:build"
+ tagName: v__VERSION__ # the action automatically replaces \_\_VERSION\_\_ with the app version
+ releaseName: "N-Link v__VERSION__"
+ body: "See the assets to download this version and install."
+ draft: true
+ prerelease: false
diff --git a/README.md b/README.md
index 9973bd5..ed92956 100644
--- a/README.md
+++ b/README.md
@@ -1,18 +1,20 @@
-# n-link
+# N-Link
+
+Free, cross-platform, CX-II compatible computer linking program for the TI-Nspire
## Project setup
```
-yarn install
+yarn
```
### Compiles and hot-reloads for development
```
-yarn serve
+yarn tauri:serve
```
### Compiles and minifies for production
```
-yarn build
+yarn tauri:build
```
### Lints and fixes files
diff --git a/app-icon.png b/app-icon.png
new file mode 100644
index 0000000..805c4cd
Binary files /dev/null and b/app-icon.png differ
diff --git a/app-icon.svg b/app-icon.svg
new file mode 100644
index 0000000..c1958ca
--- /dev/null
+++ b/app-icon.svg
@@ -0,0 +1,267 @@
+
+
diff --git a/package.json b/package.json
index 4e55913..88f4245 100644
--- a/package.json
+++ b/package.json
@@ -1,10 +1,9 @@
{
"name": "n-link",
+ "description": "Free, cross-platform, CX-II compatible computer linking program for the TI-Nspire",
"version": "0.1.0",
"private": true,
"scripts": {
- "serve": "vue-cli-service serve",
- "build": "vue-cli-service build",
"lint": "vue-cli-service lint",
"tauri:build": "vue-cli-service tauri:build",
"tauri:serve": "vue-cli-service tauri:serve"
diff --git a/src-tauri/Cargo.toml b/src-tauri/Cargo.toml
index a3227f4..a60a386 100644
--- a/src-tauri/Cargo.toml
+++ b/src-tauri/Cargo.toml
@@ -1,7 +1,7 @@
[package]
name = "n-link"
version = "0.1.0"
-description = "A Tauri App"
+description = "Free, cross-platform, CX-II compatible computer linking program for the TI-Nspire"
authors = [ "Ben Schattinger " ]
license = "GPL-3.0"
repository = "https://github.com/lights0123/n-link"
diff --git a/src-tauri/icons/128x128.png b/src-tauri/icons/128x128.png
index f8d9962..f234322 100644
Binary files a/src-tauri/icons/128x128.png and b/src-tauri/icons/128x128.png differ
diff --git a/src-tauri/icons/128x128@2x.png b/src-tauri/icons/128x128@2x.png
index 44d26d0..46d7ee8 100644
Binary files a/src-tauri/icons/128x128@2x.png and b/src-tauri/icons/128x128@2x.png differ
diff --git a/src-tauri/icons/32x32.png b/src-tauri/icons/32x32.png
index b6bf7d6..97fd185 100644
Binary files a/src-tauri/icons/32x32.png and b/src-tauri/icons/32x32.png differ
diff --git a/src-tauri/icons/Square107x107Logo.png b/src-tauri/icons/Square107x107Logo.png
index 6146c33..432bd80 100644
Binary files a/src-tauri/icons/Square107x107Logo.png and b/src-tauri/icons/Square107x107Logo.png differ
diff --git a/src-tauri/icons/Square142x142Logo.png b/src-tauri/icons/Square142x142Logo.png
index e24cb2a..c392d8d 100644
Binary files a/src-tauri/icons/Square142x142Logo.png and b/src-tauri/icons/Square142x142Logo.png differ
diff --git a/src-tauri/icons/Square150x150Logo.png b/src-tauri/icons/Square150x150Logo.png
index a389fb4..ded31cb 100644
Binary files a/src-tauri/icons/Square150x150Logo.png and b/src-tauri/icons/Square150x150Logo.png differ
diff --git a/src-tauri/icons/Square284x284Logo.png b/src-tauri/icons/Square284x284Logo.png
index c43c42f..7eb4dbf 100644
Binary files a/src-tauri/icons/Square284x284Logo.png and b/src-tauri/icons/Square284x284Logo.png differ
diff --git a/src-tauri/icons/Square30x30Logo.png b/src-tauri/icons/Square30x30Logo.png
index 493f155..4e0129d 100644
Binary files a/src-tauri/icons/Square30x30Logo.png and b/src-tauri/icons/Square30x30Logo.png differ
diff --git a/src-tauri/icons/Square310x310Logo.png b/src-tauri/icons/Square310x310Logo.png
index 6380a98..9d8a644 100644
Binary files a/src-tauri/icons/Square310x310Logo.png and b/src-tauri/icons/Square310x310Logo.png differ
diff --git a/src-tauri/icons/Square44x44Logo.png b/src-tauri/icons/Square44x44Logo.png
index 61e4eff..9fb7e50 100644
Binary files a/src-tauri/icons/Square44x44Logo.png and b/src-tauri/icons/Square44x44Logo.png differ
diff --git a/src-tauri/icons/Square71x71Logo.png b/src-tauri/icons/Square71x71Logo.png
index 668945b..5f92c65 100644
Binary files a/src-tauri/icons/Square71x71Logo.png and b/src-tauri/icons/Square71x71Logo.png differ
diff --git a/src-tauri/icons/Square89x89Logo.png b/src-tauri/icons/Square89x89Logo.png
index 1e14926..16cc7eb 100644
Binary files a/src-tauri/icons/Square89x89Logo.png and b/src-tauri/icons/Square89x89Logo.png differ
diff --git a/src-tauri/icons/StoreLogo.png b/src-tauri/icons/StoreLogo.png
index 1f20ed7..a41bc82 100644
Binary files a/src-tauri/icons/StoreLogo.png and b/src-tauri/icons/StoreLogo.png differ
diff --git a/src-tauri/icons/icon.icns b/src-tauri/icons/icon.icns
index 43c73bd..4dcd8cc 100644
Binary files a/src-tauri/icons/icon.icns and b/src-tauri/icons/icon.icns differ
diff --git a/src-tauri/icons/icon.ico b/src-tauri/icons/icon.ico
index db7fd98..cd77b52 100644
Binary files a/src-tauri/icons/icon.ico and b/src-tauri/icons/icon.ico differ
diff --git a/src-tauri/icons/icon.png b/src-tauri/icons/icon.png
index e65ea7e..e81bcaf 100644
Binary files a/src-tauri/icons/icon.png and b/src-tauri/icons/icon.png differ
diff --git a/src-tauri/src/cmd.rs b/src-tauri/src/cmd.rs
index db9bc55..8b34c6e 100644
--- a/src-tauri/src/cmd.rs
+++ b/src-tauri/src/cmd.rs
@@ -148,7 +148,7 @@ pub enum Cmd {
}
pub fn add_device(dev: Arc>) -> rusb::Result<((u8, u8), Device)> {
- let descriptor = dbg!(dev.device_descriptor()?);
+ let descriptor = dev.device_descriptor()?;
if !(descriptor.vendor_id() == VID && matches!(descriptor.product_id(), PID | PID_CX2)) {
return Err(rusb::Error::Other);
}
@@ -164,9 +164,9 @@ pub fn add_device(dev: Arc>) -> rusb::Result<((u8, u
),
Err(rusb::Error::NotSupported) => (
if descriptor.product_id() == PID_CX2 {
- "TI Nspire CX II"
+ "TI-Nspire CX II"
} else {
- "TI Nspire"
+ "TI-Nspire"
}
.to_string(),
true,
@@ -213,19 +213,13 @@ pub fn enumerate(handle: &mut WebviewMut) -> Result, libnspire::E
Ok(
filtered
.into_iter()
- .filter_map(|dev| {
- match add_device(Arc::new(dev)) {
- Ok(d) => Ok(d),
- Err(e) => Err(dbg!(e)),
- }
- .ok()
- })
+ .filter_map(|dev| add_device(Arc::new(dev)).ok())
.map(|dev| {
let msg = AddDevice {
- dev: dbg!(DevId {
+ dev: DevId {
bus_number: (dev.0).0,
address: (dev.0).1,
- }),
+ },
name: (dev.1).name.clone(),
is_cx_ii: (dev.1)
.device
diff --git a/src-tauri/src/main.rs b/src-tauri/src/main.rs
index fdfe1c2..03f84e7 100644
--- a/src-tauri/src/main.rs
+++ b/src-tauri/src/main.rs
@@ -112,9 +112,6 @@ fn err_wrap(
dev: DevId,
handle: &mut WebviewMut,
) -> Result {
- if let Err(ref e) = res {
- dbg!(e);
- }
if let Err(libnspire::Error::NoDevice) = res {
DEVICES
.write()
diff --git a/src-tauri/tauri.conf.json b/src-tauri/tauri.conf.json
index 7ddf2f9..c34461b 100644
--- a/src-tauri/tauri.conf.json
+++ b/src-tauri/tauri.conf.json
@@ -7,7 +7,7 @@
"bundle": {
"active": true,
"targets": "all",
- "identifier": "com.tauri.dev",
+ "identifier": "com.lights0123.n-link",
"icon": [
"icons/32x32.png",
"icons/128x128.png",
@@ -19,8 +19,8 @@
"externalBin": [],
"copyright": "Copyright (c) 2020 Ben Schattinger. Licensed under GPL-3.0",
"category": "Utility",
- "shortDescription": "",
- "longDescription": "",
+ "shortDescription": "Free, cross-platform, CX-II compatible computer linking program for the TI-Nspire",
+ "longDescription": "Free, cross-platform, CX-II compatible computer linking program for the TI-Nspire",
"osx": {
"frameworks": [],
"minimumSystemVersion": "",
diff --git a/src/components/devices.ts b/src/components/devices.ts
index c2de762..1bc8726 100644
--- a/src/components/devices.ts
+++ b/src/components/devices.ts
@@ -127,7 +127,6 @@ class Devices extends Vue {
const str = devToString(payload);
const existing = this.devices[str] || {};
this.$set(this.devices, str, {...existing, ...payload});
- console.log(dev);
});
listen('removeDevice', dev => {
this.$delete(this.devices, devToString(dev.payload as DevId));
@@ -196,9 +195,8 @@ class Devices extends Vue {
try {
for (const dev of await promisified({cmd: 'enumerate'}) as (Device & DevId)[]) {
this.$set(this.devices, devToString(dev as DevId), dev);
- console.log(dev);
}
- }finally {
+ } finally {
this.enumerating = false;
}
}
diff --git a/src/views/Home.vue b/src/views/Home.vue
index 3b9c305..2ddf7df 100644
--- a/src/views/Home.vue
+++ b/src/views/Home.vue
@@ -84,7 +84,7 @@ export default class Home extends Vue {
}
installDrivers() {
- open('https://github.com');
+ open('https://zadig.akeo.ie/');
}
}