Skip to content

Commit 6be2ff4

Browse files
committed
add linux installer support
1 parent 143dd2d commit 6be2ff4

3 files changed

Lines changed: 56 additions & 10 deletions

File tree

new-constructor-installer/construct.yaml

Lines changed: 17 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@ name: Osdag
66
version: 2026.02.0.0
77
uninstall_name: ${NAME}
88
company: Osdag, FOSSEE
9-
installer_type: exe
9+
installer_type: exe # [win]
10+
installer_type: sh # [linux]
1011

1112
icon_image: Osdag.ico
1213
welcome_text: |
@@ -15,12 +16,14 @@ welcome_text: |
1516
1617
license_file: ..\license.txt
1718
extra_files:
18-
- post_install.bat
19-
- pre_uninstall.bat
20-
- launch_osdag.vbs
19+
- post_install.bat # [win]
20+
- pre_uninstall.bat # [win]
21+
- launch_osdag.vbs # [win]
22+
- post_install.sh # [linux]
23+
- pre_uninstall.sh # [linux]
2124
- Osdag.ico
22-
- create_shortcuts.ps1
23-
- remove_shortcuts.ps1
25+
- create_shortcuts.ps1 # [win]
26+
- remove_shortcuts.ps1 # [win]
2427

2528

2629

@@ -36,15 +39,19 @@ initialize_conda: false
3639
register_python: false
3740

3841
# Set Default installation location
39-
default_prefix: "%LOCALAPPDATA%\\Osdag"
40-
default_prefix_all_users: "%ProgramData%\\Osdag"
42+
default_prefix: "%LOCALAPPDATA%\\Osdag" # [win]
43+
default_prefix_all_users: "%ProgramData%\\Osdag" # [win]
44+
default_prefix: "$HOME/Osdag" # [linux]
45+
# default_prefix_all_users: "/opt/Osdag" # [linux]
4146

4247
# if package conda recipe include has Menu\ then use for shortcut creation
4348
# menu_packages:
4449
# - osdag
4550

46-
post_install: post_install.bat
47-
pre_uninstall: pre_uninstall.bat
51+
post_install: post_install.bat # [win]
52+
pre_uninstall: pre_uninstall.bat # [win]
53+
post_install: post_install.sh # [linux]
54+
pre_uninstall: pre_uninstall.sh # [linux]
4855

4956
post_install_desc: |
5057
This will create shortcuts for Osdag and add it to the start menu. You can also launch Osdag from the desktop shortcut.(Recommended)
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
#!/usr/bin/env bash
2+
3+
set -e
4+
5+
APP_NAME="Osdag"
6+
INSTALL_DIR="$PREFIX"
7+
8+
DESKTOP_FILE="$HOME/.local/share/applications/osdag.desktop"
9+
ICON_FILE="$INSTALL_DIR/Osdag.ico"
10+
LAUNCHER="$INSTALL_DIR/Scripts/osdag"
11+
12+
echo "Creating application launcher..."
13+
14+
mkdir -p "$HOME/.local/share/applications"
15+
16+
cat <<EOF > "$DESKTOP_FILE"
17+
[Desktop Entry]
18+
Name=Osdag
19+
Exec=$LAUNCHER
20+
Icon=$ICON_FILE
21+
Type=Application
22+
Categories=Engineering;
23+
Terminal=false
24+
EOF
25+
26+
chmod +x "$DESKTOP_FILE"
27+
28+
echo "Launcher created at:"
29+
echo "$DESKTOP_FILE"
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
#!/usr/bin/env bash
2+
3+
APP_NAME="Osdag"
4+
5+
echo "Removing Osdag shortcuts..."
6+
7+
rm -f "$HOME/.local/share/applications/osdag.desktop" 2>/dev/null
8+
rm -f "$HOME/Desktop/Osdag.desktop" 2>/dev/null
9+
10+
echo "Cleanup complete."

0 commit comments

Comments
 (0)