Skip to content

Commit

Permalink
initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
herzhenr committed Jun 9, 2023
0 parents commit af9e620
Show file tree
Hide file tree
Showing 117 changed files with 6,272 additions and 0 deletions.
37 changes: 37 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Lint & Test

on:
push:
branches: [ '**' ]
pull_request:
branches: [ '**' ]

jobs:
dart-lint:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- uses: subosito/flutter-action@v2
with:
flutter-version: '3.7.5'
channel: 'stable'
cache: true
- run: flutter --version

- name: Install dependencies
run: dart pub get

- name: Generate App Localizations
run: |
flutter clean
flutter gen-l10n
- name: Get dependencies again after code-gen
run: flutter pub get

- name: Verify formatting
run: dart format --output=none --set-exit-if-changed .

- name: Analyze project source
run: dart analyze --fatal-infos
47 changes: 47 additions & 0 deletions .github/workflows/release-android.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: Build Android
on:
push:
tags:
- 'v[0-9]+.[0-9]+.[0-9]+'

workflow_dispatch:

jobs:
release-android:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-java@v3
with:
distribution: 'zulu'
java-version: "12.x"
cache: 'gradle'
- uses: subosito/flutter-action@v2
with:
flutter-version: "3.7.5"
channel: 'stable'
cache: true
- name: Decode Keystore
env:
KEY_JKS: ${{ secrets.KEY_JKS }}
run: echo $KEY_JKS | base64 -di > android/key.jks
- name: Get dependencies
run: flutter pub get
- name: Build Flutter (App Bundle)
env:
KEY_PASSWORD: ${{ secrets.ALIAS_PASSWORD }}
ALIAS_PASSWORD: ${{ secrets.KEY_PASSWORD }}
run: flutter build appbundle --release
- name: Build Flutter (APK)
env:
KEY_PASSWORD: ${{ secrets.ALIAS_PASSWORD }}
ALIAS_PASSWORD: ${{ secrets.KEY_PASSWORD }}
run: flutter build apk --release
- uses: actions/upload-artifact@v3
with:
name: Android App Bundle
path: build/app/outputs/bundle/release
- uses: actions/upload-artifact@v3
with:
name: Android APK
path: build/app/outputs/flutter-apk
71 changes: 71 additions & 0 deletions .github/workflows/release-ios.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
name: Build iOS
on:
push:
tags:
- 'v[0-9]+.[0-9]+.[0-9]+'

workflow_dispatch:

jobs:
release-ios:
runs-on: macos-latest
steps:
# Checks-out our repository under $GITHUB_WORKSPACE, so our job can access it
- name: Checkout repository
uses: actions/checkout@v3

# Install the Apple certificate and provisioning profile
- name: Install Apple certificate and provisioning profile
env:
BUILD_CERTIFICATE_BASE64: ${{ secrets.APPSTORE_CERT_BASE64 }}
P12_PASSWORD: ${{ secrets.APPSTORE_CERT_PASSWORD }}
BUILD_PROVISION_PROFILE_BASE64: ${{ secrets.MOBILEPROVISION_BASE64 }}
KEYCHAIN_PASSWORD: ${{ secrets.KEYCHAIN_PASSWORD }}
run: |
# create variables
CERTIFICATE_PATH=$RUNNER_TEMP/build_certificate.p12
PP_PATH=$RUNNER_TEMP/build_pp.mobileprovision
KEYCHAIN_PATH=$RUNNER_TEMP/app-signing.keychain-db
# import certificate and provisioning profile from secrets
echo -n "$BUILD_CERTIFICATE_BASE64" | base64 --decode --output $CERTIFICATE_PATH
echo -n "$BUILD_PROVISION_PROFILE_BASE64" | base64 --decode --output $PP_PATH
# create temporary keychain
security create-keychain -p "$KEYCHAIN_PASSWORD" $KEYCHAIN_PATH
security set-keychain-settings -lut 21600 $KEYCHAIN_PATH
security unlock-keychain -p "$KEYCHAIN_PASSWORD" $KEYCHAIN_PATH
# import certificate to keychain
security import $CERTIFICATE_PATH -P "$P12_PASSWORD" -A -t cert -f pkcs12 -k $KEYCHAIN_PATH
security list-keychain -d user -s $KEYCHAIN_PATH
# apply provisioning profile
mkdir -p ~/Library/MobileDevice/Provisioning\ Profiles
cp $PP_PATH ~/Library/MobileDevice/Provisioning\ Profiles
# Install flutter
- name: Get Flutter
uses: subosito/flutter-action@v2
with:
flutter-version: "3.7.5"
channel: 'stable'
cache: true
- name: Get dependencies
run: flutter pub get
# Build and sign the ipa using a single flutter command
- name: Building IPA
run: flutter build ipa --release --export-options-plist=ios/ExportOptions.plist
# - name: Build Flutter
# run: flutter build ios --release --no-codesign
# Collect the file and upload as artifact
- name: Upload Artifacts
uses: actions/upload-artifact@v3
with:
name: ios
# path: "build/ios/iphoneos/*.app"
# Path to the release files
path: build/ios/ipa

