Skip to content

Commit 6c644cb

Browse files
committed
Better deploy
1 parent dbd317c commit 6c644cb

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

43 files changed

+26
-1386
lines changed

windows/deploy.sh

Lines changed: 26 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -9,32 +9,20 @@ theme_name="io.elementary.stylesheet.blueberry"
99

1010
deploy_dir="windows/deploy"
1111
exe_name="io.github.ellie_commons.jorts.exe"
12-
icon_file="jorts.ico"
13-
icon_file_install="install.ico"
14-
icon_file_uninstall="uninstall.ico"
15-
16-
#PRE MESON
17-
#Skip refresh package
18-
#Skip metainfo
19-
2012

2113
# Rebuild the exe as a release build
2214
rm -rfd ${build_dir}
2315
meson setup --buildtype release ${build_dir}
2416
ninja -C ${build_dir}
2517

26-
#POST MESON
27-
#re-add refresh package
28-
#re-add metainfo
29-
3018
# Copy DLLS
3119
echo "Copying DLLs..."
3220
mkdir -p "${deploy_dir}"
3321
mkdir -p "${deploy_dir}/bin"
3422
mkdir -p "${deploy_dir}/etc"
3523
mkdir -p "${deploy_dir}/share"
3624
cp "${build_dir}/src/${exe_name}" "${deploy_dir}/bin"
37-
cp "windows/${icon_file}" "${deploy_dir}"
25+
cp "windows/icons" "${deploy_dir}"
3826

3927
dlls=$(ldd "${deploy_dir}/bin/${exe_name}" | grep "/mingw64" | awk '{print $3}')
4028

@@ -49,13 +37,20 @@ cp -nv /mingw64/bin/gdbus.exe ${deploy_dir}/bin/gdbus.exe
4937
cp -rnv /mingw64/etc/fonts ${deploy_dir}/etc/fonts
5038

5139

52-
cp -rnv /mingw64/lib/gdk-pixbuf-2.0/2.10.0 ${deploy_dir}/lib/gdk-pixbuf-2.0
53-
rm -f ${deploy_dir}/lib/gdk-pixbuf-2.0/loaders.cache
40+
# We need this to properly display icons
41+
cp -rnv /mingw64/lib/gdk-pixbuf-2.0/ ${deploy_dir}/lib/
42+
export GDK_PIXBUF_MODULEDIR=${deploy_dir}/lib/gdk-pixbuf-2.0/2.10.0/loaders
43+
gdk-pixbuf-query-loaders > lib/gdk-pixbuf-2.0/2.10.0/loaders.cache
44+
5445

5546

5647
cp -rnv /mingw64/share/glib-2.0 ${deploy_dir}/share/
5748
cp -rnv /mingw64/share/gtk-4.0 ${deploy_dir}/share/
58-
#cp -rnv windows/icons ${deploy_dir}/share/
49+
cp -rnv /mingw64/share/locale ${deploy_dir}/share/
50+
cp -rnv /mingw64/share/themes/ ${deploy_dir}/share/
51+
cp -rnv /mingw64/share/gettext/ ${deploy_dir}/share/
52+
cp -rnv /mingw64/share/fontconfig/ ${deploy_dir}/share/
53+
cp -rnv /mingw64/share/GConf/ ${deploy_dir}/share/
5954

6055
# Only what we need
6156
mkdir -pv ${deploy_dir}/share/icons/elementary
@@ -65,12 +60,7 @@ cp -rnv /mingw64/share/icons/elementary/emotes* ${deploy_dir}/share/icons/elemen
6560
#cp -rnv /mingw64/share/icons/elementary/ ${deploy_dir}/share/
6661

6762

68-
cp -rnv /mingw64/share/icu ${deploy_dir}/share/
69-
cp -rnv /mingw64/share/locale ${deploy_dir}/share/
70-
cp -rnv /mingw64/share/themes/ ${deploy_dir}/share/
71-
cp -rnv /mingw64/share/gettext/ ${deploy_dir}/share/
72-
cp -rnv /mingw64/share/fontconfig/ ${deploy_dir}/share/
73-
cp -rnv /mingw64/share/GConf/ ${deploy_dir}/share/
63+
7464

7565
# Redacted Script
7666
mkdir -v ${deploy_dir}/share/fonts
@@ -93,6 +83,7 @@ EOF
9383

9484
#glib-compile-schemas ${deploy_dir}/share/glib-2.0/schemas
9585

