From 874e14e2908f225eab23db3a0e52945449bedf08 Mon Sep 17 00:00:00 2001 From: Marc Espin Sanz Date: Sat, 12 Mar 2022 13:56:39 +0100 Subject: [PATCH] :sparkles: MacOS and Linux should work fine now --- bindings/bindings.ts | 18 +++++++++--------- examples/oak/build.ts | 2 +- readme.md | 8 ++++---- 3 files changed, 14 insertions(+), 14 deletions(-) diff --git a/bindings/bindings.ts b/bindings/bindings.ts index 16c9663..1ede474 100644 --- a/bindings/bindings.ts +++ b/bindings/bindings.ts @@ -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, @@ -32,14 +32,6 @@ const _lib = await prepare(opts, { nonblocking: false, }, }) -export type BundleSettingsInstaller = { - identifier: string | undefined | null - icon: Array | undefined | null - resources: Array | undefined | null - copyright: string | undefined | null - short_description: string | undefined | null - long_description: string | undefined | null -} export type PackageSettingsInstaller = { product_name: string version: string @@ -54,6 +46,14 @@ export type InstallerSettings = { bundle: BundleSettingsInstaller package: PackageSettingsInstaller } +export type BundleSettingsInstaller = { + identifier: string | undefined | null + icon: Array | undefined | null + resources: Array | 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) diff --git a/examples/oak/build.ts b/examples/oak/build.ts index 7fb3fa3..d87ef62 100644 --- a/examples/oak/build.ts +++ b/examples/oak/build.ts @@ -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", diff --git a/readme.md b/readme.md index 6475230..52246da 100644 --- a/readme.md +++ b/readme.md @@ -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) @@ -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",