# Important! Cleanup: remove the certificate and provisioning profile from the runner!
- name: Clean up keychain and provisioning profile
if: ${{ always() }}
run: |
security delete-keychain $RUNNER_TEMP/app-signing.keychain-db
rm ~/Library/MobileDevice/Provisioning\ Profiles/build_pp.mobileprovision
44 changes: 44 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
# Miscellaneous
*.class
*.log
*.pyc
*.swp
.DS_Store
.atom/
.buildlog/
.history
.svn/
migrate_working_dir/

# IntelliJ related
*.iml
*.ipr
*.iws
.idea/

# The .vscode folder contains launch configuration and tasks you configure in
# VS Code which you may wish to be included in version control, so this line
# is commented out by default.
#.vscode/

# Flutter/Dart/Pub related
**/doc/api/
**/ios/Flutter/.last_build_id
.dart_tool/
.flutter-plugins
.flutter-plugins-dependencies
.packages
.pub-cache/
.pub/
/build/

# Symbolication related
app.*.symbols

# Obfuscation related
app.*.map.json

# Android Studio will place build artifacts here
/android/app/debug
/android/app/profile
/android/app/release
33 changes: 33 additions & 0 deletions .metadata
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# This file tracks properties of this Flutter project.
# Used by Flutter tool to assess capabilities and perform upgrades etc.
#
# This file should be version controlled.

version:
revision: c07f7888888435fd9df505aa2efc38d3cf65681b
channel: stable

project_type: app

# Tracks metadata for the flutter migrate command
migration:
platforms:
- platform: root
create_revision: c07f7888888435fd9df505aa2efc38d3cf65681b
base_revision: c07f7888888435fd9df505aa2efc38d3cf65681b
- platform: android
create_revision: c07f7888888435fd9df505aa2efc38d3cf65681b
base_revision: c07f7888888435fd9df505aa2efc38d3cf65681b
- platform: ios
create_revision: c07f7888888435fd9df505aa2efc38d3cf65681b
base_revision: c07f7888888435fd9df505aa2efc38d3cf65681b

# User provided section

# List of Local paths (relative to this file) that should be
# ignored by the migrate tool.
#
# Files that are not part of the templates will be ignored by default.
unmanaged_files:
- 'lib/main.dart'
- 'ios/Runner.xcodeproj/project.pbxproj'
19 changes: 19 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
Copyright (c) 2023 Henrik Herzig

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
110 changes: 110 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,110 @@
<img src="docs/icon.png" width="96" align="right" alt=""/>

# SimpleWoL - Simple Wake on Lan

<!-- <a href="https://github.com/herzhenr/simple-wake-on-lan/actions/workflows/release-android.yml/badge.svg?branch=main"><img src="https://github.com/herzhenr/simple-wake-on-lan/actions/workflows/release-android.yml"></a>
<a href="https://github.com/herzhenr/simple-wake-on-lan/actions/workflows/release-ios.yml/badge.svg?branch=main"><img src="https://github.com/herzhenr/simple-wake-on-lan/actions/workflows/release-ios.yml"></a> -->

