Skip to content

Commit

Permalink
Modify install and ci
Browse files Browse the repository at this point in the history
  • Loading branch information
KangLin committed Oct 14, 2021
1 parent c4f10d3 commit e5c4eb4
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/cmake.yml
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ jobs:
move /Y ${{env.INSTALL_DIR}}/bin\*.dll install\bin
move /Y ${{env.INSTALL_DIR}}/lib\*.dll install\bin
makensis ${{github.workspace}}/build/Install.nsi
${{github.workspace}}/build/install/bin/RabbitImApp.exe -f "${{github.workspace}}/build/update_windows.xml" --pf RabbitIm-Setup-v0.0.8.exe -m "v0.0.8"
${{github.workspace}}/build/install/bin/RabbitImApp.exe -f "${{github.workspace}}/build/update_windows.xml" --pf RabbitIm-Setup-v0.1.0.exe -m "v0.1.0"
if: ${{ matrix.BUILD_TYPE == 'Release' }}

- name: update
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/cmake_mingw.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ jobs:
C:\msys64\usr\bin\pacman -S --noconfirm mingw-w64-x86_64-libpng
C:\msys64\usr\bin\pacman -S --noconfirm mingw-w64-x86_64-i686-nasm
C:\msys64\usr\bin\pacman -S --noconfirm mingw-w64-x86_64-openh264
C:\msys64\usr\bin\pacman -S --noconfirm mingw-w64-x86_64-opencv
C:\msys64\usr\bin\pacman -S --noconfirm git base-devel
- name: make_directory
Expand Down Expand Up @@ -106,7 +107,7 @@ jobs:
PATH: C:\msys64\mingw64\bin;C:\msys64\usr\bin
run: |
git clone "https://github.com/KangLin/qzxing.git"
cd qxmpp
cd qzxing
cmake -E make_directory build
cd build
cmake .. -G"MinGW Makefiles" -DCMAKE_BUILD_TYPE=${{matrix.BUILD_TYPE}} -DCMAKE_INSTALL_PREFIX=${{env.INSTALL_DIR}}
Expand Down
36 changes: 36 additions & 0 deletions Install/Install.nsi
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,22 @@ VSRedistInstalled:
Delete "$INSTDIR\bin\vcredist_x86.exe"
FunctionEnd

Function _InstallVC
Push $R0
ClearErrors
ReadRegDword $R0 HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{FF66E9F6-83E7-3A3E-AF14-8DE9A809A6A4}" "Version"

; check regist
IfErrors 0 VSRedistInstalled
Exec "$INSTDIR\bin\vc_redist.x86.exe /q /norestart"
StrCpy $R0 "-1"

VSRedistInstalled:
;MessageBox MB_OK "vc_redist.x86.exe is installed"
Exch $R0
Delete "$INSTDIR\bin\vc_redist.x86.exe "
FunctionEnd

Function InstallVC64
Push $R0
ClearErrors
Expand All @@ -109,11 +125,31 @@ Function InstallVC64
Delete "$INSTDIR\bin\vcredist_x64.exe"
FunctionEnd

Function _InstallVC64
Push $R0
ClearErrors
ReadRegDword $R0 HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{FF66E9F6-83E7-3A3E-AF14-8DE9A809A6A4}" "Version"

; check regist
IfErrors 0 VSRedistInstalled
Exec "$INSTDIR\bin\vc_redist.x64.exe /q /norestart"
StrCpy $R0 "-1"

VSRedistInstalled:
;MessageBox MB_OK "Vcredist_x64.exe is installed"
Exch $R0
Delete "$INSTDIR\bin\vc_redist.x64.exe"
FunctionEnd

Function InstallRuntime
IfFileExists "$INSTDIR\bin\vcredist_x64.exe" 0 +2
call InstallVC64
IfFileExists "$INSTDIR\bin\vc_redist.x64.exe" 0 +2
call _InstallVC64
IfFileExists "$INSTDIR\bin\vcredist_x86.exe" 0 +2
call InstallVC
IfFileExists "$INSTDIR\bin\vc_redist.x86.exe" 0 +2
call _InstallVC
FunctionEnd

Function DirectoryPermissionErrorBox
Expand Down

0 comments on commit e5c4eb4

Please sign in to comment.