JuliaMSI/start_MSI_GUI.jl
2025-01-13 12:50:57 -06:00

26 lines
769 B
Julia

using Pkg
Pkg.activate(".")
Pkg.add("Libz") ; Pkg.add("PlotlyBase") ; Pkg.add("CairoMakie") ; Pkg.add("Colors") ; Pkg.add("Statistics") ; Pkg.add("NaturalSort")
Pkg.add(url="https://github.com/CINVESTAV-LABI/julia_mzML_imzML") # With this we ensure it uses the latest library iteration
Pkg.instantiate()
Pkg.update()
using Genie
# Load and configure Genie
Genie.loadapp()
# Start the Genie server
@async begin
up(host="127.0.0.1", port=1481)
url = "http://127.0.0.1:1481"
# Open the URL in the default web browser based on the OS
if Sys.isapple()
@async run(`open $url`) # For macOS
elseif Sys.islinux()
@async run(`xdg-open $url`) # For Linux
elseif Sys.iswindows()
@async run(`start $url`) # For Windows
end
end