86+
#================================================================
9687
# Create NSIS script
9788
echo "Creating NSIS script..."
9889
cat << EOF > windows/${app_name}-Installer.nsi
@@ -105,7 +96,7 @@ Name ${app_name}
10596
Outfile "${app_name}-Installer.exe"
10697
InstallDir "\$LOCALAPPDATA\\Programs\\${app_name}"
10798
108-
# RequestExecutionLevel admin ; Request administrative privileges
99+
# RequestExecutionLevel admin ; Request administrative privileges
109100
RequestExecutionLevel user
110101
111102
# Set the title of the installer window
@@ -115,8 +106,8 @@ Caption "${app_name} Installer"
115106
!define MUI_WELCOMEPAGE_TITLE "Welcome to ${app_name} setup"
116107
!define MUI_WELCOMEPAGE_TEXT "This bitch will guide you through the installation of ${app_name}."
117108
!define MUI_INSTFILESPAGE_TEXT "Please wait while ${app_name} is being installed."
118-
!define MUI_ICON "${icon_file_install}"
119-
!define MUI_UNICON "${icon_file_uninstall}"
109+
!define MUI_ICON "icons\install.ico"
110+
!define MUI_UNICON "icons\uninstall.ico"
120111
!define MUI_FINISHPAGE_RUN "$SMPROGRAMS\Startup\Jorts.lnk"
121112
122113
!insertmacro MUI_PAGE_WELCOME
@@ -190,26 +181,28 @@ Section "Install"
190181
CreateDirectory \$SMPROGRAMS\\${app_name}
191182
192183
; fonts
193-
StrCpy $FONT_DIR $FONTS
194-
!insertmacro FontName "\$INSTDIR\\share\\fonts\\RedactedScript-Regular.ttf"
195-
!insertmacro FontName "\$INSTDIR\\share\\fonts\\InterVariable.ttf"
184+
SetOutPath "\$LOCALAPPDATA\\Programs\\Microsoft\\Windows\\Fonts"
185+
File "fonts\\RedactedScript-Regular.ttf"
186+
WriteRegStr HKCU "Software\\Microsoft\\Windows\\Windows NT\\CurrentVersion\\Fonts" "RedactedScript-Regular.ttf (TrueType)" "\$LOCALAPPDATA\\Programs\\Microsoft\\Windows\\Fonts\\RedactedScript-Regular.ttf"
196187
SendMessage ${HWND_BROADCAST} ${WM_FONTCHANGE} 0 0 /TIMEOUT=5000
197188
198189
; Start menu
199-
CreateShortCut "\$SMPROGRAMS\\${app_name}\\${app_name}.lnk" "\$INSTDIR\bin\\${exe_name}" "" "\$INSTDIR\\${icon_file/\//\\}" 0
190+
CreateShortCut "\$SMPROGRAMS\\${app_name}\\${app_name}.lnk" "\$INSTDIR\bin\\${exe_name}" "" "\$INSTDIR\\icons\\icon.ico" 0
200191
201192
; Autostart
202-
CreateShortCut "\$SMPROGRAMS\\Startup\\${app_name}.lnk" "\$INSTDIR\bin\\${exe_name}" "" "\$INSTDIR\\${icon_file/\//\\}" 0
193+
CreateShortCut "\$SMPROGRAMS\\Startup\\${app_name}.lnk" "\$INSTDIR\bin\\${exe_name}" "" "\$INSTDIR\\icons\\icon.ico" 0
203194
204195
; Preferences
205-
CreateShortCut "\$SMPROGRAMS\\${app_name}\\Preferences of ${app_name}.lnk" "\$INSTDIR\bin\\${exe_name}" "--preferences" "\$INSTDIR\\${icon_file/\//\\}" 0
196+
CreateShortCut "\$SMPROGRAMS\\${app_name}\\Preferences of ${app_name}.lnk" "\$INSTDIR\bin\\${exe_name}" "--preferences" "\$INSTDIR\\icons\\settings.ico" 0
206197
207198
WriteRegStr HKCU "Software\\${app_name}" "" \$INSTDIR
208199
WriteUninstaller "\$INSTDIR\Uninstall.exe"
209200
210201
; Add to Add/Remove programs list
211-
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\\${app_name}" "DisplayName" "${app_name}"
212-
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\\${app_name}" "UninstallString" "\$INSTDIR\Uninstall.exe"
202+
WriteRegStr HKLM "Software\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\${app_name}" "DisplayName" "${app_name}"
203+
WriteRegStr HKLM "Software\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\${app_name}" "UninstallString" "\$INSTDIR\\Uninstall.exe"
204+
WriteRegStr HKLM "Software\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\${app_name}" "InstallLocation" "\$INSTDIR\\""
205+
WriteRegStr HKLM "Software\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\${app_name}" "Publisher" "Ellie-Commons"
213206
SectionEnd
214207
215208
Section "Uninstall"

windows/fonts/InterVariable.ttf

-859 KB
Binary file not shown.
-259 Bytes
Binary file not shown.

windows/icons/elementary/actions/symbolic/edit-delete-symbolic.svg

Lines changed: 0 additions & 30 deletions
This file was deleted.
-184 Bytes
Binary file not shown.

windows/icons/elementary/actions/symbolic/list-add-symbolic.svg

Lines changed: 0 additions & 6 deletions
This file was deleted.
-555 Bytes
Binary file not shown.

windows/icons/elementary/actions/symbolic/open-menu-symbolic.svg

Lines changed: 0 additions & 30 deletions
This file was deleted.
-286 Bytes
Binary file not shown.

windows/icons/elementary/actions/symbolic/zoom-in-symbolic.svg

Lines changed: 0 additions & 6 deletions
This file was deleted.

0 commit comments

Comments
 (0)