Skip to content

Commit

Permalink
Change most references of "Emulsion" => "Alloy" (#202)
Browse files Browse the repository at this point in the history
  • Loading branch information
DougLau authored Oct 29, 2023
1 parent 9c1843e commit e736d7a
Show file tree
Hide file tree
Showing 20 changed files with 49 additions and 54 deletions.
4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ edition = "2021"
build = "build.rs"

[package.metadata.bundle]
name = "Emulsion"
name = "Alloy"
identifier = "org.ardaku.alloy"
icon = ["resource_dev/emulsion.png"]
icon = ["resource_dev/alloy.png"]
resources = ["LICENSE.txt"]
short_description = "A lightweight and minimalistic image viewer based on emulsion"
copyright = "Copyright (c) 2020 The Emulsion Contributors, Copyright (c) 2022 The Alloy Contributors"
Expand Down
9 changes: 4 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
## Alloy
Image viewer based on (now-discontinued)
[Emulsion](https://arturkovacs.github.io/emulsion-website/).
Image viewer based on (now-discontinued) [Emulsion].

Alloy targets Windows, Mac, and Linux (with more targets to come!).

Expand Down Expand Up @@ -42,9 +41,9 @@ future.
If Alloy closes unexpectedly please locate the `"panic.txt"` file. This file has
a different location depending on the target platform.

- Windows: `%localappdata%\emulsion\data`
- MacOS: `$HOME/Library/Application Support/emulsion`
- Linux: `$XDG_DATA_HOME/emulsion` or `$HOME/.local/share/emulsion`
- Windows: `%localappdata%\alloy\data`
- MacOS: `$HOME/Library/Application Support/alloy`
- Linux: `$XDG_DATA_HOME/alloy` or `$HOME/.local/share/alloy`

When posting a bug report please upload the contents of this file to GitHub.
If you deem it too large just paste the last panic entry between the rows of
Expand Down
4 changes: 2 additions & 2 deletions build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ use std::{env, fs, path::Path};
#[cfg(windows)]
fn platform_specific() {
let mut res = winres::WindowsResource::new();
res.set("FileDescription", "Emulsion");
res.set_icon("resource_dev/emulsion.ico");
res.set("FileDescription", "Alloy");
res.set_icon("resource_dev/alloy.ico");
res.compile().unwrap();
}

Expand Down
1 change: 0 additions & 1 deletion distribution/macos/background.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion distribution/macos/create_dmg.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
#!/bin/sh
create-dmg --dmg-title='Emulsion.dmg' target/release/bundle/osx/Emulsion.app
create-dmg --dmg-title='Alloy.dmg' target/release/bundle/osx/Alloy.app
exit 0
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@ Unicode True

; VERSION is defined through a command line argument to the maker
; for example:
; makensis.exe /DVERSION=9.0 emulsion.nsi
; makensis.exe /DVERSION=9.0 alloy.nsi

!define PROGRAM_NAME "Emulsion"
!define REG_PROG_PATH "SOFTWARE\Emulsion"
!define REG_UNINST_PATH "Software\Microsoft\Windows\CurrentVersion\Uninstall\Emulsion"
!define PROGRAM_NAME "Alloy"
!define REG_PROG_PATH "SOFTWARE\Alloy"
!define REG_UNINST_PATH "Software\Microsoft\Windows\CurrentVersion\Uninstall\Alloy"
!define MULTIUSER_INSTALLMODE_INSTDIR "${PROGRAM_NAME}"
!define MULTIUSER_INSTALLMODE_INSTDIR_REGISTRY_KEY "${REG_PROG_PATH}"
!define MULTIUSER_EXECUTIONLEVEL Highest
Expand All @@ -31,11 +31,11 @@ Unicode True
;General

;Name and file
Name "Emulsion"
OutFile "Emulsion-Installer.exe"
Name "Alloy"
OutFile "Alloy-Installer.exe"

;Default installation folder
;InstallDir "$LOCALAPPDATA\Emulsion"
;InstallDir "$LOCALAPPDATA\Alloy"

;Get installation folder from registry if available
;InstallDirRegKey SHCTX "${REG_PROG_PATH}" ""
Expand All @@ -48,7 +48,7 @@ Unicode True
;Interface Settings

!define MUI_ABORTWARNING
!define MUI_ICON "emulsion.ico"
!define MUI_ICON "alloy.ico"
!define MUI_HEADERIMAGE
;!define MUI_HEADERIMAGE_BITMAP
!define MUI_HEADERIMAGE_BITMAP "empty.bmp"
Expand Down Expand Up @@ -86,7 +86,7 @@ Function un.onInit
FunctionEnd


!macro EmulsionRegisterExtension ExtensionName Description
!macro AlloyRegisterExtension ExtensionName Description
; First, let's create the ProgID for the extension
; For more information about what is being done here, see
; "Default Programs"
Expand All @@ -99,14 +99,14 @@ FunctionEnd
WriteRegStr SHCTX "${REG_PROG_PATH}\Capabilities\FileAssociations" ".${ExtensionName}" "${GENERIC_PROG_ID}"
!macroend

; !macro EmulsionUnregisterExtension ExtensionName Description
; !macro AlloyUnregisterExtension ExtensionName Description
; ${UnRegisterExtension} ".${ExtensionName}" "${Description}"
; !macroend

;--------------------------------
;Installer Sections

Section "Emulsion" SecEmulsion
Section "Alloy" SecAlloy
SectionIn RO

SetOutPath "$INSTDIR"
Expand All @@ -123,34 +123,34 @@ Section "Emulsion" SecEmulsion
WriteRegStr SHCTX "${REG_PROG_PATH}" "Install Directory" "$INSTDIR"

WriteRegStr SHCTX "${REG_UNINST_PATH}" "DisplayName" "${PROGRAM_NAME}"
WriteRegStr SHCTX "${REG_UNINST_PATH}" "DisplayIcon" "$\"$INSTDIR\emulsion.exe$\""
WriteRegStr SHCTX "${REG_UNINST_PATH}" "DisplayIcon" "$\"$INSTDIR\alloy.exe$\""
WriteRegStr SHCTX "${REG_UNINST_PATH}" "UninstallString" "$\"$INSTDIR\Uninstall.exe$\" /$MultiUser.InstallMode"
WriteRegStr SHCTX "${REG_UNINST_PATH}" "QuietUninstallString" "$\"$INSTDIR\Uninstall.exe$\" /$MultiUser.InstallMode /S"

;Create uninstaller
WriteUninstaller "$INSTDIR\Uninstall.exe"

; Program description and list of supported extensions
; (This in itself does not associate the extensions to Emulsion)
; (This in itself does not associate the extensions to Alloy)
WriteRegStr SHCTX "${REG_PROG_PATH}\Capabilities" "ApplicationDescription" "A fast and minimalistic image viewer"
WriteRegStr SHCTX "${REG_PROG_PATH}\Capabilities" "ApplicationName" "${PROGRAM_NAME}"

!insertmacro EmulsionRegisterExtension "jpg" "JPG Image"
!insertmacro EmulsionRegisterExtension "jpeg" "JPEG Image"
!insertmacro EmulsionRegisterExtension "png" "PNG Image"
!insertmacro EmulsionRegisterExtension "bmp" "BMP Image"
!insertmacro EmulsionRegisterExtension "gif" "GIF Image"
!insertmacro EmulsionRegisterExtension "tga" "TGA Image"
!insertmacro EmulsionRegisterExtension "avif" "AVIF Image"
!insertmacro EmulsionRegisterExtension "webp" "WEBP Image"
!insertmacro EmulsionRegisterExtension "tif" "TIF Image"
!insertmacro EmulsionRegisterExtension "tiff" "TIFF Image"
!insertmacro EmulsionRegisterExtension "ico" "ICO Image"
!insertmacro EmulsionRegisterExtension "hdr" "HDR Image"
!insertmacro EmulsionRegisterExtension "pbm" "PBM Image"
!insertmacro EmulsionRegisterExtension "pam" "PAM Image"
!insertmacro EmulsionRegisterExtension "ppm" "PPM Image"
!insertmacro EmulsionRegisterExtension "pgm" "PGM Image"
!insertmacro AlloyRegisterExtension "jpg" "JPG Image"
!insertmacro AlloyRegisterExtension "jpeg" "JPEG Image"
!insertmacro AlloyRegisterExtension "png" "PNG Image"
!insertmacro AlloyRegisterExtension "bmp" "BMP Image"
!insertmacro AlloyRegisterExtension "gif" "GIF Image"
!insertmacro AlloyRegisterExtension "tga" "TGA Image"
!insertmacro AlloyRegisterExtension "avif" "AVIF Image"
!insertmacro AlloyRegisterExtension "webp" "WEBP Image"
!insertmacro AlloyRegisterExtension "tif" "TIF Image"
!insertmacro AlloyRegisterExtension "tiff" "TIFF Image"
!insertmacro AlloyRegisterExtension "ico" "ICO Image"
!insertmacro AlloyRegisterExtension "hdr" "HDR Image"
!insertmacro AlloyRegisterExtension "pbm" "PBM Image"
!insertmacro AlloyRegisterExtension "pam" "PAM Image"
!insertmacro AlloyRegisterExtension "ppm" "PPM Image"
!insertmacro AlloyRegisterExtension "pgm" "PGM Image"

WriteRegStr SHCTX "SOFTWARE\RegisteredApplications" "ArturK.${PROGRAM_NAME}.${VERSION}" "${REG_PROG_PATH}\Capabilities"

Expand All @@ -159,7 +159,7 @@ Section "Emulsion" SecEmulsion
!insertmacro UPDATEFILEASSOC
SectionEnd

; These are the programs that are needed by Emulsion.
; These are the programs that are needed by Alloy.
Section -Prerequisites
IfFileExists $SYSDIR\vcruntime140.dll endVsRedist beginVsRedist
Goto endVsRedist
Expand All @@ -173,8 +173,8 @@ SectionEnd
;--------------------------------
;Descriptions
;Language strings
LangString DESC_SecEmulsion ${LANG_ENGLISH} "The program itself."
;LangString DESC_SecAssociate ${LANG_ENGLISH} "Associate jpg, jpeg, png, bmp, gif, tga, avif, webp, tif, tiff, hdr, pbm, pam, ppm, and pgm files with Emulsion"
LangString DESC_SecAlloy ${LANG_ENGLISH} "The program itself."
;LangString DESC_SecAssociate ${LANG_ENGLISH} "Associate jpg, jpeg, png, bmp, gif, tga, avif, webp, tif, tiff, hdr, pbm, pam, ppm, and pgm files with Alloy"

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; These are only relevant when using the MUI_PAGE_COMPONENTS
Expand All @@ -183,7 +183,7 @@ SectionEnd
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;Assign language strings to sections
;!insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN
; !insertmacro MUI_DESCRIPTION_TEXT ${SecEmulsion} $(DESC_SecEmulsion)
; !insertmacro MUI_DESCRIPTION_TEXT ${SecAlloy} $(DESC_SecAlloy)
; !insertmacro MUI_DESCRIPTION_TEXT ${SecAssociate} $(DESC_SecAssociate)
;!insertmacro MUI_FUNCTION_DESCRIPTION_END
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
Expand All @@ -198,7 +198,7 @@ Section Uninstall
; Try to remove the Start Menu folder - this will only happen if it is empty
RMDir "$SMPROGRAMS\${PROGRAM_NAME}"

Delete "$INSTDIR\emulsion.exe"
Delete "$INSTDIR\alloy.exe"
Delete "$INSTDIR\Uninstall.exe"
RMDir "$INSTDIR" ; This is okay, rmdir fails if the directory is not empty.

Expand All @@ -207,6 +207,6 @@ Section Uninstall
DeleteRegKey SHCTX "${REG_UNINST_PATH}"

; Extensions mustn't be unregistered here. They might be associated
; with a program other than Emulsion and removing those would be wrong.
; with a program other than Alloy and removing those would be wrong.

SectionEnd
2 changes: 1 addition & 1 deletion distribution/windows/make-test-installer.bat
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
call update_files.bat
makensis /DVERSION=0.0.0-test-build emulsion.nsi
makensis /DVERSION=0.0.0-test-build alloy.nsi
4 changes: 1 addition & 3 deletions distribution/windows/update_files.bat
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@

@echo off
set "distribution_dir=%cd%"
cd ..\..
cargo build --release

cd %distribution_dir%
mkdir program
copy /y ..\..\target\release\emulsion.exe program\emulsion.exe

copy /y ..\..\target\release\alloy.exe program\alloy.exe
File renamed without changes
Binary file modified resource/usage.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added resource_dev/Usage Panel/Alloy Usage.odt
Binary file not shown.
Binary file removed resource_dev/Usage Panel/Emulsion Usage.odt
Binary file not shown.
2 changes: 1 addition & 1 deletion resource_dev/Usage Panel/HOW TO EDIT.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
The odt uses the Fira Sans and DejaVu sans fonts. These are
provided here, but make sure these are installed on your system
before editing the "Emulsion Usage.odt" file.
before editing the "Alloy Usage.odt" file.
File renamed without changes.
File renamed without changes.
File renamed without changes
3 changes: 1 addition & 2 deletions resource_dev/emulsion.svg → resource_dev/alloy.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,7 @@ fn main() {

fn make_icon() -> Icon {
let img =
image::load_from_memory(include_bytes!("../resource/emulsion48.png"))
image::load_from_memory(include_bytes!("../resource/alloy48.png"))
.unwrap();
let rgba = img.into_rgba8();
let (w, h) = rgba.dimensions();
Expand Down

0 comments on commit e736d7a

Please sign in to comment.