diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json new file mode 100644 index 0000000..b7fdc8a --- /dev/null +++ b/.devcontainer/devcontainer.json @@ -0,0 +1,19 @@ +{ + "image": "mcr.microsoft.com/devcontainers/cpp:debian-12", + "features": { + }, + + "customizations": { + "vscode": { + "extensions": [ + "ms-vscode.cmake-tools", + "usernamehw.errorlens", + "streetsidesoftware.code-spell-checker", + "streetsidesoftware.code-spell-checker-russian", + "ibm.output-colorizer", + "chouzz.vscode-innosetup", + "github.vscode-github-actions" + ] + } + } +} diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index e5c40e3..b100bad 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -16,7 +16,7 @@ jobs: - uses: actions/checkout@v4 - name: Run script - run: ${{ github.workspace }}/./install.sh + run: echo '/home/autobuild/tools' | ${{ github.workspace }}/./install.sh - name: Add toolchain to path run: echo "/home/autobuild/tools/win32/bin" >> $GITHUB_PATH @@ -60,6 +60,12 @@ jobs: cmake -B ${{ github.workspace }}/build cmake --build ${{ github.workspace }}/build --target Installer + - name: Upload artifact + uses: actions/upload-pages-artifact@v3 + with: + # Upload entire repository + path: './build' + # Test Package package: runs-on: ubuntu-latest @@ -70,9 +76,15 @@ jobs: run: | cmake -B ${{ github.workspace }}/build cmake --build ${{ github.workspace }}/build --target Package + + - name: Upload artifact + uses: actions/upload-pages-artifact@v3 + with: + # Upload entire repository + path: './build' - name: Install package - run: sudo apt install ${{ github.workspace }}/build/package.deb + run: echo '/home/autobuild/tools' | sudo apt install ${{ github.workspace }}/build/package.deb -y - name: Add toolchain to path run: echo "/home/autobuild/tools/win32/bin" >> $GITHUB_PATH @@ -84,3 +96,4 @@ jobs: - name: Remove package run: sudo apt remove kos32-gcc + diff --git a/.vscode/extensions.json b/.vscode/extensions.json index 58fb364..d801e45 100644 --- a/.vscode/extensions.json +++ b/.vscode/extensions.json @@ -3,6 +3,7 @@ "chouzz.vscode-innosetup", "streetsidesoftware.code-spell-checker", "streetsidesoftware.code-spell-checker-russian", - "ms-vscode.cmake-tools" + "ms-vscode.cmake-tools", + "github.vscode-github-actions" ] } \ No newline at end of file diff --git a/CMakeLists.txt b/CMakeLists.txt index c60ca3c..0bd983c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -9,6 +9,7 @@ project( add_custom_target( Package COMMAND cp -f ${CMAKE_CURRENT_SOURCE_DIR}/install.sh ${CMAKE_CURRENT_SOURCE_DIR}/package/DEBIAN/postinst + COMMAND chmod 775 ${CMAKE_CURRENT_SOURCE_DIR}/package/DEBIAN/postinst COMMAND dpkg-deb --build ${CMAKE_CURRENT_SOURCE_DIR}/package ${CMAKE_CURRENT_BINARY_DIR}/package.deb WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} ) diff --git a/install.sh b/install.sh index ac80ce2..d5c19ba 100755 --- a/install.sh +++ b/install.sh @@ -30,8 +30,18 @@ check_utils(){ pwd + TOOLCHAIN_DIR="/home/autobuild/tools" +MESSAGE="Toolchain install path(default is $TOOLCHAIN_DIR): " + +echo -n $MESSAGE +read INPUT + +if [[ ! -z "$INPUT" ]]; then + TOOLCHAIN_DIR=$INPUT +fi + print_msg "Checking utilities..." diff --git a/installator.iss b/installator.iss index 21d2d5d..8149f6a 100644 --- a/installator.iss +++ b/installator.iss @@ -2,7 +2,7 @@ ; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES! #define MyAppName "KolibriOS gcc toolchain" -#define MyAppVersion "0.1.3" +#define MyAppVersion "0.1.4" #define MyAppPublisher "Egor00f" #define MyAppURL "https://github.com/Egor00f/kolibrios-gcc-toolchain" diff --git a/package/DEBIAN/control b/package/DEBIAN/control old mode 100644 new mode 100755 index 15f06c1..fd324b6 --- a/package/DEBIAN/control +++ b/package/DEBIAN/control @@ -1,5 +1,5 @@ Package: kos32-gcc -Version: 0.1.3 +Version: 0.1.4 Architecture: all Section: devel Depends: libc6-i386:amd64, libmpc3:amd64 diff --git a/package/DEBIAN/dirs b/package/DEBIAN/dirs new file mode 100644 index 0000000..a3d8927 --- /dev/null +++ b/package/DEBIAN/dirs @@ -0,0 +1 @@ +/home/autobuild/tools/ \ No newline at end of file