Browse Source

support both x86 and X64 versions on Windows

Le Tan 8 years ago
parent
commit
88fd5b14a5
2 changed files with 25 additions and 12 deletions
  1. 3 7
      README.md
  2. 22 5
      appveyor.yml

+ 3 - 7
README.md

@@ -14,13 +14,8 @@ VNote提供定期释出的稳定版本,以及总是保持最新的滚(wen)动(
 ## Windows
 ![Windows Build Status](https://ci.appveyor.com/api/projects/status/github/tamlok/vnote?svg=true)
 
-- Tagged releases: [Github Release](https://github.com/tamlok/vnote/releases)
-- Rolling build: [AppVeyor Artifacts](https://ci.appveyor.com/project/tamlok/vnote/build/artifacts)
-
-
-- 稳定版本: [Github Release](https://github.com/tamlok/vnote/releases)
-- 滚动构建版本: [AppVeyor Artifacts](https://ci.appveyor.com/project/tamlok/vnote/build/artifacts)
-
+- Tagged releases (稳定版本): [Github Release](https://github.com/tamlok/vnote/releases)
+- Rolling build (滚动构建版本): [Bintray](https://bintray.com/tamlok/vnote/vnote/view/files)
 
 ## Linux
 [![Build Status](https://travis-ci.org/tamlok/vnote.svg?branch=master)](https://travis-ci.org/tamlok/vnote)
@@ -28,6 +23,7 @@ VNote提供定期释出的稳定版本,以及总是保持最新的滚(wen)动(
 **NOT** ready yet! Please help yourself to compile and build it from sources.
 
 ## MacOS
+[![Build Status](https://travis-ci.org/tamlok/vnote.svg?branch=master)](https://travis-ci.org/tamlok/vnote)
 
 ***
 # Description (简介)

+ 22 - 5
appveyor.yml

@@ -7,11 +7,14 @@ branches:
         - master
 
 environment:
+    COMPILER: msvc
+    VSVER: 14
+
     matrix:
         - QT: C:\Qt\5.7\msvc2015_64
           PLATFORM: amd64
-          COMPILER: msvc
-          VSVER: 14
+        - QT: C:\Qt\5.7\msvc2015
+          PLATFORM: x86
 
 clone_depth: 1
 
@@ -23,9 +26,11 @@ install:
 # scripts that run before build
 before_build:
     - call "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" %PLATFORM%
+    # After calling vcvarsall.bat, %PLATFORM% will be X64 or x86
     - mkdir build
     - cd build
-    - qmake -r -spec win32-msvc2015 CONFIG+=x86_64 CONFIG-=debug CONFIG+=release ../VNote.pro
+    - if "%PLATFORM%" EQU "X64" (qmake -r -spec win32-msvc2015 CONFIG+=x86_64 CONFIG-=debug CONFIG+=release ../VNote.pro)
+    - if "%PLATFORM%" EQU "x86" (qmake -r -spec win32-msvc2015 CONFIG+=Win32 CONFIG-=debug CONFIG+=release ../VNote.pro)
 
 # custom build scripts
 build_script:
@@ -41,8 +46,20 @@ after_build:
     - echo %APPVEYOR_BUILD_VERSION% > "distrib\VNote\version.txt"
     - echo %APPVEYOR_REPO_COMMIT% >> "distrib\VNote\version.txt"
     - cd distrib
-    - 7z a vnote_win_x86_64_portable_%APPVEYOR_BUILD_VERSION%.zip VNote
+    - 7z a vnote_win_%PLATFORM%_portable_%APPVEYOR_BUILD_VERSION%.zip VNote
 
 artifacts:
-    - path: build\distrib\vnote_win_x86_64_portable_%APPVEYOR_BUILD_VERSION%.zip
+    - path: build\distrib\vnote_win_%PLATFORM%_portable_%APPVEYOR_BUILD_VERSION%.zip
       name: portable
+
+deploy:
+    - provider: BinTray
+      username: tamlok
+      api_key:
+          secure: YJqzsVDlC2NYH2RgzbUMtjZWbSXOdWUiiENOIqImo31hOfeiB0MiVGmBLmKPAHEg
+      subject: tamlok
+      repo: vnote
+      package: vnote
+      version: 1.0
+      publish: true
+      override: true