Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for Tauri 1.x #8

Open
utranhost opened this issue Aug 15, 2023 · 3 comments
Open

Support for Tauri 1.x #8

utranhost opened this issue Aug 15, 2023 · 3 comments

Comments

@utranhost
Copy link

pnpm create tauri-ui installs the latest alpha version of tauri, How do I switch to tauri1.4?

@agmmnn agmmnn changed the title How do I switch tauri versions Support for Tauri 1.x Aug 15, 2023
@agmmnn
Copy link
Owner

agmmnn commented Aug 15, 2023

./

pnpm remove @tauri-apps/cli @tauri-apps/api @tauri-apps/plugin-app @tauri-apps/plugin-os @tauri-apps/plugin-shell @tauri-apps/plugin-window
pnpm add @tauri-apps/api@latest
pnpm add @tauri-apps/cli@latest -D

./src-tauri

cargo remove tauri tauri-plugin-app tauri-plugin-os tauri-plugin-shell tauri-plugin-window
cargo remove --build tauri-build
cargo add tauri
cargo add --build tauri-build

./src/components/menu.tsx, delete tauri-controls everything about it. (it doesn't support v1)

- import { WindowTitlebar } from "tauri-controls"

./src/components/about-dialog.tsx, make following changes:

- import { getName, getTauriVersion, getVersion } from "@tauri-apps/plugin-app"
- import { arch } from "@tauri-apps/plugin-os"
- import { open } from "@tauri-apps/plugin-shell"

import { getName, getTauriVersion, getVersion } from "@tauri-apps/api/app"
import { arch } from "@tauri-apps/api/os"
import { open } from "@tauri-apps/api/shell"

./src-tauri/src/main.rs, change main function as:

fn main() {
    tauri::Builder::default()
        .invoke_handler(tauri::generate_handler![greet])
        .run(tauri::generate_context!())
        .expect("error while running tauri application");
}

@KhalilSelyan
Copy link

KhalilSelyan commented Sep 13, 2023

I followed these steps,on dev everything works fine, but on build it doesn't build a usable app any fix ?

I would see the following message when i run the built app , Could not connect: Connection refused

@drixie
Copy link

drixie commented Sep 17, 2023

How about an option to choose either alpha or latest during installation?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants