Skip to content

Commit d8c8ab6

Browse files
committed
now plainimg adds itself into the registry if checkbox is pressed
1 parent 5cf5f25 commit d8c8ab6

File tree

5 files changed

+29
-12
lines changed

5 files changed

+29
-12
lines changed

.gitignore

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
#archive/
22
.vscode/
3-
build/
3+
build/
4+
archive/

README.md

+13-5
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,11 @@ _///// as simple as it gets for an image viewer /////_
44

55
# usage
66

7-
- install the installer from the latest release
8-
- run it and it'll also add itself to the start menu and context menus (Open with plainIMG)
9-
- now that it is installed, you can right click over an image, select "Choose another app", "Choose an App on your PC", and find the plainIMG executable at `C:\Users\<your user>\AppData\Local\plainIMG\`, select the executable and click "Always".
7+
- install the installer from the latest release.
8+
- run it and it will install the app, and also add plainIMG to start menu. if you click the "Set plainIMG as the default image viewer" option, jpg, jpeg, png and bmp file extensions will be associated with plainIMG.
9+
- now that it is installed, you can open an image, select plainIMG and click "Always".
1010
- alternatively, you can go to settings, default apps, and set common image formats to plainIMG.
11-
- when you are done, you can use plainIMG by using the context menu button in an image
11+
- when you are done, you can use plainIMG by clicking on the image (or using "Choose an App on your PC")
1212
- or by running the executable and opening the picture with `Right Click > Open Image...` (or just letter `O`)
1313
- or by running it through the terminal with first argument being the file path
1414
- or by dragging a picture over the executable
@@ -36,6 +36,7 @@ to support the developer, you can appreciate the project by giving it a star in
3636
- quit the app by closing the window, pressing `Q` or `ESCAPE`.
3737
- the link to this github repository is located inside the `About` menu.
3838
- WARNING: as of now, this project is only available on Windows. if this project gets enough attention, i will make a version for macOS and possibly even Linux.
39+
- note: when you click the "Set plainIMG as the default image viewer" option in the installer, it automatically sets plainIMG as default for: .jpg, .jpeg, .png and .bmp; if you want to extend this list, update file extension defaults yourself in windows settings.
3940

4041
# screenshots
4142

@@ -89,7 +90,13 @@ for SDL3_image, there is a special case. copy over the entire SDL folder, where
8990
then run SDL3_image build with `cmake .. -DBUILD-SHARED-LIBS=OFF`, then do `cmake --build .`.
9091
you would also need to use `git submodule update --init --recursive` in SDL image.
9192

92-
you need inno setup installed to build for release, and it should be in the PATH. to build for release, run `./release.sh <version>`. it will create `build/release`. then, after you made sure that all of the artifacts work, tag the release with `./tag_release.sh <version>`. push it with `git push origin tag <version>`, and then make your release in github. the versions should be in the format of "vX.X.X". **BE SURE TO MANUALLY UPDATE THE VERSION NUMBER IN INSTALLER.ISS BEFORE RUNNING RELEASE.SH**
93+
if you want to make changes, then make your changes in `dev` branch, and sync them to main with `./sync.sh`.
94+
when you want to release, switch to `main`.
95+
96+
you need inno setup installed to build for release, and it should be in the PATH.
97+
when you want to build a new release, edit `VERSION.txt` with the version format being `vX.X.X`.
98+
to build all the things for release, run `./release.sh`. it will create `build/release`, where `build/release/upload` is the things you would need to upload to github release.
99+
mark your release with `./tag_release.sh`. it will automatically push it. **make sure that you correctly specify the version, and it's not a duplicate**
93100

94101
# todo list
95102

@@ -104,3 +111,4 @@ you need inno setup installed to build for release, and it should be in the PATH
104111
- [ ] fix the client area dragging being a bit choppy
105112
- [x] add a global VERSION.txt file which will be used everywhere (main.c, installer.iss, tag_release.sh etc)
106113
- [ ] add the image basename when an image is opened to the window's title
114+
- [ ] possibly make an .msi installer

VERSION.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
1.1.1
1+
1.2.0

installer.iss

+11-4
Original file line numberDiff line numberDiff line change
@@ -25,13 +25,20 @@ Name: "{userdesktop}\plainIMG"; Filename: "{app}\plainIMG.exe"
2525
Name: "plainimgAsDefaultAssoc"; Description: "Set plainIMG as the default image viewer"; GroupDescription: "File extensions:"; Flags: unchecked
2626

2727
[Registry]
28-
Root: HKCR; Subkey: "*\shell\Open with plainIMG"; ValueType: string; ValueName: ""; ValueData: "Open with plainIMG"; Flags: uninsdeletekey
29-
Root: HKCR; Subkey: "*\shell\Open with plainIMG\command"; ValueType: string; ValueName: ""; ValueData: """{app}\plainIMG.exe"" ""%1"""
28+
Root: HKCR; Subkey: "plainIMG"; ValueType: string; ValueName: ""; ValueData: "plainIMG Image Viewer"; Flags: uninsdeletekey
29+
Root: HKCR; Subkey: "plainIMG\DefaultIcon"; ValueType: string; ValueName: ""; ValueData: """{app}\plainIMG.exe"",0"; Flags: uninsdeletekey
30+
Root: HKCR; Subkey: "plainIMG\shell\open\command"; ValueType: string; ValueName: ""; ValueData: """{app}\plainIMG.exe"" ""%1"""; Flags: uninsdeletekey
31+
3032
Root: HKCR; Subkey: ".jpg"; ValueType: string; ValueName: ""; ValueData: "plainIMG"; Flags: uninsdeletevalue; Tasks: plainimgAsDefaultAssoc
3133
Root: HKCR; Subkey: ".jpeg"; ValueType: string; ValueName: ""; ValueData: "plainIMG"; Flags: uninsdeletevalue; Tasks: plainimgAsDefaultAssoc
3234
Root: HKCR; Subkey: ".png"; ValueType: string; ValueName: ""; ValueData: "plainIMG"; Flags: uninsdeletevalue; Tasks: plainimgAsDefaultAssoc
33-
Root: HKCR; Subkey: "plainIMG\shell\open\command"; ValueType: string; ValueName: ""; ValueData: """{app}\plainIMG.exe"" ""%1"""; Tasks: plainimgAsDefaultAssoc
35+
Root: HKCR; Subkey: ".bmp"; ValueType: string; ValueName: ""; ValueData: "plainIMG"; Flags: uninsdeletevalue; Tasks: plainimgAsDefaultAssoc
36+
; Root: HKCR; Subkey: ".tiff"; ValueType: string; ValueName: ""; ValueData: "plainIMG"; Flags: uninsdeletevalue; Tasks: plainimgAsDefaultAssoc
37+
38+
; Root: HKCR; Subkey: "*\shell\Open with plainIMG"; ValueType: string; ValueName: ""; ValueData: "Open with plainIMG"; Flags: uninsdeletekey
39+
; Root: HKCR; Subkey: "*\shell\Open with plainIMG\command"; ValueType: string; ValueName: ""; ValueData: """{app}\plainIMG.exe"" ""%1"""
40+
; Root: HKCR; Subkey: "plainIMG\shell\open\command"; ValueType: string; ValueName: ""; ValueData: """{app}\plainIMG.exe"" ""%1"""; Tasks: plainimgAsDefaultAssoc
3441
; Root: HKCR; Subkey: "plainIMG\shell\open\command"; ValueType: string; ValueName: ""; ValueData: ExpandConstant('"{app}\plainIMG.exe" "%1"'); Flags: uninsdeletekey; Tasks: plainimgAsDefaultAssoc
3542

3643
[Run]
37-
Filename: "{app}\plainIMG.exe"; Description: "Launch plainIMG"; Flags: nowait postinstall
44+
Filename: "{app}\plainIMG.exe"; Description: "Launch plainIMG"; Flags: nowait postinstall unchecked

tag_release.sh

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
plainimg_version=$(cat VERSION.txt)
22
git checkout main
3-
git tag -a "v$plainimg_version" -m "Release v$plainimg_version"
3+
git tag -a "v$plainimg_version" -m "Release v$plainimg_version"
4+
git push origin tag "v$plainimg_version"

0 commit comments

Comments
 (0)