<p float="center">
<a href="https://opensource.org/licenses/MIT"><img src="https://img.shields.io/badge/License-MIT-green.svg" alt="MIT License"></a>
<a href="https://flutter.dev"><img src="https://img.shields.io/badge/Flutter-%2302569B.svg?logo=Flutter&logoColor=white" alt="Flutter"></a>
<a href="https://www.dart.dev"><img src="https://img.shields.io/badge/Dart-%230175C2.svg?logo=dart&logoColor=white" alt="Dart"></a>
<a href="https://play.google.com/store/apps/details?id=com.henrikherzig.simplewol"><img src="https://img.shields.io/badge/Google_Play-414141?logo=google-play&logoColor=white" alt="Google Play"></a>
<a href="https://apps.apple.com/de/app/simple-wake-on-lan/id"><img src="https://img.shields.io/badge/App_Store-0D96F6?logo=app-store&logoColor=white" alt="App Store"></a>
<a href="https://github.com/herzhenr/simple-wake-on-lan/actions/workflows/lint.yml"><img src="https://github.com/herzhenr/simple-wake-on-lan/actions/workflows/lint.yml/badge.svg?branch=main" alt="Workflow Lint"></a>
<a href="https://github.com/herzhenr/simple-wake-on-lan"><img src="https://img.shields.io/github/release/herzhenr/spic-android.svg?logo=github&color=blue" alt="GitHub Release"></a>
</p>

Simple Wake on Lan is a simple cross-platform flutter application for Android and iOS to send Wake On Lan packets to a
device.

<p align="center">
<a href="https://play.google.com/store/apps/details?id=com.henrikherzig.simplewol"><img src="docs/googlePlay.png" style="height: 60px;" alt="Get it on Google Play"></a>
&nbsp &nbsp
<a href="https://apps.apple.com/de/app/simple-wake-on-lan/id"><img src="docs/appStore.svg" style="height: 60px;" alt="Download on the App Store"></a>
</p>

## Usage
Wake on LAN (WoL) is a network protocol that allows a device to be turned on or awakened remotely
over a network while it is sleeping. This project aims to make the process of waking devices easy with a mobile application.

<!--- by including features like automatic device discovery so the user does not have to enter details of a device they want to wake up manually, a simple interface to send the Wake On Lan packets and the possibility to export and import the user data as a `json` file. -->

## Screenshots


| | |
|:----------------------------------------:|:-----------------------------------:|
| ![play_integrity](docs/screenshot-1.png) | ![dark_mode](docs/screenshot-2.png) |

| | |
|:----------------------------------:|:-------------------------------:|
| ![settings](docs/screenshot-3.png) | ![about](docs/screenshot-4.png) |

## Features

- Automatic device discovery
- Simple interface to send Wake On Lan packets
- Export and import user data as a `json` file (see below)


The app stores the added devices in a `json` file which can be exported and imported within the app UI. An example of the file structure is shown below:
```json
[
{
"id": "6b353440-d183-11ed-964b-69a9facd6cfd",
"hostName": "Raspberry Pi",
"ipAddress": "192.168.1.9",
"macAddress": "12:12:12:12:12:12",
"wolPort": 9,
"deviceType": "computer",
"modified": "2023-04-14T14:17:45.974511"
},
{
"id": "87c87ab0-d184-13ed-9d56-a5f550305985",
"hostName": "Printer",
"ipAddress": "192.168.1.10",
"macAddress": "f0:f0:f0:f0:f0:f0",
"wolPort": 9,
"deviceType": "printer",
"modified": "2023-04-14T14:18:14.997081"
}
]
```

## Download

- You can download the latest version of the app from [GitHub Releases]()
- Download from the [PlayStore](https://play.google.com/store/apps/details?)
- Download from the [App Store](https://apps.apple.com/de/app/)

## Architecture
The app is built using the [Flutter](https://flutter.dev/) framework. It uses the [Material 3](https://m3.material.io) design system from Google.

## Build
To build the app yourself, you need to have the Flutter SDK installed. You can find the installation instructions [here](https://flutter.dev/docs/get-started/install).

## License
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details

```License
Copyright (c) 2023 Henrik Herzig
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
```
5 changes: 5 additions & 0 deletions TODOS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
- [ ] Appearance
- [x] Theme (System, Light, Dark)
- [ ] Color Palette (Auto (Material You on Android) or different color palettes)
- [ ] Version Notes
- [ ] Contact / About Developer Info
Loading

0 comments on commit af9e620

Please sign in to comment.