Skip to content

Commit

Permalink
Merge pull request #66 from AKuHAK/clang
Browse files Browse the repository at this point in the history
Clang
  • Loading branch information
AKuHAK authored Sep 3, 2021
2 parents 74675a0 + fd2ba75 commit 5c5e75c
Show file tree
Hide file tree
Showing 23 changed files with 234 additions and 118 deletions.
97 changes: 67 additions & 30 deletions .clang-format
Original file line number Diff line number Diff line change
@@ -1,79 +1,116 @@
---
Language: Cpp
Language: Cpp
AccessModifierOffset: -4
AlignAfterOpenBracket: Align
AlignConsecutiveAssignments: false
AlignConsecutiveBitFields: AcrossEmptyLinesAndComments
AlignConsecutiveDeclarations: false
AlignEscapedNewlinesLeft: false
AlignOperands: true
AlignConsecutiveMacros: AcrossComments
AlignEscapedNewlines: Left
AlignOperands: Align
AlignTrailingComments: true
AllowAllArgumentsOnNextLine: false
AllowAllConstructorInitializersOnNextLine: true
AllowAllParametersOfDeclarationOnNextLine: true
AllowShortBlocksOnASingleLine: false
AllowShortBlocksOnASingleLine: Empty
AllowShortCaseLabelsOnASingleLine: false
AllowShortEnumsOnASingleLine: true
AllowShortFunctionsOnASingleLine: All
AllowShortIfStatementsOnASingleLine: false
AllowShortIfStatementsOnASingleLine: Never
AllowShortLambdasOnASingleLine: Empty
AllowShortLoopsOnASingleLine: false
AlwaysBreakAfterDefinitionReturnType: None
AlwaysBreakAfterReturnType: None
AlwaysBreakBeforeMultilineStrings: false
AlwaysBreakTemplateDeclarations: true
BinPackArguments: true
BinPackParameters: true
BitFieldColonSpacing: Both
BreakBeforeBraces: Custom
BraceWrapping:
AfterClass: true
AfterCaseLabel: false
AfterClass: true
AfterControlStatement: false
AfterEnum: false
AfterFunction: true
AfterNamespace: true
AfterEnum: false
AfterFunction: true
AfterNamespace: true
AfterObjCDeclaration: false
AfterStruct: true
AfterUnion: true
BeforeCatch: false
BeforeElse: false
IndentBraces: false
AfterStruct: true
AfterUnion: true
AfterExternBlock: false
BeforeCatch: false
BeforeElse: false
BeforeLambdaBody: false
BeforeWhile: false
IndentBraces: false
SplitEmptyFunction: true
SplitEmptyRecord: true
SplitEmptyNamespace: true
BreakBeforeBinaryOperators: None
BreakBeforeBraces: Custom
BreakBeforeConceptDeclarations: true
BreakBeforeTernaryOperators: false
BreakConstructorInitializersBeforeComma: true
ColumnLimit: 0
CommentPragmas: '^ (IWYU pragma:|NOLINT)'
BreakConstructorInitializers: BeforeComma
BreakStringLiterals: true
ColumnLimit: 0
CommentPragmas: "^ (IWYU pragma:|NOLINT)"
ConstructorInitializerAllOnOneLineOrOnePerLine: false
ConstructorInitializerIndentWidth: 4
ContinuationIndentWidth: 4
Cpp11BracedListStyle: true
DeriveLineEnding: true
DerivePointerAlignment: false
DisableFormat: false
ForEachMacros: []
DisableFormat: false
EmptyLineBeforeAccessModifier: LogicalBlock
FixNamespaceComments: true
ForEachMacros: []
IncludeBlocks: Preserve
IndentExternBlock: NoIndent
IndentCaseBlocks: false
IndentCaseLabels: true
IndentWidth: 4
IndentGotoLabels: true
IndentWidth: 4
IndentWrappedFunctionNames: false
KeepEmptyLinesAtTheStartOfBlocks: true
MacroBlockBegin: ''
MacroBlockEnd: ''
MacroBlockBegin: ""
MacroBlockEnd: ""
MaxEmptyLinesToKeep: 3
NamespaceIndentation: None
ObjCBlockIndentWidth: 2
ObjCSpaceAfterProperty: false
ObjCSpaceBeforeProtocolList: true
PenaltyBreakAssignment: 80
PenaltyBreakBeforeFirstCallParameter: 19
PenaltyBreakComment: 300
PenaltyBreakFirstLessLess: 120
PenaltyBreakString: 1000
PenaltyBreakTemplateDeclaration: 80
PenaltyExcessCharacter: 1000000
PenaltyIndentedWhitespace: 80
PenaltyReturnTypeOnItsOwnLine: 60
PointerAlignment: Right
ReflowComments: true
SortIncludes: false
# uncomment below when clang >=13 will be out
# IndentPPDirectives: AfterHash
# PPIndentWidth: 1
ReflowComments: true
SortIncludes: false
SpaceAfterCStyleCast: false
SpaceAfterLogicalNot: false
SpaceAroundPointerQualifiers: Default
SpaceBeforeAssignmentOperators: true
SpaceBeforeCaseColon: false
SpaceBeforeCpp11BracedList: true
SpaceBeforeInheritanceColon: false
SpaceBeforeParens: ControlStatements
SpaceBeforeRangeBasedForLoopColon: true
SpaceBeforeSquareBrackets: false
SpaceInEmptyBlock: false
SpaceInEmptyParentheses: false
SpacesBeforeTrailingComments: 2
SpacesInAngles: false
SpacesInAngles: false
SpacesInConditionalStatement: false
SpacesInContainerLiterals: true
SpacesInCStyleCastParentheses: false
SpacesInParentheses: false
SpacesInSquareBrackets: false
Standard: Cpp11
TabWidth: 4
UseTab: ForIndentation
Standard: Cpp11
TabWidth: 4
UseTab: Never
4 changes: 4 additions & 0 deletions .clang-format-ignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# ignore files with non-unicode symbols
./jpgviewer.c
./draw.c
./makeicon.c
25 changes: 25 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# EditorConfig: http://EditorConfig.org

