Skip to content

Commit

Permalink
✨ MacOS and Linux should work fine now
Browse files Browse the repository at this point in the history
  • Loading branch information
marc2332 committed Mar 12, 2022
1 parent 428bdde commit 874e14e
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 14 deletions.
18 changes: 9 additions & 9 deletions bindings/bindings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ const opts = {
name: "deno_installer",
url:
(new URL(
"https://github.com/marc2332/deno_installer/releases/download/0.1.0/deno_installer.dll",
"https://github.com/marc2332/deno_installer/releases/download/0.1.0/",
import.meta.url,
)).toString(),
policy: undefined,
Expand All @@ -32,14 +32,6 @@ const _lib = await prepare(opts, {
nonblocking: false,
},
})
export type BundleSettingsInstaller = {
identifier: string | undefined | null
icon: Array<string> | undefined | null
resources: Array<string> | undefined | null
copyright: string | undefined | null
short_description: string | undefined | null
long_description: string | undefined | null
}
export type PackageSettingsInstaller = {
product_name: string
version: string
Expand All @@ -54,6 +46,14 @@ export type InstallerSettings = {
bundle: BundleSettingsInstaller
package: PackageSettingsInstaller
}
export type BundleSettingsInstaller = {
identifier: string | undefined | null
icon: Array<string> | undefined | null
resources: Array<string> | undefined | null
copyright: string | undefined | null
short_description: string | undefined | null
long_description: string | undefined | null
}
export function create_installer(a0: InstallerSettings) {
const a0_buf = encode(JSON.stringify(a0))
let rawResult = _lib.symbols.create_installer(a0_buf, a0_buf.byteLength)
Expand Down
2 changes: 1 addition & 1 deletion examples/oak/build.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { Installer } from "../../mod.ts";

const installer = new Installer({
out_path: `${Deno.cwd()}/dist`,
src_path: `${Deno.cwd()}/app.exe`,
src_path: `${Deno.cwd()}/app${Deno.build.os === "windows" ? ".exe" : ""}`,
package: {
product_name: "MyApp",
version: "1.0.0",
Expand Down
8 changes: 4 additions & 4 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,16 @@

You can now easily create installers for your Deno apps, thanks to the amazing work of [Tauri](https://github.com/tauri-apps/tauri/tree/dev/tooling/bundler) 💪

IMPORTANT note: the code is very **meh**
IMPORTANT note: the code is still very **meh**

That beind said, feel free to contribute, it only supports **Windows** at the moment (that's the only one I have tested with). If you are a MacOS or Linux user I would appreciate some feedback! See [Contributing](#Contributing) if that's the case!
That beind said, feel free to contribute. If you have any feature idea see [Contributing](#Contributing) :)

## Demo

Before making the installer make sure you have your project as:

```
+-- MyApp.exe
+-- MyAppExecutable (.exe if in Windows)
+-- icons
| +-- icon.ico (Windows)
| +-- icon.png (MacOS & Linux)
Expand All @@ -24,7 +24,7 @@ import { Installer } from "https://deno.land/x/installer/mod.ts";

const installer = new Installer({
out_path: `${Deno.cwd()}/dist`,
src_path: `${Deno.cwd()}/MyApp.exe`,
src_path: `${Deno.cwd()}/MyAppExecutable${Deno.build.os === "windows" ? ".exe" : ""}`,
package: {
product_name: "MyApp",
version: "1.0.0",
Expand Down

0 comments on commit 874e14e

Please sign in to comment.