diff --git a/README.md b/README.md index e970cbb..59a0943 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,3 @@ # SimplePanoramaViewer -This is a simple panorama viewer based on [Photo Sphere Viewer](http://photo-sphere-viewer.js.org) which is based on [Three.js](https://threejs.org/), [D.js](https://malko.github.io/D.js/), [uEvenet](https://github.com/mistic100/uEvent) and [doT.js](https://olado.github.io/doT/). \ No newline at end of file +This is a simple panorama viewer based on [Photo Sphere Viewer](http://photo-sphere-viewer.js.org) which is based on [Three.js](https://threejs.org/) and [uEvenet](https://github.com/mistic100/uEvent). \ No newline at end of file diff --git a/install/SimplePanoramaViewer.desktop b/install/SimplePanoramaViewer.desktop index c53f6ab..1cd7529 100644 --- a/install/SimplePanoramaViewer.desktop +++ b/install/SimplePanoramaViewer.desktop @@ -4,9 +4,9 @@ Type=Application Name=SimplePanoramaViewer Comment=Simple web based panoram viewer Icon=emblem-photos -Exec=SimplePanoramaViewer +Exec=simple_panorama_viewer NoDisplay=false Categories=Graphics;Viewer StartupNotify=false Terminal=false -MimeType=image/jpeg;image/pjpg +MimeType=image/jpeg;image/pjpg;image/webp;image/avif diff --git a/install/pjpg.xml b/install/pjpg.xml deleted file mode 100644 index 19fe6d5..0000000 --- a/install/pjpg.xml +++ /dev/null @@ -1,10 +0,0 @@ - - - - Panoramic JPEG image - Image JPEG panoramique - - - - - diff --git a/utility.sh b/utility.sh index 7dcf7ad..a7a012d 100755 --- a/utility.sh +++ b/utility.sh @@ -33,20 +33,11 @@ install() echo $DESTDIR fi - mkdir -p "$DESTDIR/share/SimplePanoramaViewer/" mkdir -p "$DESTDIR/bin/" mkdir -p "$DESTDIR/share/applications" - mkdir -p "$DESTDIR/share/mime/image" - cp SimplePanoramaViewer "$DESTDIR/share/SimplePanoramaViewer" - cp -r css "$DESTDIR/share/SimplePanoramaViewer" - cp -r html "$DESTDIR/share/SimplePanoramaViewer" - cp -r js "$DESTDIR/share/SimplePanoramaViewer" cp install/SimplePanoramaViewer.desktop "$DESTDIR/share/applications" - cp install/pjpg.xml "$DESTDIR/share/mime/image" - echo "#!/bin/bash -$PREFIX/share/SimplePanoramaViewer/SimplePanoramaViewer \"\$@\"" > "$DESTDIR/bin/SimplePanoramaViewer" - chmod a+x "$DESTDIR/bin/SimplePanoramaViewer" - chmod -R a+r "$DESTDIR/share/SimplePanoramaViewer" + cp target/release/simple_panorama_viewer "$DESTDIR/bin" + chmod a+x "$DESTDIR/bin/simple_panorama_viewer" } uninstall() @@ -54,10 +45,8 @@ uninstall() DIR=$1 check_dir "$DIR" - rm "$DIR/bin/SimplePanoramaViewer" - rm -r "$DIR/share/SimplePanoramaViewer/" + rm "$DIR/bin/simple_panorama_viewer" rm "$DIR/share/applications/SimplePanoramaViewer.desktop" - rm "$DIR/share/mime/image/pjpg.xml" } package() @@ -65,21 +54,26 @@ package() DIR="/tmp/SimplePanoramaViewer" mkdir "$DIR" - cp SimplePanoramaViewer "$DIR" - cp -r css "$DIR" - cp -r html "$DIR" - cp -r js "$DIR" - chmod a+x "$DIR/SimplePanoramaViewer" + cp target/release/simple_panorama_viewer "$DIR" + cp LICENSE.md "$DIR" + cp README.md "$DIR" + chmod a+x "$DIR/simple_panorama_viewer" mkdir -p dist cd /tmp || exit - tar Jcvf "SimplePanoramaViewer.tar.xz" "SimplePanoramaViewer" + tar --zstd -cf "SimplePanoramaViewer.tar.zst" "SimplePanoramaViewer" cd - || exit - cp -f "$DIR.tar.xz" dist + cp -f "$DIR.tar.zst" dist rm -r "$DIR" - rm "$DIR.tar.xz" + rm "$DIR.tar.zst" +} + +build() +{ + cargo build --release + strip target/release/simple_panorama_viewer } case "$1" in @@ -95,6 +89,9 @@ case "$1" in "-p" | "--package") package ;; + "-b" | "--build") + build + ;; *) print_help ;;