Skip to content

Commit

Permalink
Adding build process to the linux app
Browse files Browse the repository at this point in the history
  • Loading branch information
jespino committed Oct 29, 2020
1 parent ce77568 commit 4cf814a
Show file tree
Hide file tree
Showing 6 changed files with 22 additions and 3 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -42,3 +42,5 @@ octo*.db
mac/temp
mac/dist
linux/octo-linux-app
linux/dist
linux/temp
17 changes: 16 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
.PHONY: prebuild clean cleanall server server-linux generate watch-server mac
.PHONY: prebuild clean cleanall server server-linux generate watch-server mac linux-app

all: server

Expand Down Expand Up @@ -36,6 +36,9 @@ server-doc:
watch-server:
cd server; modd

webapp:
cd webapp; npm run pack

mac:
rm -rf mac/resources/bin
rm -rf mac/resources/pack
Expand All @@ -46,6 +49,18 @@ mac:
xcodebuild archive -workspace mac/Tasks.xcworkspace -scheme Tasks -archivePath mac/temp/tasks.xcarchive
xcodebuild -exportArchive -archivePath mac/temp/tasks.xcarchive -exportPath mac/dist -exportOptionsPlist mac/export.plist

linux-app: server-linux webapp
rm -rf linux/temp
mkdir -p linux/temp/octo-linux-app/webapp
mkdir -p linux/dist
cp -R bin/octoserver linux/temp/octo-linux-app/
cp -R config.json linux/temp/octo-linux-app/
cp -R webapp/pack linux/temp/octo-linux-app/webapp/pack
cd linux; make build
cp -R linux/octo-linux-app linux/temp/octo-linux-app/
cd linux/temp; tar -zcf ../dist/octo-linux-app.tar.gz octo-linux-app
rm -rf linux/temp

clean:
rm -rf bin
rm -rf dist
Expand Down
1 change: 1 addition & 0 deletions linux/config.json
3 changes: 1 addition & 2 deletions linux/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (
)

func runOctoTasks() {
cmd := exec.Command("./bin/octoserver", "--monitorpid", strconv.FormatInt(int64(os.Getpid()), 10))
cmd := exec.Command("./octoserver", "--monitorpid", strconv.FormatInt(int64(os.Getpid()), 10))
cmd.Stdout = os.Stdout
err := cmd.Run()
if err != nil {
Expand All @@ -20,7 +20,6 @@ func runOctoTasks() {
}

func main() {
os.Chdir("../")
debug := true
w := webview.New(debug)
defer w.Destroy()
Expand Down
1 change: 1 addition & 0 deletions linux/octoserver
1 change: 1 addition & 0 deletions linux/webapp

0 comments on commit 4cf814a

Please sign in to comment.