Skip to content

Commit

Permalink
Will now do things pure Go instead of running commands (#115)
Browse files Browse the repository at this point in the history
* Will now do things pure Go instead of running commands
*If it's working*

* Automatically resolve symlink's for thumbnail
Try to prefil some desktop entry information from the appimage's desktop file

* Initial commit for seperated library.

* Simplifed GoAppImage
Removed code that's only valuable to appimaged
Used goto statements to help with command fallback.

* More work on the goappimage library.
Will now try to parse the desktop file at creation and get the AppImage's name from it
ExtractFile can now (for type 2 with a working reader) resolve symlinks
Added the ability to get the icon (a bit half baked right now though)
Changed getFSTime to ModTime to be consistent with os.File.

* Expirementing with using a library for type 1

* A bit more work on ExtractFileReader

* Working on archiverReader type

* Gave up on archiveReader
Implemented symlink resolution for type 1 AppImages.

* Re-implemented archiveReader.
Still need to make it work with the main library though.

* Maybe finished with the library?
archiveReader should work properly for both type1 and type2
Mainly just need to test everything right now.

* Fixed some issues

* Initial integration of goappimage into appimaged

* Possible fix

* Messing around to get TravisCI to work

* Fixed broken build due to a library

* Trying to figure out why travisCI isn't building

* Trying to figure out why TravisCI for otiai10/copy

* Laid the foundation for command fallback for type2
Reverted some changes I made to debug TravisCI failing

* Added some fallback for type 2
Changed to CalebQ42/copy temporarily

* Some work on type2 command fallback.

* Finished command backup for type 2
All file handling is done through archivereader so things can be much cleaner.
Cleaned up thumbnail getting
Changed back to otiai10/copy

* Updated to newest sqashfs to fix issues.
Fixed some issues with thumbnails and desktop files
  • Loading branch information
CalebQ42 authored Dec 27, 2020
1 parent 63c5c54 commit fb78712
Show file tree
Hide file tree
Showing 17 changed files with 1,244 additions and 435 deletions.
26 changes: 13 additions & 13 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,35 +3,35 @@ module github.com/probonopd/go-appimage
go 1.13

require (
github.com/CalebQ42/copy v1.4.1
github.com/CalebQ42/squashfs v0.3.6
github.com/StackExchange/wmi v0.0.0-20190523213315-cbe66965904d // indirect
github.com/acobaugh/osrelease v0.0.0-20181218015638-a93a0a55a249
github.com/adrg/xdg v0.2.1
github.com/adrg/xdg v0.2.3
github.com/alokmenghrajani/gpgeez v0.0.0-20161206084504-1a06f1c582f9
github.com/coreos/go-systemd/v22 v22.0.0
github.com/eclipse/paho.mqtt.golang v1.2.0
github.com/coreos/go-systemd/v22 v22.1.0
github.com/eclipse/paho.mqtt.golang v1.3.0
github.com/esiqveland/notify v0.9.1
github.com/go-ole/go-ole v1.2.4 // indirect
github.com/godbus/dbus/v5 v5.0.3
github.com/google/go-github v17.0.0+incompatible
github.com/grandcat/zeroconf v1.0.0
github.com/h2non/go-is-svg v0.0.0-20160927212452-35e8c4b0612c
github.com/hashicorp/go-version v1.2.0
github.com/otiai10/copy v1.4.1
github.com/probonopd/go-zsyncmake v0.0.0-20181008012426-5db478ac2be7
github.com/prometheus/procfs v0.0.10
github.com/prometheus/procfs v0.2.0
github.com/rjeczalik/notify v0.9.2
github.com/sabhiram/png-embed v0.0.0-20180421025336-149afe9a3ccb
github.com/sabhiram/pngr v0.0.0-20180419043407-2df49b015d4b // indirect
github.com/shirou/gopsutil v2.20.2+incompatible
github.com/shuheiktgw/go-travis v0.2.4
github.com/smartystreets/goconvey v1.6.4 // indirect
github.com/shirou/gopsutil v3.20.11+incompatible
github.com/shuheiktgw/go-travis v0.3.1
github.com/srwiley/oksvg v0.0.0-20200311192757-870daf9aa564
github.com/srwiley/rasterx v0.0.0-20200120212402-85cb7272f5e9
github.com/urfave/cli/v2 v2.2.0
github.com/urfave/cli/v2 v2.3.0
go.lsp.dev/uri v0.3.0
golang.org/x/crypto v0.0.0-20200311171314-f7b00557c8c4
golang.org/x/image v0.0.0-20200119044424-58c23975cae1 // indirect
golang.org/x/sys v0.0.0-20200302150141-5c8b2ff67527
gopkg.in/ini.v1 v1.55.0
golang.org/x/crypto v0.0.0-20201221181555-eec23a3978ad
golang.org/x/image v0.0.0-20201208152932-35266b937fa6 // indirect
golang.org/x/sys v0.0.0-20201221093633-bc327ba9c2f0
gopkg.in/ini.v1 v1.62.0
gopkg.in/src-d/go-git.v4 v4.13.1
)
94 changes: 69 additions & 25 deletions go.sum

Large diffs are not rendered by default.

5 changes: 2 additions & 3 deletions internal/helpers/helpers.go
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ func AddHereToPath() {
// FilesWithSuffixInDirectoryRecursive returns the files in a given directory with the given filename extension, and err
func FilesWithSuffixInDirectoryRecursive(directory string, extension string) []string {
var foundfiles []string
err := filepath.Walk(directory, func(path string, info os.FileInfo, err error) error {
err := filepath.Walk(directory, func(path string, info os.FileInfo, _ error) error {
if strings.HasSuffix(info.Name(), extension) {
foundfiles = append(foundfiles, path)
}
Expand Down Expand Up @@ -158,13 +158,12 @@ func CheckIfFileExists(filepath string) bool {
return true
}


// CheckIfFileOrFolderExists checks if a file exists and is not a directory before we
// try using it to prevent further errors.
// Returns true if it does, false otherwise.
func CheckIfFileOrFolderExists(filepath string) bool {
_, err := os.Stat(filepath)
if os.IsNotExist(err){
if os.IsNotExist(err) {
return false
}
return true
Expand Down
Loading

0 comments on commit fb78712

Please sign in to comment.