# Top-most EditorConfig file
root = true

# Unix-style newlines with a newline ending every file
[*]
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true
charset = utf-8

# 4 space indentation
[*.{c,h,js,css,html}]
indent_style = space
indent_size = 4

# 2 space indentation
[*.{json,xml,yaml,yml}]
indent_style = space
indent_size = 2

# Tab indentation
[Makefile*, .make, linkfile]
indent_style = tab
17 changes: 17 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Auto detect text files and perform LF normalization
* text=auto

# Custom for Visual Studio
*.cs diff=csharp

# Standard to msysgit
*.doc diff=astextplain
*.DOC diff=astextplain
*.docx diff=astextplain
*.DOCX diff=astextplain
*.dot diff=astextplain
*.DOT diff=astextplain
*.pdf diff=astextplain
*.PDF diff=astextplain
*.rtf diff=astextplain
*.RTF diff=astextplain
29 changes: 17 additions & 12 deletions .github/workflows/check-format.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,26 @@ name: CI-format-check

on:
push:
paths:
- "**.h"
- "**.c"
- ".github/workflows/check-format.yml"
- ".clang-format"
pull_request:
paths:
- "**.h"
- "**.c"
- ".github/workflows/check-format.yml"
- ".clang-format"

jobs:
check-format:
runs-on: ubuntu-latest
container: ps2dev/ps2dev:latest
steps:
- name: Install dependencies
run: |
apk add git make clang
- uses: actions/checkout@v2
- run: |
git fetch --prune --unshallow

