diff --git a/.gitignore b/.gitignore index 986dbf3..ecab367 100644 --- a/.gitignore +++ b/.gitignore @@ -10,4 +10,5 @@ generate_stylesheets.sh .flatpak/ .potrans .editorconfig -oldpng/ \ No newline at end of file +oldpng/ +deploy/ diff --git a/README.md b/README.md index 983b21c..37cc9ad 100644 --- a/README.md +++ b/README.md @@ -37,6 +37,8 @@ flatpak run io.github.ellie_commons.jorts --preferences Theres none. The app closes on its own when no window is open. Doesn't make sense to use resources if unused. +If you want to quit everything at once, use Ctrl+Q + ### Where close note diff --git a/data/meson.build b/data/meson.build index b7ea5a3..98b65f4 100644 --- a/data/meson.build +++ b/data/meson.build @@ -5,48 +5,53 @@ install_data ( rename: meson.project_name() + '.gschema.xml' ) -#======== Internationalization ======== -#Translate and install our .desktop file -i18n.merge_file( - input: 'jorts.desktop.in', - output: meson.project_name() + '.desktop', - po_dir: meson.project_source_root() / 'po' / 'extra', - type: 'desktop', - install: true, - install_dir: get_option('datadir') / 'applications' -) +# metainfo confuses windows, and icons are +if not windows_build -#Translate and install our .metainfo file -i18n.merge_file( - input: 'jorts.metainfo.xml.in', - output: meson.project_name() + '.metainfo.xml', - po_dir: meson.project_source_root() / 'po' / 'extra', - install: true, - install_dir: get_option('datadir') / 'metainfo' -) + #======== Internationalization ======== + #Translate and install our .desktop file + i18n.merge_file( + input: 'jorts.desktop.in', + output: meson.project_name() + '.desktop', + po_dir: meson.project_source_root() / 'po' / 'extra', + type: 'desktop', + install: true, + install_dir: get_option('datadir') / 'applications' + ) + #======== Metainfo ======== + #Translate and install our .metainfo file + i18n.merge_file( + input: 'jorts.metainfo.xml.in', + output: meson.project_name() + '.metainfo.xml', + po_dir: meson.project_source_root() / 'po' / 'extra', + install: true, + install_dir: get_option('datadir') / 'metainfo' + ) -#======== ICONS ======== + #======== ICONS ======== + # Install our icons in all the required sizes + # "variant" variable has been declared earlier in the base meson + icon_sizes = ['16', '24', '32', '48', '64', '128'] -# Install our icons in all the required sizes -# "variant" variable has been declared earlier in the base meson -icon_sizes = ['16', '24', '32', '48', '64', '128'] + foreach i : icon_sizes + install_data( + 'icons' / variant / 'hicolor' / i + '.png', + install_dir: get_option('datadir') / 'icons' / 'hicolor' / i + 'x' + i / 'apps', + rename: meson.project_name() + '.png' + ) + install_data( + 'icons' / variant / 'hicolor@2' / i + '@2.png', + install_dir: get_option('datadir') / 'icons' / 'hicolor' / i + 'x' + i + '@2' / 'apps', + rename: meson.project_name() + '.png' + ) + endforeach -foreach i : icon_sizes install_data( - 'icons' / variant / 'hicolor' / i + '.png', - install_dir: get_option('datadir') / 'icons' / 'hicolor' / i + 'x' + i / 'apps', - rename: meson.project_name() + '.png' + 'icons' / variant / 'scalable.svg', + install_dir: get_option('datadir') / 'icons' / 'scalable' / 'apps', + rename: meson.project_name() + '.svg' ) - install_data( - 'icons' / variant / 'hicolor@2' / i + '@2.png', - install_dir: get_option('datadir') / 'icons' / 'hicolor' / i + 'x' + i + '@2' / 'apps', - rename: meson.project_name() + '.png' - ) -endforeach -install_data( - 'icons' / variant / 'scalable.svg', - install_dir: get_option('datadir') / 'icons' / 'scalable' / 'apps', - rename: meson.project_name() + '.svg' -) \ No newline at end of file +endif + diff --git a/meson.build b/meson.build index 382145b..0fdc75f 100644 --- a/meson.build +++ b/meson.build @@ -8,6 +8,12 @@ i18n = import('i18n') add_global_arguments('-DGETTEXT_PACKAGE="@0@"'.format (meson.project_name()), language:'c') +if build_machine.system() == 'windows' + windows_build = true +else + windows_build = false +endif + vala_flags = [] variant = get_option('variant')[0] @@ -20,9 +26,17 @@ else vala_flags = ['--define', 'DEFAULT'] endif -add_project_arguments(vala_flags, language: 'vala') + +if windows_build + vala_flags += ['--define', 'WINDOWS'] +endif + + + +add_project_arguments(vala_flags, language: 'vala') + #================================ # Import the stylesheet @@ -49,10 +63,16 @@ dependencies = [ dependency('json-glib-1.0'), dependency('gee-0.8'), dependency('gtk4'), - dependency('libportal') ] +if windows_build + dependencies += dependency('gio-windows-2.0') + ico_src = import('windows').compile_resources('windows/icons/ico.rc') +else + dependencies += dependency('gio-unix-2.0') + dependencies += dependency('libportal') +endif #================================ diff --git a/src/Services/Storage.vala b/src/Services/Storage.vala index aa6e9db..ffbcad2 100644 --- a/src/Services/Storage.vala +++ b/src/Services/Storage.vala @@ -30,7 +30,14 @@ public class Jorts.Storage : Object { /*************************************************/ construct { + +#if WINDOWS + // In Windows we arent in a sandbox, so we need to have some courtesy and not dump in the allfolder + data_directory = GLib.Path.build_path("/", Environment.get_user_data_dir (), "io.github.ellie_commons.jorts"); +#else data_directory = Environment.get_user_data_dir (); +#endif + storage_path = data_directory + "/" + FILENAME; check_if_stash (); } diff --git a/src/Views/PreferencesView.vala b/src/Views/PreferencesView.vala index 0ce699b..f4e33f1 100644 --- a/src/Views/PreferencesView.vala +++ b/src/Views/PreferencesView.vala @@ -84,6 +84,7 @@ /****************************************************/ /* Autostart Request */ /****************************************************/ +#if !WINDOWS Xdp.Portal portal = new Xdp.Portal (); GenericArray cmd = new GenericArray (); @@ -148,7 +149,7 @@ autostart_box.append (autostart_label); autostart_box.append (both_buttons); settingsbox.append (autostart_box); - +#endif /*************************************************/ // Bar at the bottom var actionbar = new Gtk.CenterBox () { diff --git a/src/Windows/StickyNoteWindow.vala b/src/Windows/StickyNoteWindow.vala index 844e791..2ee4533 100644 --- a/src/Windows/StickyNoteWindow.vala +++ b/src/Windows/StickyNoteWindow.vala @@ -149,7 +149,7 @@ public class Jorts.StickyNoteWindow : Gtk.ApplicationWindow { * This is more for the Aesthetic */ private void delayed_show () { - Timeout.add_once (750, () => { + Timeout.add_once (250, () => { Application.gsettings.bind ( "hide-bar", view.actionbar.actionbar, diff --git a/src/meson.build b/src/meson.build index 1a98e85..18d3a1d 100644 --- a/src/meson.build +++ b/src/meson.build @@ -5,7 +5,6 @@ sources = files ( 'Utils' / 'ZoomConvert.vala', 'Utils' / 'Random.vala', - 'Utils' / 'Libportal.vala', 'Services' / 'Constants.vala', 'Services' / 'Storage.vala', @@ -31,13 +30,22 @@ sources = files ( 'Application.vala', ) +if windows_build + sources += ico_src +else + sources += files('Utils' / 'Libportal.vala') +endif + #================================ # Let's define our executable +# win_subsystem doesnt seem to bother standard builds + executable( meson.project_name(), gresource, config_file, sources, dependencies: dependencies, + win_subsystem: 'windows', install : true ) diff --git a/windows/Jorts-Installer.exe b/windows/Jorts-Installer.exe new file mode 100644 index 0000000..bfecc75 Binary files /dev/null and b/windows/Jorts-Installer.exe differ diff --git a/windows/Jorts-Installer.nsi b/windows/Jorts-Installer.nsi new file mode 100644 index 0000000..af5adbe --- /dev/null +++ b/windows/Jorts-Installer.nsi @@ -0,0 +1,140 @@ +!include "MUI2.nsh" +!include WinMessages.nsh + +Name Jorts + +Outfile "Jorts-Installer.exe" +InstallDir "$LOCALAPPDATA\Programs\Jorts" + +# RequestExecutionLevel admin ; Request administrative privileges +RequestExecutionLevel user + +# Set the title of the installer window +Caption "Jorts Installer" + +# Set the title and text on the welcome page +!define MUI_WELCOMEPAGE_TITLE "Welcome to Jorts setup" +!define MUI_WELCOMEPAGE_TEXT "This bitch will guide you through the installation of Jorts." +!define MUI_INSTFILESPAGE_TEXT "Please wait while Jorts is being installed." +!define MUI_ICON "icons\install.ico" +!define MUI_UNICON "icons\uninstall.ico" +!define MUI_FINISHPAGE_RUN "$SMPROGRAMS\Startup\Jorts.lnk" + +!insertmacro MUI_PAGE_WELCOME +!insertmacro MUI_PAGE_DIRECTORY +!insertmacro MUI_PAGE_INSTFILES +!insertmacro MUI_PAGE_FINISH +!insertmacro MUI_UNPAGE_CONFIRM +!insertmacro MUI_UNPAGE_INSTFILES +!insertmacro MUI_UNPAGE_FINISH + +!insertmacro MUI_LANGUAGE "English" + +!macro GetCleanDir INPUTDIR + ; ATTENTION: USE ON YOUR OWN RISK! + ; Please report bugs here: http://stefan.bertels.org/ + !define Index_GetCleanDir 'GetCleanDir_Line${__LINE__}' + Push $R0 + Push $R1 + StrCpy $R0 "${INPUTDIR}" + StrCmp $R0 "" ${Index_GetCleanDir}-finish + StrCpy $R1 "$R0" "" -1 + StrCmp "$R1" "\" ${Index_GetCleanDir}-finish + StrCpy $R0 "$R0\" +${Index_GetCleanDir}-finish: + Pop $R1 + Exch $R0 + !undef Index_GetCleanDir +!macroend + +; ################################################################ +; similar to "RMDIR /r DIRECTORY", but does not remove DIRECTORY itself +; example: !insertmacro RemoveFilesAndSubDirs "$INSTDIR" +!macro RemoveFilesAndSubDirs DIRECTORY + ; ATTENTION: USE ON YOUR OWN RISK! + ; Please report bugs here: http://stefan.bertels.org/ + !define Index_RemoveFilesAndSubDirs 'RemoveFilesAndSubDirs_${__LINE__}' + + Push $R0 + Push $R1 + Push $R2 + + !insertmacro GetCleanDir "${DIRECTORY}" + Pop $R2 + FindFirst $R0 $R1 "$R2*.*" +${Index_RemoveFilesAndSubDirs}-loop: + StrCmp $R1 "" ${Index_RemoveFilesAndSubDirs}-done + StrCmp $R1 "." ${Index_RemoveFilesAndSubDirs}-next + StrCmp $R1 ".." ${Index_RemoveFilesAndSubDirs}-next + IfFileExists "$R2$R1\*.*" ${Index_RemoveFilesAndSubDirs}-directory + ; file + Delete "$R2$R1" + goto ${Index_RemoveFilesAndSubDirs}-next +${Index_RemoveFilesAndSubDirs}-directory: + ; directory + RMDir /r "$R2$R1" +${Index_RemoveFilesAndSubDirs}-next: + FindNext $R0 $R1 + Goto ${Index_RemoveFilesAndSubDirs}-loop +${Index_RemoveFilesAndSubDirs}-done: + FindClose $R0 + + Pop $R2 + Pop $R1 + Pop $R0 + !undef Index_RemoveFilesAndSubDirs +!macroend + +Section "Install" + SetOutPath "$INSTDIR" + File /r "deploy\*" + CreateDirectory $SMPROGRAMS\Jorts + + ; fonts. We install to local fonts to not trip up admin rights, and register for local user + SetOutPath "$LOCALAPPDATA\Microsoft\Windows\Fonts" + File "fonts\RedactedScript-Regular.ttf" + WriteRegStr HKCU "Software\Microsoft\Windows NT\CurrentVersion\Fonts" "Redacted Script Regular (TrueType)" "$LOCALAPPDATA\Microsoft\Windows\Fonts\RedactedScript-Regular.ttf" + ; SendMessage 0 0 /TIMEOUT=5000 + + ; Start menu + CreateShortCut "$SMPROGRAMS\Jorts\Jorts.lnk" "$INSTDIR\bin\io.github.ellie_commons.jorts.exe" "" "$INSTDIR\icons\icon-mini.ico" 0 + + ; Autostart + CreateShortCut "$SMPROGRAMS\Startup\Jorts.lnk" "$INSTDIR\bin\io.github.ellie_commons.jorts.exe" "" "$INSTDIR\icons\icon-mini.ico" 0 + + ; Preferences + CreateShortCut "$SMPROGRAMS\Jorts\Preferences of Jorts.lnk" "$INSTDIR\bin\io.github.ellie_commons.jorts.exe" "--preferences" "$INSTDIR\icons\settings-mini.ico" 0 + + WriteRegStr HKCU "Software\Jorts" "" $INSTDIR + WriteUninstaller "$INSTDIR\Uninstall.exe" + + ; Add to Add/Remove programs list + WriteRegStr HKCU "Software\Microsoft\Windows\CurrentVersion\Uninstall\Jorts" "DisplayName" "Jorts" + WriteRegStr HKCU "Software\Microsoft\Windows\CurrentVersion\Uninstall\Jorts" "UninstallString" "$INSTDIR\Uninstall.exe" + WriteRegStr HKCU "Software\Microsoft\Windows\CurrentVersion\Uninstall\Jorts" "InstallLocation" "$INSTDIR\" + WriteRegStr HKCU "Software\Microsoft\Windows\CurrentVersion\Uninstall\Jorts" "Publisher" "Ellie-Commons" +SectionEnd + +Section "Uninstall" + + ; Remove Start Menu shortcut + Delete "$SMPROGRAMS\Jorts\Jorts.lnk" + Delete "$SMPROGRAMS\Jorts\Preferences of Jorts.lnk" + Delete "$SMPROGRAMS\Startup\Jorts.lnk" + + ; Remove uninstaller + Delete "$INSTDIR\Uninstall.exe" + + ; Remove files and folders + !insertmacro RemoveFilesAndSubDirs "$INSTDIR" + + ; Remove directories used + RMDir $SMPROGRAMS\Jorts + RMDir "$INSTDIR" + + ; Remove registry keys + DeleteRegKey HKCU "Software\Jorts" + DeleteRegKey HKCU "Software\Microsoft\Windows\CurrentVersion\Uninstall\Jorts" + +SectionEnd + diff --git a/windows/deploy.sh b/windows/deploy.sh new file mode 100644 index 0000000..63b109d --- /dev/null +++ b/windows/deploy.sh @@ -0,0 +1,243 @@ +#!/bin/bash + +# Variables +# Run app from base directory, not ./windows +# Write path UNIX-style ("/"). Script will invert the slash where relevant. +app_name="Jorts" +build_dir="builddir" +theme_name="io.elementary.stylesheet.blueberry" + +deploy_dir="windows/deploy" +exe_name="io.github.ellie_commons.jorts.exe" + +# Rebuild the exe as a release build +rm -rfd ${build_dir} +meson setup --buildtype release ${build_dir} +ninja -C ${build_dir} + +# Copy DLLS +echo "Copying DLLs..." +mkdir -p "${deploy_dir}" +mkdir -p "${deploy_dir}/bin" +mkdir -p "${deploy_dir}/etc" +mkdir -p "${deploy_dir}/share" +mkdir -p "${deploy_dir}/lib" +mkdir -p "${deploy_dir}/include" +cp "${build_dir}/src/${exe_name}" "${deploy_dir}/bin" +cp -r "windows/icons" "${deploy_dir}" + +dlls=$(ldd "${deploy_dir}/bin/${exe_name}" | grep "/mingw64" | awk '{print $3}') + +for dll in $dlls +do + cp "$dll" "${deploy_dir}/bin" +done + +# You wouldnt believe how much pain it was to figure out these three lines +cp -rnv /mingw64/bin/rsvg-convert.exe ${deploy_dir}/bin/ +cp -rnv /mingw64/bin/librsvg-2-2.dll ${deploy_dir}/bin/ +cp -rnv /mingw64/bin/libxml2-16.dll ${deploy_dir}/bin/ +# I beg you, everytime you see your apps icons show up, think of the pain it took and the sacrifices made + + +# Copy other required things for Gtk to work nicely +echo "Copying other necessary files..." +cp -nv /mingw64/bin/gdbus.exe ${deploy_dir}/bin/ +cp -rnv /mingw64/etc/fonts ${deploy_dir}/etc/ +cp -rnv /mingw64/share/glib-2.0 ${deploy_dir}/share/ +cp -rnv /mingw64/share/gtk-4.0 ${deploy_dir}/share/ +cp -rnv /mingw64/share/locale ${deploy_dir}/share/ +cp -rnv /mingw64/share/themes/ ${deploy_dir}/share/ +cp -rnv /mingw64/share/gettext/ ${deploy_dir}/share/ +cp -rnv /mingw64/share/fontconfig/ ${deploy_dir}/share/ +cp -rnv /mingw64/share/GConf/ ${deploy_dir}/share/ +cp -rnv /mingw64/lib/gettext/ ${deploy_dir}/lib/ + +# We need this to properly display icons +cp -rnv /mingw64/include/librsvg-2.0 ${deploy_dir}/include/ +cp -rnv /mingw64/lib/gdk-pixbuf-2.0/ ${deploy_dir}/lib/ +#export GDK_PIXBUF_MODULEDIR=lib/gdk-pixbuf-2.0/2.10.0/loaders +#gdk-pixbuf-query-loaders > ${deploy_dir}/lib/gdk-pixbuf-2.0/2.10.0/loaders.cache + +# Make sure this one is actually copied +cat windows/loaders.cache > ${deploy_dir}/lib/gdk-pixbuf-2.0/2.10.0/loaders.cache + +# Ive tried, and failed, to pull only needed icons +#cp -rnv /mingw64/share/icons/ ${deploy_dir}/share/ + +# Only what we need +mkdir -pv ${deploy_dir}/share/icons/elementary +cp -rnv /mingw64/share/icons/elementary/actions* ${deploy_dir}/share/icons/elementary/ +cp -rnv /mingw64/share/icons/elementary/status* ${deploy_dir}/share/icons/elementary/ +cp -rnv /mingw64/share/icons/elementary/emotes* ${deploy_dir}/share/icons/elementary/ +cp -rnv /mingw64/share/icons/elementary/index.theme ${deploy_dir}/share/icons/elementary/ +gtk4-update-icon-cache.exe -f ${deploy_dir}/share/icons/elementary/ + + + + +# Write the theme to gtk settings +mkdir -v ${deploy_dir}/etc/gtk-4.0/ +cat << EOF > ${deploy_dir}/etc/gtk-4.0/settings.ini +[Settings] +gtk-theme-name=${theme_name} +gtk-icon-theme-name=elementary +gtk-xft-antialias=1 +gtk-xft-hinting=1 +gtk-xft-hintstyle=hintful +gtk-xft-rgba=rgb +EOF + +#glib-compile-schemas ${deploy_dir}/share/glib-2.0/schemas + +#================================================================ +# Create NSIS script +echo "Creating NSIS script..." +cat << EOF > windows/${app_name}-Installer.nsi +!include "MUI2.nsh" +!include WinMessages.nsh + +Name ${app_name} + +Outfile "${app_name}-Installer.exe" +InstallDir "\$LOCALAPPDATA\\Programs\\${app_name}" + +# RequestExecutionLevel admin ; Request administrative privileges +RequestExecutionLevel user + +# Set the title of the installer window +Caption "${app_name} Installer" + +# Set the title and text on the welcome page +!define MUI_WELCOMEPAGE_TITLE "Welcome to ${app_name} setup" +!define MUI_WELCOMEPAGE_TEXT "This bitch will guide you through the installation of ${app_name}." +!define MUI_INSTFILESPAGE_TEXT "Please wait while ${app_name} is being installed." +!define MUI_ICON "icons\install.ico" +!define MUI_UNICON "icons\uninstall.ico" +!define MUI_FINISHPAGE_RUN "\$SMPROGRAMS\Startup\Jorts.lnk" + +!insertmacro MUI_PAGE_WELCOME +!insertmacro MUI_PAGE_DIRECTORY +!insertmacro MUI_PAGE_INSTFILES +!insertmacro MUI_PAGE_FINISH +!insertmacro MUI_UNPAGE_CONFIRM +!insertmacro MUI_UNPAGE_INSTFILES +!insertmacro MUI_UNPAGE_FINISH + +!insertmacro MUI_LANGUAGE "English" + +!macro GetCleanDir INPUTDIR + ; ATTENTION: USE ON YOUR OWN RISK! + ; Please report bugs here: http://stefan.bertels.org/ + !define Index_GetCleanDir 'GetCleanDir_Line\${__LINE__}' + Push \$R0 + Push \$R1 + StrCpy \$R0 "\${INPUTDIR}" + StrCmp \$R0 "" \${Index_GetCleanDir}-finish + StrCpy \$R1 "\$R0" "" -1 + StrCmp "\$R1" "\" \${Index_GetCleanDir}-finish + StrCpy \$R0 "\$R0\" +\${Index_GetCleanDir}-finish: + Pop \$R1 + Exch \$R0 + !undef Index_GetCleanDir +!macroend + +; ################################################################ +; similar to "RMDIR /r DIRECTORY", but does not remove DIRECTORY itself +; example: !insertmacro RemoveFilesAndSubDirs "\$INSTDIR" +!macro RemoveFilesAndSubDirs DIRECTORY + ; ATTENTION: USE ON YOUR OWN RISK! + ; Please report bugs here: http://stefan.bertels.org/ + !define Index_RemoveFilesAndSubDirs 'RemoveFilesAndSubDirs_\${__LINE__}' + + Push \$R0 + Push \$R1 + Push \$R2 + + !insertmacro GetCleanDir "\${DIRECTORY}" + Pop \$R2 + FindFirst \$R0 \$R1 "\$R2*.*" +\${Index_RemoveFilesAndSubDirs}-loop: + StrCmp \$R1 "" \${Index_RemoveFilesAndSubDirs}-done + StrCmp \$R1 "." \${Index_RemoveFilesAndSubDirs}-next + StrCmp \$R1 ".." \${Index_RemoveFilesAndSubDirs}-next + IfFileExists "\$R2\$R1\*.*" \${Index_RemoveFilesAndSubDirs}-directory + ; file + Delete "\$R2\$R1" + goto \${Index_RemoveFilesAndSubDirs}-next +\${Index_RemoveFilesAndSubDirs}-directory: + ; directory + RMDir /r "\$R2\$R1" +\${Index_RemoveFilesAndSubDirs}-next: + FindNext \$R0 \$R1 + Goto \${Index_RemoveFilesAndSubDirs}-loop +\${Index_RemoveFilesAndSubDirs}-done: + FindClose \$R0 + + Pop \$R2 + Pop \$R1 + Pop \$R0 + !undef Index_RemoveFilesAndSubDirs +!macroend + +Section "Install" + SetOutPath "\$INSTDIR" + File /r "deploy\\*" + CreateDirectory \$SMPROGRAMS\\${app_name} + + ; fonts. We install to local fonts to not trip up admin rights, and register for local user + SetOutPath "\$LOCALAPPDATA\\Microsoft\\Windows\\Fonts" + File "fonts\\RedactedScript-Regular.ttf" + WriteRegStr HKCU "Software\\Microsoft\\Windows NT\\CurrentVersion\\Fonts" "Redacted Script Regular (TrueType)" "\$LOCALAPPDATA\\Microsoft\\Windows\\Fonts\\RedactedScript-Regular.ttf" + ; SendMessage ${HWND_BROADCAST} ${WM_FONTCHANGE} 0 0 /TIMEOUT=5000 + + ; Start menu + CreateShortCut "\$SMPROGRAMS\\${app_name}\\${app_name}.lnk" "\$INSTDIR\bin\\${exe_name}" "" "\$INSTDIR\\icons\\icon-mini.ico" 0 + + ; Autostart + CreateShortCut "\$SMPROGRAMS\\Startup\\${app_name}.lnk" "\$INSTDIR\bin\\${exe_name}" "" "\$INSTDIR\\icons\\icon-mini.ico" 0 + + ; Preferences + CreateShortCut "\$SMPROGRAMS\\${app_name}\\Preferences of ${app_name}.lnk" "\$INSTDIR\bin\\${exe_name}" "--preferences" "\$INSTDIR\\icons\\settings-mini.ico" 0 + + WriteRegStr HKCU "Software\\${app_name}" "" \$INSTDIR + WriteUninstaller "\$INSTDIR\Uninstall.exe" + + ; Add to Add/Remove programs list + WriteRegStr HKCU "Software\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\${app_name}" "DisplayName" "${app_name}" + WriteRegStr HKCU "Software\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\${app_name}" "UninstallString" "\$INSTDIR\\Uninstall.exe" + WriteRegStr HKCU "Software\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\${app_name}" "InstallLocation" "\$INSTDIR\\" + WriteRegStr HKCU "Software\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\${app_name}" "Publisher" "Ellie-Commons" +SectionEnd + +Section "Uninstall" + + ; Remove Start Menu shortcut + Delete "\$SMPROGRAMS\\${app_name}\\${app_name}.lnk" + Delete "\$SMPROGRAMS\\${app_name}\\Preferences of ${app_name}.lnk" + Delete "\$SMPROGRAMS\\Startup\\${app_name}.lnk" + + ; Remove uninstaller + Delete "\$INSTDIR\Uninstall.exe" + + ; Remove files and folders + !insertmacro RemoveFilesAndSubDirs "\$INSTDIR" + + ; Remove directories used + RMDir \$SMPROGRAMS\\${app_name} + RMDir "\$INSTDIR" + + ; Remove registry keys + DeleteRegKey HKCU "Software\\${app_name}" + DeleteRegKey HKCU "Software\Microsoft\Windows\CurrentVersion\Uninstall\\${app_name}" + +SectionEnd + +EOF + +echo "Running NSIS..." +makensis windows/${app_name}-Installer.nsi + +echo "Done" + diff --git a/windows/fonts/RedactedScript-Regular.ttf b/windows/fonts/RedactedScript-Regular.ttf new file mode 100644 index 0000000..71c5f7e Binary files /dev/null and b/windows/fonts/RedactedScript-Regular.ttf differ diff --git a/windows/icons/ico.rc b/windows/icons/ico.rc new file mode 100644 index 0000000..842dcde --- /dev/null +++ b/windows/icons/ico.rc @@ -0,0 +1 @@ +0 ICON "icon.ico" \ No newline at end of file diff --git a/windows/icons/icon-mini.ico b/windows/icons/icon-mini.ico new file mode 100644 index 0000000..75944fe Binary files /dev/null and b/windows/icons/icon-mini.ico differ diff --git a/windows/icons/icon.ico b/windows/icons/icon.ico new file mode 100644 index 0000000..90af4f3 Binary files /dev/null and b/windows/icons/icon.ico differ diff --git a/windows/icons/install.ico b/windows/icons/install.ico new file mode 100644 index 0000000..8c79ad3 Binary files /dev/null and b/windows/icons/install.ico differ diff --git a/windows/icons/settings-mini.ico b/windows/icons/settings-mini.ico new file mode 100644 index 0000000..35e56d5 Binary files /dev/null and b/windows/icons/settings-mini.ico differ diff --git a/windows/icons/settings.ico b/windows/icons/settings.ico new file mode 100644 index 0000000..54d2534 Binary files /dev/null and b/windows/icons/settings.ico differ diff --git a/windows/icons/uninstall.ico b/windows/icons/uninstall.ico new file mode 100644 index 0000000..ca719ba Binary files /dev/null and b/windows/icons/uninstall.ico differ diff --git a/windows/loaders.cache b/windows/loaders.cache new file mode 100644 index 0000000..87978ce --- /dev/null +++ b/windows/loaders.cache @@ -0,0 +1,119 @@ +# GdkPixbuf Image Loader Modules file +# Automatically generated file, do not edit +# Created by gdk-pixbuf-query-loaders from gdk-pixbuf-2.42.12 +# +# LoaderDir = lib\gdk-pixbuf-2.0\2.10.0\loaders +# +"lib\\gdk-pixbuf-2.0\\2.10.0\\loaders\\libpixbufloader-ani.dll" +"ani" 4 "gdk-pixbuf" "Windows animated cursor" "LGPL" +"application/x-navi-animation" "" +"ani" "" +"RIFF ACON" " xxxx " 100 + +"lib\\gdk-pixbuf-2.0\\2.10.0\\loaders\\libpixbufloader-avif.dll" +"avif" 5 "gdk-pixbuf" "AV1 Image File Format" "BSD" +"image/avif" "" +"avif" "" +" ftypavif" "zzz " 100 + +"lib\\gdk-pixbuf-2.0\\2.10.0\\loaders\\libpixbufloader-bmp.dll" +"bmp" 5 "gdk-pixbuf" "BMP" "LGPL" +"image/bmp" "image/x-bmp" "image/x-MS-bmp" "" +"bmp" "" +"BM" "" 100 + +"lib\\gdk-pixbuf-2.0\\2.10.0\\loaders\\libpixbufloader-gif.dll" +"gif" 4 "gdk-pixbuf" "GIF" "LGPL" +"image/gif" "" +"gif" "" +"GIF8" "" 100 + +"lib\\gdk-pixbuf-2.0\\2.10.0\\loaders\\libpixbufloader-heif.dll" +"heif/avif" 4 "pixbufloader-heif" "HEIF/AVIF Image" "LGPL3" +"image/heif" "image/heic" "image/avif" "" +"heif" "heic" "avif" "" +" ftyp" "xxxx " 100 + +"lib\\gdk-pixbuf-2.0\\2.10.0\\loaders\\libpixbufloader-icns.dll" +"icns" 4 "gdk-pixbuf" "MacOS X icon" "GPL" +"image/x-icns" "" +"icns" "" +"icns" "" 100 + +"lib\\gdk-pixbuf-2.0\\2.10.0\\loaders\\libpixbufloader-ico.dll" +"ico" 5 "gdk-pixbuf" "Windows icon" "LGPL" +"image/x-icon" "image/x-ico" "image/x-win-bitmap" "image/vnd.microsoft.icon" "application/ico" "image/ico" "image/icon" "text/ico" "" +"ico" "cur" "" +" \001 " "zz znz" 100 +" \002 " "zz znz" 100 + +"lib\\gdk-pixbuf-2.0\\2.10.0\\loaders\\libpixbufloader-jpeg.dll" +"jpeg" 5 "gdk-pixbuf" "JPEG" "LGPL" +"image/jpeg" "" +"jpeg" "jpe" "jpg" "" +"\377\330" "" 100 + +"lib\\gdk-pixbuf-2.0\\2.10.0\\loaders\\libpixbufloader-png.dll" +"png" 5 "gdk-pixbuf" "PNG" "LGPL" +"image/png" "" +"png" "" +"\211PNG\r\n\032\n" "" 100 + +"lib\\gdk-pixbuf-2.0\\2.10.0\\loaders\\libpixbufloader-pnm.dll" +"pnm" 4 "gdk-pixbuf" "PNM/PBM/PGM/PPM" "LGPL" +"image/x-portable-anymap" "image/x-portable-bitmap" "image/x-portable-graymap" "image/x-portable-pixmap" "" +"pnm" "pbm" "pgm" "ppm" "" +"P1" "" 100 +"P2" "" 100 +"P3" "" 100 +"P4" "" 100 +"P5" "" 100 +"P6" "" 100 + +"lib\\gdk-pixbuf-2.0\\2.10.0\\loaders\\libpixbufloader-qtif.dll" +"qtif" 4 "gdk-pixbuf" "QuickTime" "LGPL" +"image/x-quicktime" "image/qtif" "" +"qtif" "qif" "" +"abcdidsc" "xxxx " 100 +"abcdidat" "xxxx " 100 + +"lib\\gdk-pixbuf-2.0\\2.10.0\\loaders\\libpixbufloader-tga.dll" +"tga" 4 "gdk-pixbuf" "Targa" "LGPL" +"image/x-tga" "" +"tga" "targa" "" +" \001\001" "x " 100 +" \001\t" "x " 100 +" \002" "xz " 99 +" \003" "xz " 100 +" \n" "xz " 100 +" \v" "xz " 100 + +"lib\\gdk-pixbuf-2.0\\2.10.0\\loaders\\libpixbufloader-tiff.dll" +"tiff" 5 "gdk-pixbuf" "TIFF" "LGPL" +"image/tiff" "" +"tiff" "tif" "" +"MM *" " z " 100 +"II* " " z" 100 +"II* \020 CR\002 " " z zzz z" 0 + +"lib\\gdk-pixbuf-2.0\\2.10.0\\loaders\\libpixbufloader-xbm.dll" +"xbm" 4 "gdk-pixbuf" "XBM" "LGPL" +"image/x-xbitmap" "" +"xbm" "" +"#define " "" 100 +"/*" "" 50 + +"lib\\gdk-pixbuf-2.0\\2.10.0\\loaders\\libpixbufloader-xpm.dll" +"xpm" 4 "gdk-pixbuf" "XPM" "LGPL" +"image/x-xpixmap" "" +"xpm" "" +"/* XPM */" "" 100 + +"lib\\gdk-pixbuf-2.0\\2.10.0\\loaders\\pixbufloader_svg.dll" +"svg" 6 "gdk-pixbuf" "Scalable Vector Graphics" "LGPL" +"image/svg+xml" "image/svg" "image/svg-xml" "image/vnd.adobe.svg+xml" "text/xml-svg" "image/svg+xml-compressed" "" +"svg" "svgz" "svg.gz" "" +" + + + + + + + image/svg+xml + + + + + + diff --git a/windows/svg/edit-delete-symbolic.svg b/windows/svg/edit-delete-symbolic.svg new file mode 100644 index 0000000..8f771dd --- /dev/null +++ b/windows/svg/edit-delete-symbolic.svg @@ -0,0 +1,30 @@ + + + + + + image/svg+xml + + + + + + + + diff --git a/windows/svg/list-add-symbolic.svg b/windows/svg/list-add-symbolic.svg new file mode 100644 index 0000000..1e88c93 --- /dev/null +++ b/windows/svg/list-add-symbolic.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/windows/svg/open-menu-symbolic.svg b/windows/svg/open-menu-symbolic.svg new file mode 100644 index 0000000..af692b1 --- /dev/null +++ b/windows/svg/open-menu-symbolic.svg @@ -0,0 +1,30 @@ + + + + + + image/svg+xml + + + + + + + + diff --git a/windows/svg/zoom-in-symbolic.svg b/windows/svg/zoom-in-symbolic.svg new file mode 100644 index 0000000..45dce38 --- /dev/null +++ b/windows/svg/zoom-in-symbolic.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/windows/svg/zoom-out-symbolic.svg b/windows/svg/zoom-out-symbolic.svg new file mode 100644 index 0000000..cb0b043 --- /dev/null +++ b/windows/svg/zoom-out-symbolic.svg @@ -0,0 +1,6 @@ + + + + + +