- name: Check format -> make format-check
run: |
make format-check
steps:
- uses: actions/checkout@v2
- uses: DoozyX/clang-format-lint-action@v0.12
with:
source: "."
clangFormatVersion: 12
inplace: false
55 changes: 28 additions & 27 deletions .github/workflows/compilation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,34 +11,35 @@ jobs:
runs-on: ubuntu-latest
container: ps2dev/ps2dev:latest
steps:
- name: Install dependencies
run: |
apk add build-base git zip
- name: Install dependencies
run: |
apk add build-base git zip
- uses: actions/checkout@v2
- run: |
git fetch --prune --unshallow
- uses: actions/checkout@v2
- run: |
git fetch --prune --unshallow
- name: Compile wLaunchELF
run: |
make
- name: Get short SHA
id: slug
run: echo "::set-output name=sha8::$(echo ${GITHUB_SHA} | cut -c1-8)"
- name: Compile wLaunchELF
run: |
make
git ls-files -i --exclude-standard -c
- name: Upload artifacts
if: ${{ success() }}
uses: actions/upload-artifact@v2
with:
name: wLaunchELF-${{ steps.slug.outputs.sha8 }}
path: BOOT.ELF
- name: Get short SHA
id: slug
run: echo "::set-output name=sha8::$(echo ${GITHUB_SHA} | cut -c1-8)"

- name: Create release
if: github.ref == 'refs/heads/master'
uses: marvinpinto/action-automatic-releases@latest
with:
repo_token: "${{ secrets.GITHUB_TOKEN }}"
automatic_release_tag: "latest"
title: "Latest development build"
files: BOOT.ELF
- name: Upload artifacts
if: ${{ success() }}
uses: actions/upload-artifact@v2
with:
name: wLaunchELF-${{ steps.slug.outputs.sha8 }}
path: BOOT.ELF

- name: Create release
if: github.ref == 'refs/heads/master'
uses: marvinpinto/action-automatic-releases@latest
with:
repo_token: "${{ secrets.GITHUB_TOKEN }}"
automatic_release_tag: "latest"
title: "Latest development build"
files: BOOT.ELF
34 changes: 30 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,11 +1,37 @@
#
# NOTE! Please use 'git ls-files -i --exclude-standard -c'
# command after changing this file, to see if there are
# any tracked files which get ignored after the change.
#
# Normal rules
#
.*
*.a
*.diff
*.elf
*.ELF
*.erl
*.exe
*.o
*.swp
*.tmp
*.irx
*.map
*.o
*.patch
*.rej
*.s
githash.h
*.zip
*.ZIP
*.a

#
# files that we don't want to ignore
#
!.gitignore
!.gitattributes
!.github
!.editorconfig
!.clang-format*

#
# Generated source files
#
githash.h
2 changes: 1 addition & 1 deletion AllowDVDV/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ IOP_INCS += -I$(PS2SDK)/iop/include -I$(PS2SDK)/common/include
all: $(IOP_BIN)

clean:
rm -f $(IOP_BIN) $(IOP_OBJS)
rm -f $(IOP_OBJS_DIR) $(IOP_BIN)

include $(PS2SDK)/Defs.make
include ../Rules.make
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
[![CI](https://github.com/ps2homebrew/wLaunchELF/workflows/CI/badge.svg)](https://github.com/ps2homebrew/wLaunchELF/actions?query=workflow%3ACI)

# wLaunchELF
wLaunchELF, formerly known as uLaunchELF, also known as wLE or uLE (abbreviated), is an open source file manager and executable launcher for the Playstation 2 console based off of the original LaunchELF. It contains many different features, including a text editor, hard drive manager, as well as network support, and much more.

wLaunchELF, formerly known as uLaunchELF, also known as wLE or uLE (abbreviated), is an open-source file manager and executable launcher for the Playstation 2 console based on the original LaunchELF. It contains many different features, including a text editor, hard drive manager, FTP support, and much more.
2 changes: 1 addition & 1 deletion docs/FileBrowser sort+display modes.txt
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ This is the default mode, and works as the traditional main sort mode of older u
1a: All folders, sorted by name
1b: All ELF files, sorted by name
1c: All non-ELF files, sorted by name


Sort mode 2 == Sort by Game Title
This works as the alternate sort mode used by older uLE versions when displaying game titles, but in the new version it can also be used when displaying filenames. In addition to the title sorting, this mode also separates folders and ELFs in the same way as mode 1. Additionally, objects that have no title will be separated to follow those of the same object type that do have titles, and the internal sorting of title-less objects will be by name. This means that such a display can contain five object groups.
Expand Down
Loading

0 comments on commit 5c5e75c

Please sign in to comment.